Commit a1c5f880 authored by Martin Sicot's avatar Martin Sicot Committed by Romain Bignon

[oney] Fix positive balance for credit card account.

Closes:8872@zendesk
parent a1b5f394
...@@ -250,19 +250,15 @@ class CreditAccountPage(LoggedPage, HTMLPage): ...@@ -250,19 +250,15 @@ class CreditAccountPage(LoggedPage, HTMLPage):
class get_account(ItemElement): class get_account(ItemElement):
klass = Account klass = Account
obj_type = Account.TYPE_REVOLVING_CREDIT obj_type = Account.TYPE_CHECKING
obj__site = 'other' obj__site = 'other'
obj_balance = 0
def obj_label(self):
return self.page.browser.card_name
obj_id = CleanText('//tr[td[text()="Mon numéro de compte"]]/td[@class="droite"]', replace=[(' ', '')]) obj_id = CleanText('//tr[td[text()="Mon numéro de compte"]]/td[@class="droite"]', replace=[(' ', '')])
obj_balance = CleanDecimal('//div[@id="mod-paiementcomptant"]//tr[td[starts-with(normalize-space(text()),"Montant disponible")]]/td[@class="droite"]')
obj_coming = CleanDecimal('//div[@id="mod-paiementcomptant"]//tr[td[contains(text(),"débité le")]]/td[@class="droite"]', sign=lambda _: -1, default=0) obj_coming = CleanDecimal('//div[@id="mod-paiementcomptant"]//tr[td[contains(text(),"débité le")]]/td[@class="droite"]', sign=lambda _: -1, default=0)
obj_currency = Currency('//div[@id="mod-paiementcomptant"]//tr[td[starts-with(normalize-space(text()),"Montant disponible")]]/td[@class="droite"]') obj_currency = Currency('//div[@id="mod-paiementcomptant"]//tr[td[starts-with(normalize-space(text()),"Montant disponible")]]/td[@class="droite"]')
# what's the balance anyway?
# there's "Paiements au comptant" and sometimes "Retraits d'argent au comptant" def obj_label(self):
return self.page.browser.card_name
class CreditHistory(LoggedPage, XLSPage): class CreditHistory(LoggedPage, XLSPage):
......
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