[16.0] add support for COMMERZBANK camt files

This commit is contained in:
Luc De Meyer committed 2024-01-26 19:06:17 +01:00
1 parent b2f2690667
commit a8d6cf03f8
2 files changed
+6 -1

No files matched your search

+5
View File
@@ -550,6 +550,11 @@ class EbicsFile(models.Model):
currency_code = stmt.xpath(
"ns:Acct/ns:Ccy/text() | ns:Bal/ns:Amt/@Ccy", namespaces=ns
)[0]
# some banks (e.g. COMMERZBANK) add the currency as the last 3 digits
# of the bank account number hence we need to remove this since otherwise
# the journal matching logic fails
if acc_number[-3:] == currency_code:
acc_number = acc_number[:-3]
root_new = deepcopy(root)
entries = False