mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug 797852 - Error in Accounts Payable Aging re cut off dates
Finally the proper fix in aging-report. The aging-report must consider only activity in the report period specified. If an invoice is paid after the report period, it is considered unpaid.
This commit is contained in:
parent
5bf57260ae
commit
2fd2b7bb64
@ -908,7 +908,13 @@
|
||||
(let* ((invoice (gncInvoiceGetInvoiceFromTxn
|
||||
(xaccSplitGetParent (car splits))))
|
||||
(lot (gncInvoiceGetPostedLot invoice))
|
||||
(bal (gnc-lot-get-balance lot))
|
||||
(lot-splits (gnc-lot-get-split-list lot))
|
||||
(bal (fold
|
||||
(lambda (a b)
|
||||
(if (<= (xaccTransGetDate (xaccSplitGetParent a)) to-date)
|
||||
(+ (xaccSplitGetAmount a) b)
|
||||
b))
|
||||
0 lot-splits))
|
||||
(bal (if receivable? bal (- bal)))
|
||||
(date (if (eq? date-type 'postdate)
|
||||
(gncInvoiceGetDatePosted invoice)
|
||||
|
Loading…
Reference in New Issue
Block a user