mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Christian Stimming's report patch.
* src/scm/report/average-balance.scm, category-barchart.scm, income-expense-graph.scm, net-worth-timeseries.scm, portfolio.scm: Added menu-path for reports. * src/scm/report/account-piecharts.scm: Report title is now fetched from Reportname option. Slices and legend now have different URLs. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3946 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
6239ae0777
commit
818eaefc66
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
||||
2001-04-11 Christian Stimming <stimming@tuhh.de>
|
||||
|
||||
* src/scm/report/average-balance.scm, category-barchart.scm,
|
||||
income-expense-graph.scm, net-worth-timeseries.scm, portfolio.scm:
|
||||
Added menu-path for reports.
|
||||
|
||||
* src/scm/report/account-piecharts.scm: Report title is now
|
||||
fetched from Reportname option. Slices and legend now have
|
||||
different URLs.
|
||||
|
||||
2001-04-11 Dave Peticolas <dave@krondo.com>
|
||||
|
||||
* src/gnome/dialog-commodities.c: more work
|
||||
|
@ -44,6 +44,9 @@
|
||||
(optname-to-date (N_ "To"))
|
||||
(optname-report-currency (N_ "Report's currency"))
|
||||
|
||||
;; defined in report.scm
|
||||
(optname-reportname "Report name")
|
||||
|
||||
(pagename-accounts (N_ "Accounts"))
|
||||
(optname-accounts (N_ "Accounts"))
|
||||
(optname-levels (N_ "Show Accounts until level"))
|
||||
@ -147,6 +150,7 @@
|
||||
(account-levels (op-value pagename-accounts optname-levels))
|
||||
(report-currency (op-value pagename-general
|
||||
optname-report-currency))
|
||||
(report-title (op-value pagename-general optname-reportname))
|
||||
|
||||
(show-fullname? (op-value pagename-display optname-fullname))
|
||||
(show-total? (op-value pagename-display optname-show-total))
|
||||
@ -269,16 +273,16 @@
|
||||
(gnc:report-anchor-text
|
||||
(gnc:make-report reportname options))))))
|
||||
|
||||
;; set the URLs
|
||||
(let ((urls
|
||||
;; set the URLs; the slices are links to other reports
|
||||
(gnc:html-piechart-set-button-1-slice-urls!
|
||||
chart
|
||||
(map
|
||||
(lambda (pair)
|
||||
(if (string? (cadr pair))
|
||||
other-anchor
|
||||
(let* ((acct (cadr pair))
|
||||
(subaccts
|
||||
(gnc:account-get-immediate-subaccounts
|
||||
acct)))
|
||||
(gnc:account-get-immediate-subaccounts acct)))
|
||||
(if (null? subaccts)
|
||||
;; if leaf-account, make this an anchor
|
||||
;; to the register.
|
||||
@ -294,10 +298,20 @@
|
||||
(list pagename-accounts optname-accounts
|
||||
(cons acct subaccts))
|
||||
(list pagename-accounts optname-levels
|
||||
(+ 1 tree-depth))))))))
|
||||
combined)))
|
||||
(gnc:html-piechart-set-button-1-slice-urls! chart urls)
|
||||
(gnc:html-piechart-set-button-1-legend-urls! chart urls))
|
||||
(+ 1 tree-depth))
|
||||
(list pagename-general optname-reportname
|
||||
((if show-fullname?
|
||||
gnc:account-get-full-name
|
||||
gnc:account-get-name) acct))))))))
|
||||
combined))
|
||||
|
||||
(gnc:html-piechart-set-button-1-legend-urls!
|
||||
chart (map
|
||||
(lambda (pair)
|
||||
(if (string? (cadr pair))
|
||||
other-anchor
|
||||
(gnc:account-anchor-text (cadr pair))))
|
||||
combined))
|
||||
|
||||
(gnc:html-piechart-set-title!
|
||||
chart report-title)
|
||||
@ -324,9 +338,9 @@
|
||||
|
||||
"")))
|
||||
|
||||
(gnc:html-piechart-set-labels!
|
||||
chart
|
||||
(map (lambda (pair)
|
||||
(let ((urls
|
||||
(map
|
||||
(lambda (pair)
|
||||
(string-append
|
||||
(if (string? (cadr pair))
|
||||
(cadr pair)
|
||||
@ -338,7 +352,8 @@
|
||||
" - "
|
||||
(gnc:amount->string (car pair) print-info))
|
||||
"")))
|
||||
combined))
|
||||
combined)))
|
||||
(gnc:html-piechart-set-labels! chart urls))
|
||||
|
||||
(gnc:html-document-add-object! document chart)
|
||||
|
||||
@ -349,6 +364,9 @@
|
||||
(gnc:define-report
|
||||
'version 1
|
||||
'name (car l)
|
||||
'menu-path (if (cadddr l)
|
||||
(list "_Income & Expense")
|
||||
(list "_Assets & Liabilities"))
|
||||
'options-generator (lambda () (options-generator (cadr l)
|
||||
(cadddr l)))
|
||||
'renderer (lambda (report-obj)
|
||||
|
@ -417,5 +417,6 @@
|
||||
(gnc:define-report
|
||||
'version 1
|
||||
'name (N_ "Average Balance")
|
||||
'menu-path (list "_Assets & Liabilities")
|
||||
'options-generator options-generator
|
||||
'renderer renderer))
|
||||
|
@ -378,8 +378,10 @@
|
||||
(lambda (l)
|
||||
(gnc:define-report
|
||||
'version 1
|
||||
;; why I use a variable here? See comment at the top.
|
||||
'name (car l)
|
||||
'menu-path (if (cadddr l)
|
||||
(list "_Income & Expense")
|
||||
(list "_Assets & Liabilities"))
|
||||
'options-generator (lambda () (options-generator (cadr l)))
|
||||
'renderer (lambda (report-obj)
|
||||
(category-barchart-renderer report-obj
|
||||
|
@ -212,6 +212,7 @@
|
||||
;; untranslated value here!
|
||||
'name (N_ "Income/Expense Chart")
|
||||
|
||||
'menu-path (list "_Income & Expense")
|
||||
;; The options generator function defined above.
|
||||
'options-generator options-generator
|
||||
|
||||
|
@ -229,6 +229,8 @@
|
||||
;; untranslated value here!
|
||||
'name (N_ "Net Worth Barchart")
|
||||
|
||||
'menu-path (list "_Assets & Liabilities")
|
||||
|
||||
;; The options generator function defined above.
|
||||
'options-generator options-generator
|
||||
|
||||
|
@ -163,6 +163,7 @@
|
||||
;; untranslated value here!
|
||||
'name (N_ "Investment Portfolio")
|
||||
|
||||
'menu-path (list "_Assets & Liabilities")
|
||||
;; The options generator function defined above.
|
||||
'options-generator options-generator
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user