Issue 11858

Support single bank account handling many currencies
Nosy list
MR, ced
Assigned to

Created on 2022-11-02.21:49:35 by MR, last changed 3 days ago by MR.


Author: [hidden] (MR) Tryton translator
Date: 2022-12-01.07:40:38

Reality is that this account is multi-currency account , what means that is do not have assigned currency (in this account you can operate till 30-40 different currencies). You do not need to open new account to get new currency. On the other hand, the logic that there are many accounts with the same SEPA ID is correct, but by my opinion it is a bit less match reality.

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2022-12-01.00:51:21

For me the currency must be explicit. And constraint that does not match the reality is not a benefit.

Author: [hidden] (MR) Tryton translator
Date: 2022-11-30.19:18:20

Wouldn't it be better to don't touch number_iban_exclude but add currency to bank_account_unique and let to choose a bank account without currency for the journal? In this case the bank accounts without explicitly defined currency become multi-currency.

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2022-11-03.23:48:09

So the problem is that the same account number is used for indeed different account because the currency is different.
Tryton does not support yet such case as it expects to have a single statement journal per bank account with a single currency.
I guess we could include the currency option for Journal.get_by_bank_account but also remove the number_iban_exclude if we must create many bank account with the same IBAN but different currency.

Author: [hidden] (MR) Tryton translator
Date: 2022-11-03.20:58:03

Many (if not all) Scandinavian, Finland and Baltic states banks offer multicurrency accounts, i.e. you have one SEPA account number and you can receive, send and hold in this account many different currencies - EUR, USD, GPB etc. The same possibility offer and many new banks (a la Revolut).
The statement file (camt.053) for this account include all currencies. For each currency in statements group (GrpHdr) is included separate statement (Stmt).
For example you can see the structure of camt.053 file for Swedbank in , p.19. Very similar file structure have SEB , Danske Bank and Handelsbank.
But multicurrency accounts is only one of cases for multiples statements in the camt.053 file. The standard describe the possibility to include to one file many different accounts, even Belgian guidelines propose this possibilty ( p.11-14.)
In my opinion, there is two problems:
1. To create for every statement block (Stmt) one statement in Tryton
2. To choose the journal (get_by_bank_account) not only by the account but by the account and the currency

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2022-11-02.23:09:06

I do not understand how a bank account can have a statement with different lines have different currencies. What is this strange bank account?

Author: [hidden] (MR) Tryton translator
Date: 2022-11-02.21:49:35

Statement for multicurrency SEPA account consists from a few Stmt blocks with the same account number but with the different currencies. The SEPA statement parser always finishes with account_statement.msg_import_wrong_currency error because it can choose the journal only by account number.

Date User Action Args
2022-12-01 07:40:38MRsetmessages: + msg80261
2022-12-01 00:51:21cedsetmessages: + msg80257
2022-11-30 19:18:20MRsetmessages: + msg80246
2022-11-03 23:48:09cedsetcomponent: + bank
messages: + msg79915
priority: bug -> feature
status: need-eg -> chatting
title: Error when parsing multicurrency sepa statement -> Support single bank account handling many currencies
type: behavior -> feature request
2022-11-03 20:58:03MRsetmessages: + msg79914
2022-11-02 23:09:06cedsetmessages: + msg79904
nosy: + ced
status: unread -> need-eg
2022-11-02 21:49:35MRcreate

Showing 10 items. Show all history (warning: this could be VERY long)