Fix move's amount_secound_currency with negative taxes.

issue3683
review4721002
This commit is contained in:
Sergi Almacellas Abellana committed 2014-03-28 19:10:16 +01:00
1 parent fc449df49d
commit a78ff71da7
1 file changed
+2 -1
+2 -1
View File
@@ -936,7 +936,8 @@ class Invoice(Workflow, ModelSQL, ModelView):
for line in move_lines:
total += line['debit'] - line['credit']
if line['amount_second_currency']:
total_currency += line['amount_second_currency']
total_currency += line['amount_second_currency'].copy_sign(
line['debit'] - line['credit'])
term_lines = self.payment_term.compute(total, self.company.currency,
self.invoice_date)