File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
account_payment_term_extension/models Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -234,6 +234,7 @@ def _compute_terms(
234
234
# FIXME: Find an inheritable way of doing this
235
235
self .ensure_one ()
236
236
company_currency = company .currency_id
237
+ foreign_currency = company_currency != currency
237
238
tax_amount_left = tax_amount
238
239
tax_amount_currency_left = tax_amount_currency
239
240
untaxed_amount_left = untaxed_amount
@@ -243,6 +244,8 @@ def _compute_terms(
243
244
total_amount_currency = remaining_amount_currency = (
244
245
tax_amount_currency + untaxed_amount_currency
245
246
)
247
+ if foreign_currency :
248
+ total_amount , total_amount_currency = total_amount_currency , total_amount
246
249
result = []
247
250
precision_digits = currency .decimal_places
248
251
company_precision_digits = company_currency .decimal_places
You can’t perform that action at this time.
0 commit comments