[Gnucash-changes] r13612 - gnucash/trunk - Andrew Sackville-West's
patch to show zero balance entries in the
David Hampton
hampton at cvs.gnucash.org
Sun Mar 12 17:23:41 EST 2006
Author: hampton
Date: 2006-03-12 17:23:40 -0500 (Sun, 12 Mar 2006)
New Revision: 13612
Trac: http://svn.gnucash.org/trac/changeset/13612
Modified:
gnucash/trunk/ChangeLog
gnucash/trunk/src/business/business-reports/aging.scm
Log:
Andrew Sackville-West's patch to show zero balance entries in the
payables and receivables aging reports.
Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog 2006-03-12 22:18:28 UTC (rev 13611)
+++ gnucash/trunk/ChangeLog 2006-03-12 22:23:40 UTC (rev 13612)
@@ -1,5 +1,9 @@
2006-03-12 David Hampton <hampton at employees.org>
+ * src/business/business-reports/aging.scm: Andrew Sackville-West's
+ patch to show zero balance entries in the payables and receivables
+ aging reports.
+
* src/engine/gnc-pricedb.[ch]:
* src/engine/gw-engine-spec.scm: Andrew Sackville-West's changes
to add the ability to lookup the latest price before a specific
Modified: gnucash/trunk/src/business/business-reports/aging.scm
===================================================================
--- gnucash/trunk/src/business/business-reports/aging.scm 2006-03-12 22:18:28 UTC (rev 13611)
+++ gnucash/trunk/src/business/business-reports/aging.scm 2006-03-12 22:23:40 UTC (rev 13612)
@@ -45,6 +45,7 @@
(define optname-report-currency (N_ "Report's currency"))
(define optname-price-source (N_ "Price Source"))
(define optname-multicurrency-totals (N_ "Show Multi-currency Totals?"))
+(define optname-show-zeros (N_ "Show zero balance items?"))
;; The idea is: have a hash with the key being the contact name
;; (In future this might be GUID'ed, but for now it's a string
@@ -175,7 +176,7 @@
;; a new company record in the hash
(define (update-company-hash hash split bucket-intervals
- reverse?)
+ reverse? show-zeros)
(define (do-update value)
(let* ((transaction (gnc:split-get-parent split))
@@ -234,7 +235,7 @@
;; XXX: we _could_ just set the value to 0 in order to list
;; the company. I'm not sure what to do. Perhaps add an
;; option?
- (if (not is-paid?)
+ (if (or (not is-paid?) show-zeros)
(do-update value))))
;; get the total debt from the buckets
@@ -363,6 +364,14 @@
totals to report currency")
#f))
+ (add-option
+ (gnc:make-simple-boolean-option
+ gnc:pagename-general
+ optname-show-zeros
+ "j"
+ (N_ "Show all vendors/customers even if they have a zero balance.")
+ #f))
+
(gnc:options-set-default-section options "General")
options))
@@ -519,6 +528,7 @@
(report-currency (op-value gnc:pagename-general optname-report-currency))
(price-source (op-value gnc:pagename-general optname-price-source))
(multi-totals-p (op-value gnc:pagename-general optname-multicurrency-totals))
+ (show-zeros (op-value gnc:pagename-general optname-show-zeros))
(heading-list (make-heading-list))
(exchange-fn (gnc:case-exchange-fn price-source report-currency report-date))
(total-collector-list (make-collector-list))
@@ -564,7 +574,7 @@
(update-company-hash companys
split
interval-vec
- reverse?))
+ reverse? show-zeros))
splits)
; (gnc:debug "companys" companys)
;; turn the hash into a list
More information about the gnucash-changes
mailing list