Bug 797521 - Receivable Aging (beta): include earliest split

When processing invoice->payments, we used gnc-lot-get-earliest-split
to find the lot opening-split to skip it.

However it does not always return the lot opening-split, because a
lot-reducing split may be dated earlier than the lot opening-split.

This change means that the posting-split is processed together with
the payment splits, but its PaymentAcctSplitList is null, so it does
not add any row to the result.
pull/609/head
Christopher Lam 7 years ago
parent 7cd6591c77
commit 43fab24e2c

@ -309,8 +309,7 @@
(define (make-invoice->payments-table invoice)
(define lot (gncInvoiceGetPostedLot invoice))
(let lp ((invoice-splits (delete (gnc-lot-get-earliest-split lot)
(gnc-lot-get-split-list lot)))
(let lp ((invoice-splits (gnc-lot-get-split-list lot))
(result '()))
(match invoice-splits
;; finished. test for underpayment and add outstanding balance

Loading…
Cancel
Save