[FIX] account: in the bank statement reconciliation widget, don't convert amounts using the amount_currency to the target currency if the target currency is the compmany currency. OPW 680854
This commit is contained in:
@@ -675,7 +675,7 @@ class AccountMoveLine(models.Model):
|
||||
line_currency = (line.currency_id and line.amount_currency) and line.currency_id or company_currency
|
||||
amount_currency_str = ""
|
||||
total_amount_currency_str = ""
|
||||
if line_currency != company_currency:
|
||||
if line_currency != company_currency and target_currency != company_currency:
|
||||
total_amount = line.amount_currency
|
||||
actual_debit = debit > 0 and amount_currency or 0.0
|
||||
actual_credit = credit > 0 and -amount_currency or 0.0
|
||||
@@ -683,7 +683,7 @@ class AccountMoveLine(models.Model):
|
||||
total_amount = abs(debit - credit)
|
||||
actual_debit = debit > 0 and amount or 0.0
|
||||
actual_credit = credit > 0 and -amount or 0.0
|
||||
if line_currency != target_currency:
|
||||
if line_currency != target_currency and target_currency != company_currency:
|
||||
amount_currency_str = formatLang(self.env, abs(actual_debit or actual_credit), currency_obj=line_currency)
|
||||
total_amount_currency_str = formatLang(self.env, total_amount, currency_obj=line_currency)
|
||||
ctx = context.copy()
|
||||
|
||||
Reference in New Issue
Block a user