Commit 02bb0b93 authored by Sylvie Ye's avatar Sylvie Ye Committed by Romain Bignon
Browse files

[societegenerale] fix coming

* coming balance is 0
* it can have several summary coming card transactions in future transactions list,
retrieve all coming transaction
parent 59a1e634
...@@ -151,6 +151,7 @@ def iter_cards(self, account): ...@@ -151,6 +151,7 @@ def iter_cards(self, account):
card = Account() card = Account()
card.id = card.number = el['numeroCompteFormate'].replace(' ', '') card.id = card.number = el['numeroCompteFormate'].replace(' ', '')
card.label = el['labelToDisplay'] card.label = el['labelToDisplay']
card.balance = Decimal('0')
card.coming = Decimal(str(el['montantProchaineEcheance'])) card.coming = Decimal(str(el['montantProchaineEcheance']))
card.type = Account.TYPE_CARD card.type = Account.TYPE_CARD
card.currency = account.currency card.currency = account.currency
...@@ -275,13 +276,13 @@ def iter_coming(self, account): ...@@ -275,13 +276,13 @@ def iter_coming(self, account):
if account.type == account.TYPE_CARD: if account.type == account.TYPE_CARD:
for transaction in self.page.iter_future_transactions(acc_prestation_id=account._prestation_id): for transaction in self.page.iter_future_transactions(acc_prestation_id=account._prestation_id):
# coming transactions on this page are not in coming balance # coming transactions on this page are not include in coming balance
# except for defered card coming transaction, use only for it for the moment # use it only to retrive deferred card coming transactions
if transaction._card_coming: if transaction._card_coming:
for card_coming in transaction._card_coming: for card_coming in transaction._card_coming:
card_coming.date = transaction.date card_coming.date = transaction.date
yield card_coming yield card_coming
return return
for intraday_tr in self.page.iter_intraday_comings(): for intraday_tr in self.page.iter_intraday_comings():
yield intraday_tr yield intraday_tr
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment