display check number in label (closes #1027)

This commit is contained in:
Romain Bignon 2014-09-02 12:18:51 +02:00
commit 0b7a499eeb

View file

@ -382,7 +382,7 @@ class Transaction(FrenchTransaction):
(re.compile('^VIR(EMENT)? (?P<text>.*)'), FrenchTransaction.TYPE_TRANSFER),
(re.compile('^(PRLV|PRELEVEMENT) (?P<text>.*)'),
FrenchTransaction.TYPE_ORDER),
(re.compile('^CHEQUE.*'), FrenchTransaction.TYPE_CHECK),
(re.compile('^(?P<text>CHEQUE .*)'), FrenchTransaction.TYPE_CHECK),
(re.compile('^(AGIOS /|FRAIS) (?P<text>.*)', re.IGNORECASE),
FrenchTransaction.TYPE_BANK),
(re.compile('^(CONVENTION \d+ )?COTIS(ATION)? (?P<text>.*)', 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