mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[net-charts] rename variables to mathematical terms
This report seems to have evolved from a pure asset-liability chart. It handles income-expense too, so rename to minuend-subtrahend to be generic. Also report percentages done.
This commit is contained in:
parent
3f2a9022bf
commit
b1f03ecd9e
@ -407,14 +407,19 @@
|
|||||||
(if
|
(if
|
||||||
(not (null? accounts))
|
(not (null? accounts))
|
||||||
(let* ((account-balancelist (map account->balancelist accounts))
|
(let* ((account-balancelist (map account->balancelist accounts))
|
||||||
(assets-list (process-datelist
|
(dummy (gnc:report-percent-done 60))
|
||||||
account-balancelist
|
|
||||||
dates-list #t))
|
|
||||||
(liability-list (process-datelist
|
|
||||||
account-balancelist
|
|
||||||
dates-list #f))
|
|
||||||
|
|
||||||
(net-list (map monetary+ assets-list liability-list))
|
(minuend-balances (process-datelist
|
||||||
|
account-balancelist
|
||||||
|
dates-list #t))
|
||||||
|
(dummy (gnc:report-percent-done 70))
|
||||||
|
|
||||||
|
(subtrahend-balances (process-datelist
|
||||||
|
account-balancelist
|
||||||
|
dates-list #f))
|
||||||
|
(dummy (gnc:report-percent-done 80))
|
||||||
|
|
||||||
|
(difference-balances (map monetary+ minuend-balances subtrahend-balances))
|
||||||
|
|
||||||
(dates-list (if inc-exp?
|
(dates-list (if inc-exp?
|
||||||
(list-head dates-list (1- (length dates-list)))
|
(list-head dates-list (1- (length dates-list)))
|
||||||
@ -463,15 +468,12 @@
|
|||||||
chart (gnc-commodity-get-mnemonic report-currency))
|
chart (gnc-commodity-get-mnemonic report-currency))
|
||||||
|
|
||||||
;; Add the data
|
;; Add the data
|
||||||
(if show-sep?
|
(when show-sep?
|
||||||
(begin
|
(add-column! (map monetary->double minuend-balances))
|
||||||
(add-column! (map monetary->double assets-list))
|
(add-column! (map - (map monetary->double subtrahend-balances))))
|
||||||
(add-column! ;;(if inc-exp?
|
|
||||||
(map - (map monetary->double liability-list))
|
|
||||||
;;liability-list)
|
|
||||||
)))
|
|
||||||
(if show-net?
|
(if show-net?
|
||||||
(add-column! (map monetary->double net-list)))
|
(add-column! (map monetary->double difference-balances)))
|
||||||
|
|
||||||
;; Legend labels, colors
|
;; Legend labels, colors
|
||||||
((if linechart?
|
((if linechart?
|
||||||
@ -567,18 +569,15 @@
|
|||||||
(if inc-exp?
|
(if inc-exp?
|
||||||
(list (_ "Net Profit"))
|
(list (_ "Net Profit"))
|
||||||
(list (_ "Net Worth")))
|
(list (_ "Net Worth")))
|
||||||
'()))
|
'())))
|
||||||
)
|
|
||||||
(gnc:html-table-append-column! table date-string-list)
|
(gnc:html-table-append-column! table date-string-list)
|
||||||
(if show-sep?
|
(when show-sep?
|
||||||
(begin
|
(gnc:html-table-append-column! table minuend-balances)
|
||||||
(gnc:html-table-append-column! table assets-list)
|
(gnc:html-table-append-column! table subtrahend-balances))
|
||||||
(gnc:html-table-append-column! table liability-list)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(if show-net?
|
(if show-net?
|
||||||
(gnc:html-table-append-column! table net-list)
|
(gnc:html-table-append-column! table difference-balances))
|
||||||
)
|
|
||||||
;; set numeric columns to align right
|
;; set numeric columns to align right
|
||||||
(for-each
|
(for-each
|
||||||
(lambda (col)
|
(lambda (col)
|
||||||
|
Loading…
Reference in New Issue
Block a user