Commit 2ec22d12 authored by Damien Mat's avatar Damien Mat Committed by Romain Bignon

[hsbc] Take the negative of balance for credits accounts

Instead of doing it only for type loans I did it for any account that
appears in a menu named 'Mes crédits' as it was the behaviour before the last website change.

Closes: 12373@zendesk
parent 85257986
......@@ -214,6 +214,8 @@ class AccountsPage(GenericLandingPage):
def obj_balance(self):
if Field('type')(self) == Account.TYPE_CARD:
return Decimal(0)
elif 'Mes crédits' in CleanText('.//ancestor::div[1]/preceding-sibling::*')(self):
return - abs(Field('_amount')(self))
return Field('_amount')(self)
def obj_coming(self):
......
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