Commit 2300c702 authored by plb's avatar plb
Browse files

gestion des écritures spécifiques. Il est possible maintenant de définir une...

gestion des écritures spécifiques. Il est possible maintenant de définir une liste de fonction dans le fichier de configuration
parent a94cba19
......@@ -110,8 +110,16 @@ class HledgerBankEntry(HledgerEntry):
third_code = settings.get('PC_REFS')['tva_a_decaisser']
if third_code == "":
fn = settings.get('PC_REFS')['fn_custom_code']
third_code = fn(e)
fns = settings.get('PC_REFS')['fn_custom_codes']
for fn in fns:
try:
third_code = fn(e)
if third_code is None or not isinstance(third_code, unicode):
third_code = ""
except:
third_code = ""
if third_code != "":
break
if third_code == "":
third_code = cls.pc_default_tiers
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment