on website, negative transactions are now displayed as... negative
This commit is contained in:
parent
79c8b3de1e
commit
82431d0e79
1 changed files with 3 additions and 2 deletions
|
|
@ -84,10 +84,11 @@ class OperationsPage(BasePage):
|
||||||
color = tds[self.COL_AMOUNT].find('span').attrib['class']
|
color = tds[self.COL_AMOUNT].find('span').attrib['class']
|
||||||
if color == 'black':
|
if color == 'black':
|
||||||
continue
|
continue
|
||||||
if color == 'red':
|
|
||||||
amount = '-' + amount
|
|
||||||
|
|
||||||
operation.parse(date, label)
|
operation.parse(date, label)
|
||||||
operation.set_amount(amount)
|
operation.set_amount(amount)
|
||||||
|
|
||||||
|
if color == 'red' and operation.amount > 0:
|
||||||
|
operation.amount = - operation.amount
|
||||||
|
|
||||||
yield operation
|
yield operation
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue