fix getting transactions of secondary accounts
This commit is contained in:
parent
dcd25b22eb
commit
0badd945a9
3 changed files with 9 additions and 4 deletions
|
|
@ -76,11 +76,11 @@ class BNPorcBackend(BaseBackend, ICapBank):
|
|||
|
||||
def iter_history(self, account):
|
||||
with self.browser:
|
||||
return self.browser.iter_history(account.id)
|
||||
return self.browser.iter_history(account.link_id)
|
||||
|
||||
def iter_operations(self, account):
|
||||
with self.browser:
|
||||
return self.browser.iter_coming_operations(account.id)
|
||||
return self.browser.iter_coming_operations(account.link_id)
|
||||
|
||||
def iter_transfer_recipients(self, ignored):
|
||||
for account in self.browser.get_transfer_accounts().itervalues():
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ class AccountsList(BasePage):
|
|||
if not 'class' in tr.attrib and tr.find('td') is not None and tr.find('td').attrib.get('class', '') == 'typeTitulaire':
|
||||
account = Account()
|
||||
account.id = tr.xpath('.//td[@class="libelleCompte"]/input')[0].attrib['id'][len('libelleCompte'):]
|
||||
account.link_id = account.id
|
||||
if len(str(account.id)) == 23:
|
||||
account.id = str(account.id)[5:21]
|
||||
|
||||
|
|
|
|||
|
|
@ -34,18 +34,22 @@ class TransactionsBasePage(BasePage):
|
|||
Transaction.TYPE_CHECK, u'N°%(no)s'),
|
||||
(re.compile('^FACTURE CARTE DU (?P<dd>\d{2})(?P<mm>\d{2})(?P<yy>\d{2}) (?P<text>.*)'),
|
||||
Transaction.TYPE_CARD, u'20%(yy)s-%(mm)s-%(dd)s: %(text)s'),
|
||||
(re.compile('^(PRELEVEMENT|TELEREGLEMENT) (?P<text>.*)'),
|
||||
(re.compile('^(PRELEVEMENT|TELEREGLEMENT|TIP) (?P<text>.*)'),
|
||||
Transaction.TYPE_ORDER, '%(text)s'),
|
||||
(re.compile('^ECHEANCEPRET(?P<text>.*)'),
|
||||
Transaction.TYPE_LOAN_PAYMENT, u'n°%(text)s'),
|
||||
(re.compile('^RETRAIT DAB (?P<dd>\d{2})/(?P<mm>\d{2})/(?P<yy>\d{2}) (?P<HH>\d+)H(?P<MM>\d+) (?P<text>.*)'),
|
||||
Transaction.TYPE_WITHDRAWAL, u'20%(yy)s-%(mm)s-%(dd)s %(HH)s:%(MM)s: %(text)s'),
|
||||
(re.compile('^VIREMENT (?P<text>.*)'),
|
||||
(re.compile('^VIR(EMEN)?T (?P<text>.*)'),
|
||||
Transaction.TYPE_TRANSFER, u'%(text)s'),
|
||||
(re.compile('^REMBOURST (?P<text>.*)'),
|
||||
Transaction.TYPE_PAYBACK, '%(text)s'),
|
||||
(re.compile('^COMMISSIONS (?P<text>.*)'),
|
||||
Transaction.TYPE_BANK, '%(text)s'),
|
||||
(re.compile('^(?P<text>REMUNERATION.*)'),
|
||||
Transaction.TYPE_BANK, '%(text)s'),
|
||||
(re.compile('^REMISE CHEQUES(?P<text>.*)'),
|
||||
Transaction.TYPE_DEPOSIT, '%(text)s'),
|
||||
]
|
||||
|
||||
def parse_text(self, op):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue