From 3625fbe9900c2471d3344a26e98a87abab428549 Mon Sep 17 00:00:00 2001 From: Guillaume Risbourg Date: Tue, 15 Oct 2019 09:32:04 +0200 Subject: [PATCH] [fortuneo] LI balance and investments format change Life Insurance balance and investments format have changed from SI format to French format. --- modules/fortuneo/pages/accounts_list.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/modules/fortuneo/pages/accounts_list.py b/modules/fortuneo/pages/accounts_list.py index aee1afb5bf..40cfc79fb2 100644 --- a/modules/fortuneo/pages/accounts_list.py +++ b/modules/fortuneo/pages/accounts_list.py @@ -174,10 +174,10 @@ def get_investments(self, account): inv.label = CleanText(None).filter(cols[self.COL_LABEL]) inv.quantity = self.parse_decimal(cols[self.COL_QUANTITY], True) - inv.unitprice = self.parse_decimal(cols[self.COL_UNITPRICE], False) - inv.unitvalue = self.parse_decimal(cols[self.COL_UNITVALUE], False) + inv.unitprice = self.parse_decimal(cols[self.COL_UNITPRICE], True) + inv.unitvalue = self.parse_decimal(cols[self.COL_UNITVALUE], True) inv.vdate = Date(CleanText(cols[self.COL_DATE], default=NotAvailable), dayfirst=True, default=NotAvailable)(self.doc) - inv.valuation = self.parse_decimal(cols[self.COL_VALUATION], False) + inv.valuation = self.parse_decimal(cols[self.COL_VALUATION], True) inv.diff = self.parse_decimal(cols[self.COL_PERF], True) diff_percent = self.parse_decimal(cols[self.COL_PERF_PERCENT], True) inv.diff_ratio = diff_percent / 100 if diff_percent else NotAvailable @@ -518,11 +518,8 @@ def get_list(self): account.currency = investment_page.get_currency() elif balance: account.currency = account.get_currency(balance) - if account.type == Account.TYPE_LIFE_INSURANCE: - # Life Insurance balance uses '.' instead of ',' - account.balance = CleanDecimal.SI().filter(balance) - else: - account.balance = CleanDecimal.French().filter(balance) + + account.balance = CleanDecimal.French().filter(balance) if account.type in (Account.TYPE_CHECKING, Account.TYPE_SAVINGS): # Need a token sent by SMS to customers -- GitLab