Commit 24780538 authored by Sylvie Ye's avatar Sylvie Ye Committed by Romain Bignon

[cmso] loan balance can be 0

parent 74ec4f67
......@@ -272,7 +272,7 @@ class AccountsPage(LoggedPage, JsonPage):
return NotAvailable
def obj_balance(self):
return -abs(CleanDecimal().filter(Dict('montantRestant', default=None)(self) or Dict('montantUtilise')(self)))
return -abs(CleanDecimal().filter(self.el.get('montantRestant', self.el.get('montantUtilise'))))
# only for revolving loans
obj_available_amount = CleanDecimal(Dict('montantDisponible', default=None), default=NotAvailable)
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