fix possible conflicts in detection of balance
This commit is contained in:
parent
f4390d9b26
commit
ccb69b2092
1 changed files with 9 additions and 9 deletions
|
|
@ -66,15 +66,15 @@ class AccountsList(BasePage):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
elif td.attrib.get('headers', '') == 'Solde':
|
elif td.attrib.get('headers', '') == 'Solde':
|
||||||
balance = self.parser.tocleanstring(td)
|
div = td.xpath('./div[@class="Solde"]')
|
||||||
if balance is not None and len(balance) > 0 and balance != 'ANNULEE':
|
if len(div) > 0:
|
||||||
account.currency = account.get_currency(balance)
|
balance = self.parser.tocleanstring(div[0])
|
||||||
balance = FrenchTransaction.clean_amount(balance)
|
if len(balance) > 0 and balance != 'ANNULEE':
|
||||||
account.balance = Decimal(balance)
|
account.currency = account.get_currency(balance)
|
||||||
else:
|
balance = FrenchTransaction.clean_amount(balance)
|
||||||
account.balance = NotAvailable
|
account.balance = Decimal(balance)
|
||||||
|
else:
|
||||||
print account.label
|
account.balance = NotAvailable
|
||||||
|
|
||||||
if not account.label or empty(account.balance):
|
if not account.label or empty(account.balance):
|
||||||
continue
|
continue
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue