|
@ -99,7 +99,7 @@ class CodaBankStatementImport(models.TransientModel): |
|
|
return journal.bank_acc_number |
|
|
return journal.bank_acc_number |
|
|
|
|
|
|
|
|
def _get_acc_balance_crelan(self, acc_number): |
|
|
def _get_acc_balance_crelan(self, acc_number): |
|
|
if not self.init_balance == None: |
|
|
|
|
|
|
|
|
if self.init_balance is not None: |
|
|
return self.init_balance |
|
|
return self.init_balance |
|
|
|
|
|
|
|
|
journal = self.env["account.journal"].search( |
|
|
journal = self.env["account.journal"].search( |
|
@ -110,15 +110,15 @@ class CodaBankStatementImport(models.TransientModel): |
|
|
self.init_balance = 0.0 |
|
|
self.init_balance = 0.0 |
|
|
else: |
|
|
else: |
|
|
lang = self._context.get("lang", "en_US") |
|
|
lang = self._context.get("lang", "en_US") |
|
|
l = self.env["res.lang"].search([("code", "=", lang)]) |
|
|
|
|
|
|
|
|
lang = self.env["res.lang"].search([("code", "=", lang)]) |
|
|
balance = journal.get_journal_dashboard_datas()["last_balance"][ |
|
|
balance = journal.get_journal_dashboard_datas()["last_balance"][ |
|
|
:-1 |
|
|
:-1 |
|
|
] |
|
|
] |
|
|
self.init_balance = float( |
|
|
self.init_balance = float( |
|
|
balance.replace(currency.symbol, "") |
|
|
balance.replace(currency.symbol, "") |
|
|
.strip() |
|
|
.strip() |
|
|
.replace(l.thousands_sep, "") |
|
|
|
|
|
.replace(l.decimal_point, ".") |
|
|
|
|
|
|
|
|
.replace(lang.thousands_sep, "") |
|
|
|
|
|
.replace(lang.decimal_point, ".") |
|
|
) |
|
|
) |
|
|
return self.init_balance |
|
|
return self.init_balance |
|
|
|
|
|
|
|
|