From 9ae232f4deaede40e05e783597624a6d66fadf74 Mon Sep 17 00:00:00 2001 From: Antoine BOSSY Date: Wed, 12 Jun 2019 19:16:25 +0200 Subject: [PATCH] [amundi] Compute correctly the amount of reimboursements. --- modules/amundi/pages.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/amundi/pages.py b/modules/amundi/pages.py index 639e05f6e..02c2b7fa8 100644 --- a/modules/amundi/pages.py +++ b/modules/amundi/pages.py @@ -116,7 +116,10 @@ class AccountHistoryPage(LoggedPage, JsonPage): if ('nomDispositif' in ins and 'montantNet' in ins and 'codeDispositif' in ins and '%s%s' % (ins['nomDispositif'], ins['codeDispositif']) == '%s%s' % (account.label, account.id)): - amount += ins['montantNet'] + if ins['type'] == 'RACH_TIT': + amount -= ins['montantNet'] + else: + amount += ins['montantNet'] return CleanDecimal().filter(amount) -- 2.24.1