[report-utilities] tiny reordering to remove unnecessary reference

instead of split->txn->invoice->lot->invoice
grab split->txn->invoice->lot directly
This commit is contained in:
Christopher Lam 2019-11-01 19:15:35 +08:00
parent 5688204118
commit 5f6413c6c5

View File

@ -1124,10 +1124,9 @@ flawed. see report-utilities.scm. please update reports.")
;; reduce the lot balance automatically.
((eqv? (xaccTransGetTxnType (xaccSplitGetParent (car splits)))
TXN-TYPE-INVOICE)
(let* ((lot (gncInvoiceGetPostedLot
(gncInvoiceGetInvoiceFromTxn
(xaccSplitGetParent (car splits)))))
(invoice (gncInvoiceGetInvoiceFromLot lot))
(let* ((invoice (gncInvoiceGetInvoiceFromTxn
(xaccSplitGetParent (car splits))))
(lot (gncInvoiceGetPostedLot invoice))
(bal (gnc-lot-get-balance lot))
(bal (if receivable? bal (- bal)))
(date (if (eq? date-type 'postdate)