From 82431d0e791e2029adc77c32b75c1836f4f61b64 Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Sun, 16 Feb 2014 21:32:53 +0100 Subject: [PATCH] on website, negative transactions are now displayed as... negative --- modules/apivie/pages.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/apivie/pages.py b/modules/apivie/pages.py index 41b7e26f..cd9de995 100644 --- a/modules/apivie/pages.py +++ b/modules/apivie/pages.py @@ -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