From 0b7a499eeb471d3ab596b3e4b904dccdd8f3498a Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Tue, 2 Sep 2014 12:18:51 +0200 Subject: [PATCH] display check number in label (closes #1027) --- modules/banquepopulaire/pages.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/banquepopulaire/pages.py b/modules/banquepopulaire/pages.py index c68c564e..416a0fa7 100644 --- a/modules/banquepopulaire/pages.py +++ b/modules/banquepopulaire/pages.py @@ -382,7 +382,7 @@ class Transaction(FrenchTransaction): (re.compile('^VIR(EMENT)? (?P.*)'), FrenchTransaction.TYPE_TRANSFER), (re.compile('^(PRLV|PRELEVEMENT) (?P.*)'), FrenchTransaction.TYPE_ORDER), - (re.compile('^CHEQUE.*'), FrenchTransaction.TYPE_CHECK), + (re.compile('^(?PCHEQUE .*)'), FrenchTransaction.TYPE_CHECK), (re.compile('^(AGIOS /|FRAIS) (?P.*)', re.IGNORECASE), FrenchTransaction.TYPE_BANK), (re.compile('^(CONVENTION \d+ )?COTIS(ATION)? (?P.*)', re.IGNORECASE), @@ -452,6 +452,10 @@ class TransactionsPage(BasePage): # Strip the balance displayed in transaction labels t.label = re.sub('solde en valeur : .*', '', t.label) + # XXX Fucking hack to include the check number not displayed in the full label. + if re.match("^CHEQUE ", t.label): + t.label = 'CHEQUE No: %s' % self.parser.tocleanstring(tds[self.COL_REF]) + yield t COL_CARD_DATE = 0