"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "gnucash/report/reports/standard/income-statement.scm" between
gnucash-5.0.tar.bz2 and gnucash-5.1.tar.bz2

About: GnuCash is personal and small-business financial-accounting software.

income-statement.scm  (gnucash-5.0.tar.bz2):income-statement.scm  (gnucash-5.1.tar.bz2)
skipping to change at line 149 skipping to change at line 149
;; period over which to report income ;; period over which to report income
(gnc:options-add-date-interval! (gnc:options-add-date-interval!
options gnc:pagename-general options gnc:pagename-general
optname-start-date optname-end-date "c") optname-start-date optname-end-date "c")
;; accounts to work on ;; accounts to work on
(gnc-register-account-list-option options (gnc-register-account-list-option options
gnc:pagename-accounts optname-accounts gnc:pagename-accounts optname-accounts
"a" "a"
opthelp-accounts opthelp-accounts
(gnc:filter-accountlist-type (gnc:filter-accountlist-type
;; select, by default, only income and expense accounts ;; select, by default, only income and expense accounts
(list ACCT-TYPE-INCOME ACCT-TYPE-EXPENSE) (list ACCT-TYPE-INCOME ACCT-TYPE-EXPENSE)
(gnc-account-get-descendants-sorted (gnc-get-current-root-account)))) (gnc-account-get-descendants-sorted (gnc-get-current-root-account))))
(gnc:options-add-account-levels! (gnc:options-add-account-levels!
options gnc:pagename-accounts optname-depth-limit options gnc:pagename-accounts optname-depth-limit
"b" opthelp-depth-limit 3) "b" opthelp-depth-limit 3)
(gnc-register-simple-boolean-option options (gnc-register-simple-boolean-option options
gnc:pagename-accounts optname-bottom-behavior gnc:pagename-accounts optname-bottom-behavior
"c" opthelp-bottom-behavior #f) "c" opthelp-bottom-behavior #f)
;; all about currencies ;; all about currencies
(gnc:options-add-currency! (gnc:options-add-currency!
skipping to change at line 261 skipping to change at line 261
(define (income-statement-renderer-internal report-obj reportname) (define (income-statement-renderer-internal report-obj reportname)
(define (get-option pagename optname) (define (get-option pagename optname)
(gnc-optiondb-lookup-value (gnc-optiondb-lookup-value
(gnc:report-options report-obj) pagename optname)) (gnc:report-options report-obj) pagename optname))
(gnc:report-starting reportname) (gnc:report-starting reportname)
;; get all option's values ;; get all option's values
(let* ( (let* (
(report-title (get-option gnc:pagename-general optname-report-title)) (report-title (get-option gnc:pagename-general optname-report-title))
(company-name (or (gnc:company-info (gnc-get-current-book) gnc:*company- (company-name (or (gnc:company-info (gnc-get-current-book) gnc:*company
name*) "")) -name*) ""))
(start-date-printable (gnc:date-option-absolute-time (start-date-printable (gnc:date-option-absolute-time
(get-option gnc:pagename-general (get-option gnc:pagename-general
optname-start-date))) optname-start-date)))
(start-date (gnc:time64-start-day-time (start-date (gnc:time64-start-day-time
(gnc:date-option-absolute-time (gnc:date-option-absolute-time
(get-option gnc:pagename-general (get-option gnc:pagename-general
optname-start-date)))) optname-start-date))))
(end-date (gnc:time64-end-day-time (end-date (gnc:time64-end-day-time
(gnc:date-option-absolute-time (gnc:date-option-absolute-time
(get-option gnc:pagename-general (get-option gnc:pagename-general
optname-end-date)))) optname-end-date))))
(accounts (get-option gnc:pagename-accounts (accounts (get-option gnc:pagename-accounts
optname-accounts)) optname-accounts))
(depth-limit (get-option gnc:pagename-accounts (depth-limit (get-option gnc:pagename-accounts
optname-depth-limit)) optname-depth-limit))
(bottom-behavior (get-option gnc:pagename-accounts (bottom-behavior (get-option gnc:pagename-accounts
optname-bottom-behavior)) optname-bottom-behavior))
(report-commodity (get-option pagename-commodities (report-commodity (get-option pagename-commodities
optname-report-commodity)) optname-report-commodity))
(price-source (get-option pagename-commodities (price-source (get-option pagename-commodities
optname-price-source)) optname-price-source))
(show-fcur? (get-option pagename-commodities (show-fcur? (get-option pagename-commodities
optname-show-foreign)) optname-show-foreign))
(show-rates? (get-option pagename-commodities (show-rates? (get-option pagename-commodities
optname-show-rates)) optname-show-rates))
(parent-balance-mode (get-option gnc:pagename-display (parent-balance-mode (get-option gnc:pagename-display
optname-parent-balance-mode)) optname-parent-balance-mode))
(parent-total-mode (parent-total-mode
(assq-ref '((t . #t) (f . #f)) (assq-ref '((t . #t) (f . #f))
(get-option gnc:pagename-display (get-option gnc:pagename-display
optname-parent-total-mode))) optname-parent-total-mode)))
(show-zb-accts? (get-option gnc:pagename-display (show-zb-accts? (get-option gnc:pagename-display
optname-show-zb-accts)) optname-show-zb-accts))
(omit-zb-bals? (get-option gnc:pagename-display (omit-zb-bals? (get-option gnc:pagename-display
optname-omit-zb-bals)) optname-omit-zb-bals))
(label-revenue? (get-option gnc:pagename-display (label-revenue? (get-option gnc:pagename-display
optname-label-revenue)) optname-label-revenue))
(total-revenue? (get-option gnc:pagename-display (total-revenue? (get-option gnc:pagename-display
optname-total-revenue)) optname-total-revenue))
(label-trading? (get-option gnc:pagename-display (label-trading? (get-option gnc:pagename-display
optname-label-trading)) optname-label-trading))
(total-trading? (get-option gnc:pagename-display (total-trading? (get-option gnc:pagename-display
optname-total-trading)) optname-total-trading))
(label-expense? (get-option gnc:pagename-display (label-expense? (get-option gnc:pagename-display
optname-label-expense)) optname-label-expense))
(total-expense? (get-option gnc:pagename-display (total-expense? (get-option gnc:pagename-display
optname-total-expense)) optname-total-expense))
(use-links? (get-option gnc:pagename-display (use-links? (get-option gnc:pagename-display
optname-account-links)) optname-account-links))
(use-rules? (get-option gnc:pagename-display (use-rules? (get-option gnc:pagename-display
optname-use-rules)) optname-use-rules))
(closing-str (get-option pagename-entries (closing-str (get-option pagename-entries
optname-closing-pattern)) optname-closing-pattern))
(closing-cased (get-option pagename-entries (closing-cased (get-option pagename-entries
optname-closing-casing)) optname-closing-casing))
(closing-regexp (get-option pagename-entries (closing-regexp (get-option pagename-entries
optname-closing-regexp)) optname-closing-regexp))
(two-column? (get-option gnc:pagename-display (two-column? (get-option gnc:pagename-display
optname-two-column)) optname-two-column))
(standard-order? (get-option gnc:pagename-display (standard-order? (get-option gnc:pagename-display
optname-standard-order)) optname-standard-order))
(closing-pattern (closing-pattern
(list (list 'str closing-str) (list (list 'str closing-str)
(list 'cased closing-cased) (list 'cased closing-cased)
(list 'regexp closing-regexp) (list 'regexp closing-regexp)
(list 'closing #t))) (list 'closing #t)))
;; decompose the account list ;; decompose the account list
(split-up-accounts (gnc:decompose-accountlist accounts)) (split-up-accounts (gnc:decompose-accountlist accounts))
(revenue-accounts (assoc-ref split-up-accounts ACCT-TYPE-INCOME)) (revenue-accounts (assoc-ref split-up-accounts ACCT-TYPE-INCOME))
(trading-accounts (assoc-ref split-up-accounts ACCT-TYPE-TRADING)) (trading-accounts (assoc-ref split-up-accounts ACCT-TYPE-TRADING))
(expense-accounts (assoc-ref split-up-accounts ACCT-TYPE-EXPENSE)) (expense-accounts (assoc-ref split-up-accounts ACCT-TYPE-EXPENSE))
(doc (gnc:make-html-document)) (doc (gnc:make-html-document))
;; this can occasionally put extra (blank) columns in our ;; this can occasionally put extra (blank) columns in our
;; table (when there is one account at the maximum depth and ;; table (when there is one account at the maximum depth and
;; it has at least one of its ancestors deselected), but this ;; it has at least one of its ancestors deselected), but this
;; is the only simple way to ensure that both tables ;; is the only simple way to ensure that both tables
;; (revenue, expense) have the same width. ;; (revenue, expense) have the same width.
(tree-depth (if (equal? depth-limit 'all) (tree-depth (if (equal? depth-limit 'all)
(gnc:get-current-account-tree-depth) (gnc:get-current-account-tree-depth)
depth-limit)) depth-limit))
;; exchange rates calculation parameters ;; exchange rates calculation parameters
(exchange-fn (exchange-fn
(gnc:case-exchange-fn price-source report-commodity end-date)) (gnc:case-exchange-fn price-source report-commodity end-date))
(price-fn (gnc:case-price-fn price-source report-commodity end-date))) (price-fn (gnc:case-price-fn price-source report-commodity end-date)))
;; Wrapper to call gnc:html-table-add-labeled-amount-line! ;; Wrapper to call gnc:html-table-add-labeled-amount-line!
;; with the proper arguments. ;; with the proper arguments.
(define (add-subtotal-line table pos-label neg-label signed-balance) (define (add-subtotal-line table pos-label neg-label signed-balance)
(let* ((neg? (and signed-balance neg-label (let* ((neg? (and signed-balance neg-label
(negative? (negative?
(gnc:gnc-monetary-amount (gnc:gnc-monetary-amount
(gnc:sum-collector-commodity (gnc:sum-collector-commodity
signed-balance report-commodity exchange-fn))))) signed-balance report-commodity exchange-fn)))))
 End of changes. 21 change blocks. 
58 lines changed or deleted 58 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)