Em Dom, 2009-01-18 às 18:10 -0200, Marco Túlio Gontijo e Silva escreveu: > I've made a patch that include some options in the Trial Balance Report. > I searched for a behaviour like this in all reports, and I thought the > easier way was to change trial-balance.
Sorry, I sent the scheme file instead of the patch. Now, the right one. Thanks. -- marcot http://marcot.iaaeee.org/
Index: src/report/standard-reports/trial-balance.scm =================================================================== --- src/report/standard-reports/trial-balance.scm (revisão 17829) +++ src/report/standard-reports/trial-balance.scm (cópia de trabalho) @@ -122,6 +122,14 @@ (define opthelp-show-zb-accts (N_ "Include accounts with zero total (recursive) balances in this report")) +(define optname-parent-balance-mode (N_ "Parent account balances")) +(define optname-parent-total-mode (N_ "Parent account subtotals")) +(define optname-omit-zb-bals (N_ "Omit zero balance figures")) +(define opthelp-omit-zb-bals + (N_ "Show blank space in place of any zero balances which would be shown")) +(define optname-use-rules (N_ "Show accounting-style rules")) +(define opthelp-use-rules + (N_ "Use rules beneath columns of added numbers like accountants do")) (define optname-account-links (N_ "Display accounts as hyperlinks")) (define opthelp-account-links (N_ "Shows each account in the table as a hyperlink to its register window")) @@ -267,6 +275,18 @@ ;; gnc:pagename-display optname-show-zb-accts ;; "a" opthelp-show-zb-accts #t)) + (gnc:options-add-subtotal-view! + options gnc:pagename-display + optname-parent-balance-mode optname-parent-total-mode + "c") + (add-option + (gnc:make-simple-boolean-option + gnc:pagename-display optname-omit-zb-bals + "b" opthelp-omit-zb-bals #f)) + (add-option + (gnc:make-simple-boolean-option + gnc:pagename-display optname-use-rules + "f" opthelp-use-rules #f)) ;; some detailed formatting options (add-option (gnc:make-simple-boolean-option @@ -339,6 +359,18 @@ ;;(show-zb-accts? (get-option gnc:pagename-display ;; optname-show-zb-accts)) (show-zb-accts? #t) ;; see FIXME above + + (parent-balance-mode (get-option gnc:pagename-display + optname-parent-balance-mode)) + (parent-total-mode + (car + (assoc-ref '((t #t) (f #f) (canonically-tabbed canonically-tabbed)) + (get-option gnc:pagename-display + optname-parent-total-mode)))) + (omit-zb-bals? (get-option gnc:pagename-display + optname-omit-zb-bals)) + (use-rules? (get-option gnc:pagename-display + optname-use-rules)) (use-links? (get-option gnc:pagename-display optname-account-links)) (indent 0) @@ -570,14 +602,14 @@ (set! table-env (list - (list 'start-date #f) + (list 'start-date start-date-tp) (list 'end-date end-date-tp) (list 'display-tree-depth (if (integer? depth-limit) depth-limit #f)) (list 'depth-limit-behavior 'flatten) (list 'report-commodity report-commodity) (list 'exchange-fn exchange-fn) - (list 'parent-account-subtotal-mode #f) + (list 'parent-account-subtotal-mode parent-total-mode) (list 'zero-balance-mode (if show-zb-accts? 'show-leaf-acct 'omit-leaf-acct)) @@ -589,6 +621,15 @@ (set! acct-table (gnc:make-html-acct-table/env/accts table-env all-accounts)) + (gnc:html-table-add-account-balances + build-table acct-table + (list + (list 'parent-account-balance-mode parent-balance-mode) + (list 'zero-balance-display-mode (if omit-zb-bals? + 'omit-balance + 'show-balance)) + (list 'multicommodity-mode (if show-fcur? 'table #f)) + (list 'rule-mode use-rules?))) (gnc:report-percent-done 80) (let* ((env (gnc:html-acct-table-get-row-env acct-table 0)))
_______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel