mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-26 02:40:43 -06:00
[new-owner-report] fix: payment->invoice gets invoice totals
previously the payment-amount deduction loop used the payment-split-list to obtain the invoice-posting-split's amount. this would occasionally fail and would return the invoice-payment-split amount, obtaining the wrong sign. modify to retrieve the invoice total via gncInvoice API. therefore payment-amount, minus gncInvoiceGetTotal(inv) amounts, results in the overpayment amount.
This commit is contained in:
parent
b3493509d1
commit
063a270499
@ -374,8 +374,7 @@
|
||||
(else
|
||||
(let* ((payment-split (car payment-splits))
|
||||
(inv (car payment-split))
|
||||
(inv-split (cadr payment-split))
|
||||
(inv-amount (AP-negate (xaccSplitGetAmount inv-split))))
|
||||
(inv-amount (gncInvoiceGetTotal inv)))
|
||||
(lp (cdr payment-splits)
|
||||
(- amount inv-amount)
|
||||
(cons (list
|
||||
|
Loading…
Reference in New Issue
Block a user