mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
* src/scm/report/pnl.scm: convert to guile module.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@4743 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
1514fcd828
commit
f375b0c95a
@ -22,33 +22,35 @@
|
|||||||
;;
|
;;
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
(gnc:support "report/pnl.scm")
|
;; depends must be outside module scope -- and should eventually go away.
|
||||||
(gnc:depend "report-html.scm")
|
(gnc:depend "report-html.scm")
|
||||||
|
|
||||||
|
(define-module (gnucash report pnl))
|
||||||
|
|
||||||
;; Profit and loss report. Actually, people in finances might want
|
;; Profit and loss report. Actually, people in finances might want
|
||||||
;; something different under this name, but they are welcomed to
|
;; something different under this name, but they are welcomed to
|
||||||
;; contribute their changes :-)
|
;; contribute their changes :-)
|
||||||
|
|
||||||
;; first define all option's names so that they are properly defined
|
;; first define all option's names so that they are properly defined
|
||||||
;; in *one* place.
|
;; in *one* place.
|
||||||
(let* ((optname-from-date (N_ "From"))
|
(define optname-from-date (N_ "From"))
|
||||||
(optname-to-date (N_ "To"))
|
(define optname-to-date (N_ "To"))
|
||||||
|
|
||||||
(optname-display-depth (N_ "Account Display Depth"))
|
(define optname-display-depth (N_ "Account Display Depth"))
|
||||||
(optname-show-subaccounts (N_ "Always show sub-accounts"))
|
(define optname-show-subaccounts (N_ "Always show sub-accounts"))
|
||||||
(optname-accounts (N_ "Account"))
|
(define optname-accounts (N_ "Account"))
|
||||||
|
|
||||||
(optname-group-accounts (N_ "Group the accounts"))
|
(define optname-group-accounts (N_ "Group the accounts"))
|
||||||
(optname-show-parent-balance (N_ "Show balances for parent accounts"))
|
(define optname-show-parent-balance (N_ "Show balances for parent accounts"))
|
||||||
(optname-show-parent-total (N_ "Show subtotals"))
|
(define optname-show-parent-total (N_ "Show subtotals"))
|
||||||
|
|
||||||
(optname-show-foreign (N_ "Show Foreign Currencies"))
|
(define optname-show-foreign (N_ "Show Foreign Currencies"))
|
||||||
(optname-report-currency (N_ "Report's currency"))
|
(define optname-report-currency (N_ "Report's currency"))
|
||||||
(optname-price-source (N_ "Price Source"))
|
(define optname-price-source (N_ "Price Source"))
|
||||||
(optname-show-rates (N_ "Show Exchange Rates")))
|
(define optname-show-rates (N_ "Show Exchange Rates"))
|
||||||
|
|
||||||
;; options generator
|
;; options generator
|
||||||
(define (pnl-options-generator)
|
(define (pnl-options-generator)
|
||||||
(let ((options (gnc:new-options)))
|
(let ((options (gnc:new-options)))
|
||||||
|
|
||||||
;; date at which to report balance
|
;; date at which to report balance
|
||||||
@ -111,11 +113,11 @@
|
|||||||
options))
|
options))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; pnl-renderer
|
;; pnl-renderer
|
||||||
;; set up the document and add the table
|
;; set up the document and add the table
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
(define (pnl-renderer report-obj)
|
(define (pnl-renderer report-obj)
|
||||||
(define (get-option pagename optname)
|
(define (get-option pagename optname)
|
||||||
(gnc:option-value
|
(gnc:option-value
|
||||||
(gnc:lookup-option
|
(gnc:lookup-option
|
||||||
@ -199,9 +201,9 @@
|
|||||||
doc (gnc:html-make-no-account-warning report-title)))
|
doc (gnc:html-make-no-account-warning report-title)))
|
||||||
doc))
|
doc))
|
||||||
|
|
||||||
(gnc:define-report
|
(gnc:define-report
|
||||||
'version 1
|
'version 1
|
||||||
'name (N_ "Profit And Loss")
|
'name (N_ "Profit And Loss")
|
||||||
'menu-path (list gnc:menuname-income-expense)
|
'menu-path (list gnc:menuname-income-expense)
|
||||||
'options-generator pnl-options-generator
|
'options-generator pnl-options-generator
|
||||||
'renderer pnl-renderer))
|
'renderer pnl-renderer)
|
||||||
|
Loading…
Reference in New Issue
Block a user