From e5736471b60026615ae89409e94ebd08c26ec3a4 Mon Sep 17 00:00:00 2001 From: ahuillet Date: Thu, 7 Nov 2019 20:12:23 +0100 Subject: [PATCH] fortuneo: fix CardHistory debit vs. credit The fields were inverted: debit actually comes first. This fixes a bug where card refunds (the only positive operations in card history) were returned in negative, hiding the fact that they were, in fact, refunds. --- modules/fortuneo/pages/accounts_list.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/fortuneo/pages/accounts_list.py b/modules/fortuneo/pages/accounts_list.py index 1302458dbf..30dd0002ca 100644 --- a/modules/fortuneo/pages/accounts_list.py +++ b/modules/fortuneo/pages/accounts_list.py @@ -342,8 +342,8 @@ def get_operations(self): rdate = cleaner(op.xpath('./td[1]')[0]) date = cleaner(op.xpath('./td[2]')[0]) raw = cleaner(op.xpath('./td[3]')[0]) - credit = cleaner(op.xpath('./td[4]')[0]) - debit = cleaner(op.xpath('./td[5]')[0]) + debit = cleaner(op.xpath('./td[4]')[0]) + credit = cleaner(op.xpath('./td[5]')[0]) tr = Transaction() tr.parse(date=date, raw=raw) -- GitLab