fix when there are several amounts for a card

This commit is contained in:
Romain Bignon 2012-07-03 10:08:02 +02:00
commit 57436e0899

View file

@ -76,7 +76,7 @@ class AccountsPage(BredBasePage):
cols = tr.findall('td')
amount = Decimal(u''.join([txt.strip() for txt in cols[-1].itertext()]).strip(' EUR').replace(' ', '').replace(',', '.'))
amount = sum([Decimal(txt.strip(' EUR').replace(' ', '').replace(',', '.')) for txt in cols[-1].itertext() if len(txt.strip()) > 0])
a = cols[0].find('a')
if a is None:
# this line is a cards line. attach it on the first account.