gnucash maint: Multiple changes pushed
Christopher Lam
clam at code.gnucash.org
Tue Nov 5 09:25:41 EST 2019
Updated via https://github.com/Gnucash/gnucash/commit/d0743cd0 (commit)
via https://github.com/Gnucash/gnucash/commit/1a404b8d (commit)
from https://github.com/Gnucash/gnucash/commit/085aa769 (commit)
commit d0743cd0fc2dfef7021704b40e8b1ffd605c36cd
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Tue Nov 5 22:10:16 2019 +0800
[new-aging] restore html link to account register
Current aging-report includes a link to APAR account register. New
aging-report includes the APAR account prior to each section. Ensure
the link to register is offered.
diff --git a/gnucash/report/business-reports/new-aging.scm b/gnucash/report/business-reports/new-aging.scm
index 0896b66a7..36d99c986 100644
--- a/gnucash/report/business-reports/new-aging.scm
+++ b/gnucash/report/business-reports/new-aging.scm
@@ -268,7 +268,11 @@ exist but have no suitable transactions."))
(gnc:debug 'account account)
(gnc:html-table-append-row!
table (list (gnc:make-html-table-cell/size
- 1 (+ 2 num-buckets) (xaccAccountGetName account))))
+ 1 (+ 2 num-buckets)
+ (gnc:make-html-text
+ (gnc:html-markup-anchor
+ (gnc:account-anchor-text account)
+ (xaccAccountGetName account))))))
(let* ((split-owners (map split->owner acc-splits))
(acc-owners (sort (sort-and-delete-duplicates
commit 1a404b8d76127f6030c168b41f6966ddec51e1e5
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Tue Nov 5 21:25:37 2019 +0800
[new-owner-report] fix signs for calling gnc:owner-splits->aging-list
gnc:owner-splits->aging-list revceives an argument 'receivable'
specifying whether the report is dealing with an AR-type account. The
renderers for the various business types (customer/vendor/employee)
define 'reverse?' to be #f for AR reports, and #t for AP
reports. Therefore we need to send '(not reverse?)' to
gnc:owner-splits->aging-list.
This commit performs 2 changes:
* rename 'reverse?' to 'payable?' to be more explicit throughout
* calls gnc:owner-splits->aging-list with '(not payable?)' instead of
the confusing '(not reverse?)'
The end result is that the signs for aging-list for
new-owner-report.scm is now fixed.
diff --git a/gnucash/report/business-reports/new-owner-report.scm b/gnucash/report/business-reports/new-owner-report.scm
index 82cfef200..d7cfa2589 100644
--- a/gnucash/report/business-reports/new-owner-report.scm
+++ b/gnucash/report/business-reports/new-owner-report.scm
@@ -180,10 +180,10 @@
(define (txn-is-payment? txn)
(eqv? (xaccTransGetTxnType txn) TXN-TYPE-PAYMENT))
-(define (make-aging-table splits to-date reverse? date-type currency)
+(define (make-aging-table splits to-date payable? date-type currency)
(let ((table (gnc:make-html-table))
(aging-list (gnc:owner-splits->aging-list
- splits num-buckets to-date date-type reverse?)))
+ splits num-buckets to-date date-type (not payable?))))
(gnc:html-table-set-col-headers!
table (list (_ "Prepayments")
@@ -247,7 +247,7 @@
(lp (cdr link-rows) #f))))
(define (add-owner-table table splits acc start-date end-date date-type
- used-columns reverse? link-option)
+ used-columns payable? link-option)
(define currency (xaccAccountGetCommodity acc))
(define link-cols (assq-ref '((none . 0) (simple . 1) (detailed . 3)) link-option))
(define (print-totals total debit credit tax sale)
@@ -296,7 +296,7 @@
1 (+ columns-used-size link-cols)
(make-aging-table splits
end-date
- reverse? date-type currency)))))
+ payable? date-type currency)))))
(define (add-balance-row odd-row? total)
(add-row table odd-row? used-columns start-date #f "" (_ "Balance") ""
@@ -448,7 +448,7 @@
(txn (xaccSplitGetParent split))
(date (xaccTransGetDate txn))
(value (xaccSplitGetAmount split))
- (value (if reverse? (- value) value))
+ (value (if payable? (- value) value))
(invoice (gncInvoiceGetInvoiceFromTxn txn))
(invoice-splits
(and (txn-is-invoice? txn)
@@ -695,7 +695,7 @@ invoices and amounts.")))))
(gnc:make-html-text
(gnc:html-markup-br))))
-(define (reg-renderer report-obj type reverse?)
+(define (reg-renderer report-obj type payable?)
(define options (gnc:report-options report-obj))
(define (opt-val section name)
(gnc:option-value
@@ -801,7 +801,7 @@ invoices and amounts.")))))
(xaccAccountGetName account)))))))
(add-owner-table table splits account start-date end-date
- date-type used-columns reverse? link-option)))
+ date-type used-columns payable? link-option)))
accounts-and-splits))
(else
Summary of changes:
gnucash/report/business-reports/new-aging.scm | 6 +++++-
gnucash/report/business-reports/new-owner-report.scm | 14 +++++++-------
2 files changed, 12 insertions(+), 8 deletions(-)
More information about the gnucash-changes
mailing list