mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Andrew Sackville-West's patch to show zero balance entries in the
payables and receivables aging reports. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13612 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
c9bd69b302
commit
808a35ae99
@ -1,5 +1,9 @@
|
||||
2006-03-12 David Hampton <hampton@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
|
||||
|
@ -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 @@ more than one currency. This report is not designed to cope with this possibili
|
||||
;; 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 @@ more than one currency. This report is not designed to cope with this possibili
|
||||
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 @@ totals to report currency")
|
||||
(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 @@ totals to report currency")
|
||||
(update-company-hash companys
|
||||
split
|
||||
interval-vec
|
||||
reverse?))
|
||||
reverse? show-zeros))
|
||||
splits)
|
||||
; (gnc:debug "companys" companys)
|
||||
;; turn the hash into a list
|
||||
|
Loading…
Reference in New Issue
Block a user