mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[budget] compact gnc:html-table-add-budget-line!
This commit is contained in:
parent
953b01cbc8
commit
3ba0970d9d
@ -355,13 +355,12 @@
|
|||||||
(define (gnc:html-table-add-budget-line!
|
(define (gnc:html-table-add-budget-line!
|
||||||
html-table rownum colnum budget acct rollup-budget?
|
html-table rownum colnum budget acct rollup-budget?
|
||||||
column-list exchange-fn)
|
column-list exchange-fn)
|
||||||
(let* ((current-col (+ colnum 1))
|
(let* ((current-col (1+ colnum))
|
||||||
(bgt-total 0)
|
(bgt-total 0)
|
||||||
(bgt-total-unset? #t)
|
|
||||||
(act-total 0)
|
(act-total 0)
|
||||||
(comm (xaccAccountGetCommodity acct))
|
(comm (xaccAccountGetCommodity acct))
|
||||||
(reverse-balance? (gnc-reverse-balance acct))
|
(reverse-balance? (gnc-reverse-balance acct))
|
||||||
(income-acct? (eq? (xaccAccountGetType acct) ACCT-TYPE-INCOME)))
|
(income-acct? (eqv? (xaccAccountGetType acct) ACCT-TYPE-INCOME)))
|
||||||
|
|
||||||
;; Displays a set of budget column values
|
;; Displays a set of budget column values
|
||||||
;;
|
;;
|
||||||
@ -450,22 +449,27 @@
|
|||||||
html-table rownum #f
|
html-table rownum #f
|
||||||
bgt-numeric-val act-numeric-val dif-numeric-val)))
|
bgt-numeric-val act-numeric-val dif-numeric-val)))
|
||||||
|
|
||||||
(while (not (null? column-list))
|
(let loop ((column-list column-list))
|
||||||
(let* ((col-info (car column-list)))
|
(cond
|
||||||
(cond
|
|
||||||
((equal? col-info 'total)
|
((null? column-list)
|
||||||
(gnc:html-table-display-budget-columns!
|
#f)
|
||||||
html-table rownum #t bgt-total act-total
|
|
||||||
(if income-acct?
|
((eq? (car column-list) 'total)
|
||||||
(- act-total bgt-total)
|
(gnc:html-table-display-budget-columns!
|
||||||
(- bgt-total act-total))))
|
html-table rownum #t bgt-total act-total
|
||||||
((list? col-info)
|
(if income-acct?
|
||||||
(gnc:html-table-add-budget-line-columns!
|
(- act-total bgt-total)
|
||||||
html-table rownum budget acct col-info))
|
(- bgt-total act-total)))
|
||||||
(else
|
(loop (cdr column-list)))
|
||||||
(gnc:html-table-add-budget-line-columns!
|
|
||||||
html-table rownum budget acct (list col-info))))
|
(else
|
||||||
(set! column-list (cdr column-list))))))
|
(gnc:html-table-add-budget-line-columns!
|
||||||
|
html-table rownum budget acct
|
||||||
|
(if (list? (car column-list))
|
||||||
|
(car column-list)
|
||||||
|
(list (car column-list))))
|
||||||
|
(loop (cdr column-list)))))))
|
||||||
|
|
||||||
;; Adds header rows to the budget report. The columns are
|
;; Adds header rows to the budget report. The columns are
|
||||||
;; specified by the column-list parameter.
|
;; specified by the column-list parameter.
|
||||||
|
Loading…
Reference in New Issue
Block a user