on website, negative transactions are now displayed as... negative

This commit is contained in:
Romain Bignon 2014-02-16 21:32:53 +01:00
commit 82431d0e79

View file

@ -84,10 +84,11 @@ class OperationsPage(BasePage):
color = tds[self.COL_AMOUNT].find('span').attrib['class']
if color == 'black':
continue
if color == 'red':
amount = '-' + amount
operation.parse(date, label)
operation.set_amount(amount)
if color == 'red' and operation.amount > 0:
operation.amount = - operation.amount
yield operation