Skip to content

Commit

Permalink
[ADD] Use amount residual to compute cash discount amount on payment …
Browse files Browse the repository at this point in the history
…order line
  • Loading branch information
adrienpeiffer committed Jan 22, 2015
1 parent aade617 commit 0ac6422
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ def _prepare_payment_line(self, payment, line):
if invoice.discount_due_date >= today:
discount = invoice.amount_total - \
invoice.discount_amount
res.update({'amount_currency': invoice.discount_amount,
amount_discount = line.amount_residual - discount
res.update({'amount_currency': amount_discount,
'discount_amount': discount})
return res

Expand Down

0 comments on commit 0ac6422

Please sign in to comment.