|
@@ -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
|