if both credit and debit are empty, set value to 0

This commit is contained in:
Romain Bignon 2013-01-07 23:03:34 +01:00
commit a8b1c5ed5b

View file

@ -56,8 +56,10 @@ class FrenchTransaction(Transaction):
if len(debit) > 0: if len(debit) > 0:
self.amount = - abs(Decimal(debit)) self.amount = - abs(Decimal(debit))
else: elif len(credit) > 0:
self.amount = Decimal(credit) self.amount = Decimal(credit)
else:
self.amount = 0.0
def parse(self, date, raw): def parse(self, date, raw):
""" """