Copy sign of lines total to remainder total currency

issue10923
(grafted from 9cb703fdea697d72346f9e2f3cb31f2941d15467)

--HG--
branch : 6.0
This commit is contained in:
Cédric Krier committed 2021-11-02 01:22:54 +01:00
1 parent a0003e7f09
commit dd0d2bc91e
1 file changed
+1 -1
+1 -1
View File
@@ -993,7 +993,7 @@ class Invoice(Workflow, ModelSQL, ModelView, TaxableMixin):
else:
term_lines = [(self.payment_term_date or today, total)]
if self.currency != self.company.currency:
remainder_total_currency = -self.total_amount
remainder_total_currency = self.total_amount.copy_sign(total)
else:
remainder_total_currency = 0
for date, amount in term_lines: