From 01925e9fc4a62627814903d5c81cda0883e143ec Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Mon, 23 Jul 2012 18:47:18 +0200 Subject: [PATCH] never store 'RELEVE CARTE' transactions (redundancy with card transactions) --- modules/creditmutuel/browser.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/creditmutuel/browser.py b/modules/creditmutuel/browser.py index eb677f84..83af63c2 100644 --- a/modules/creditmutuel/browser.py +++ b/modules/creditmutuel/browser.py @@ -113,10 +113,12 @@ class CreditMutuelBrowser(BaseBrowser): transactions = [] last_debit = None for tr in self.list_operations(account._link_id): - if tr.raw == 'RELEVE CARTE' and last_debit is None: - last_debit = (tr.date - timedelta(days=10)).month - else: + # to prevent redundancy with card transactions, we do not + # store 'RELEVE CARTE' transaction. + if tr.raw != 'RELEVE CARTE': transactions.append(tr) + elif last_debit is None: + last_debit = (tr.date - timedelta(days=10)).month month = 0 for card_link in account._card_links: