include current operations in history
This commit is contained in:
parent
2a4469bddc
commit
96a0961905
3 changed files with 13 additions and 2 deletions
|
|
@ -53,5 +53,10 @@ class OneyBackend(BaseBackend, CapBank):
|
|||
return find_object(self.browser.get_accounts_list(), id=_id, error=AccountNotFound)
|
||||
|
||||
def iter_history(self, account):
|
||||
# To prevent issues in calcul of actual balance and coming one, all
|
||||
# operations are marked as debited.
|
||||
for tr in self.browser.iter_coming(account):
|
||||
yield tr
|
||||
|
||||
for tr in self.browser.iter_history(account):
|
||||
yield tr
|
||||
|
|
|
|||
|
|
@ -56,10 +56,16 @@ class OneyBrowser(LoginBrowser):
|
|||
account.currency = u'EUR'
|
||||
return [account]
|
||||
|
||||
|
||||
@need_login
|
||||
def iter_history(self, account):
|
||||
post = {'task': 'Synthese', 'process': 'SyntheseCompte', 'taskid':'Releve'}
|
||||
self.operations.go(data=post)
|
||||
|
||||
return self.page.iter_transactions(seen=set())
|
||||
|
||||
@need_login
|
||||
def iter_coming(self, account):
|
||||
post = {'task': 'OperationRecente', 'process': 'OperationRecente', 'taskid':'OperationRecente'}
|
||||
self.operations.go(data=post)
|
||||
|
||||
return self.page.iter_transactions(seen=set())
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ class IndexPage(LoggedPage, HTMLPage):
|
|||
return -CleanDecimal('.')(self.doc.xpath('//div[@id = "total-sommes-dues"]/p[contains(text(), "sommes dues")]/span[@class = "montant"]')[0])
|
||||
|
||||
class OperationsPage(LoggedPage, HTMLPage):
|
||||
is_here = "//div[@id='releve-reserve-credit']"
|
||||
is_here = "//div[@id='releve-reserve-credit'] | //div[@id='operations-recentes']"
|
||||
|
||||
@pagination
|
||||
@method
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue