From 6d2aa9422fb1c8954962db6a7ab494061f3756c3 Mon Sep 17 00:00:00 2001 From: Augustin Bouverot Date: Tue, 7 Jul 2020 17:17:09 +0200 Subject: [PATCH] [bp] Add & fix transactions patterns Updated a regex that was failing because of a non printable character. Also added a new regex for withdrawal transactions. --- modules/bp/pages/accounthistory.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/bp/pages/accounthistory.py b/modules/bp/pages/accounthistory.py index 6705f5fb64..15527a0903 100644 --- a/modules/bp/pages/accounthistory.py +++ b/modules/bp/pages/accounthistory.py @@ -46,7 +46,7 @@ class Transaction(FrenchTransaction): (re.compile(r'^(?PACHAT CB) EN COURS.*'), FrenchTransaction.TYPE_CARD), (re.compile(r'^(?P(PRELEVEMENT|TELEREGLEMENT|TIP)) (DE )?(?P.*)'), FrenchTransaction.TYPE_ORDER), (re.compile(r'^(?PECHEANCEPRET)(?P.*)'), FrenchTransaction.TYPE_LOAN_PAYMENT), - (re.compile(r'^CARTE \w+ (?P
\d{2})/(?P\d{2})/(?P\d{2,4}) A \d+H\d+ (?PRETRAIT DAB) (?P.*)'), FrenchTransaction.TYPE_WITHDRAWAL), + (re.compile(r'^CARTE X.\d{4} (?P
\d{2})/(?P\d{2})/(?P\d{2,4}) A \d{2}H\d{2} (?P(?PRETRAIT DAB) .*)'), FrenchTransaction.TYPE_WITHDRAWAL), (re.compile(r'^(?PRETRAIT DAB) (?P
\d{2})/(?P\d{2})/(?P\d{2,4}) \d+H\d+ (?P.*)'), FrenchTransaction.TYPE_WITHDRAWAL), (re.compile(r'^(?PRETRAIT) (?P.*) (?P
\d{2})\.(?P\d{2})\.(?P\d{2,4})'), FrenchTransaction.TYPE_WITHDRAWAL), (re.compile(r'^(?PVIR(EMEN)?T?) (DE |POUR )?(?P.*)'), FrenchTransaction.TYPE_TRANSFER), @@ -64,6 +64,7 @@ class Transaction(FrenchTransaction): (re.compile(r'^(?PFRAIS IRREGULARITES ET INCIDENTS).*'), FrenchTransaction.TYPE_BANK), (re.compile(r'^(?PCOMMISSION PAIEMENT PAR CARTE)'), FrenchTransaction.TYPE_BANK), (re.compile(r'^(?PCREDIT CARTE BANCAIRE) (?P.*) (?P
\d{2})\.(?P\d{2})\.(?P\d{2,4}) .*'), FrenchTransaction.TYPE_CARD), + (re.compile(r'^(?PRETRAIT DAB)/TPE INTERNE$'), FrenchTransaction.TYPE_WITHDRAWAL), ] -- GitLab