mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[trial-balance] upgrade coll-plus and coll-minus to report-wide fns
This commit is contained in:
parent
f88c54bb50
commit
acf359a797
@ -316,6 +316,19 @@
|
||||
|
||||
options))
|
||||
|
||||
;; (coll-plus collectors ...) equiv to (+ collectors ...)
|
||||
(define (coll-plus . collectors)
|
||||
(let ((res (gnc:make-commodity-collector)))
|
||||
(for-each (lambda (coll) (res 'merge coll #f)) collectors)
|
||||
res))
|
||||
|
||||
;; (coll-minus collectors ...) equiv to (- collector0 collector1 ...)
|
||||
(define (coll-minus . collectors)
|
||||
(let ((res (gnc:make-commodity-collector)))
|
||||
(res 'merge (car collectors) #f)
|
||||
(for-each (lambda (coll) (res 'minusmerge coll #f)) (cdr collectors))
|
||||
res))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; trial-balance-renderer
|
||||
;; set up the document and add the table
|
||||
@ -665,12 +678,6 @@
|
||||
splits)
|
||||
total))
|
||||
|
||||
(define (coll-minus . collectors)
|
||||
(let ((res (gnc:make-commodity-collector)))
|
||||
(res 'merge (car collectors) #f)
|
||||
(for-each (lambda (mon) (res 'minusmerge mon #f)) (cdr collectors))
|
||||
res))
|
||||
|
||||
(while (< row rows)
|
||||
(let* ((env (gnc:html-acct-table-get-row-env acct-table row))
|
||||
(acct (get-val env 'account))
|
||||
|
Loading…
Reference in New Issue
Block a user