[Gnucash-changes] Fabien COELHO's zero-balance patch.
Derek Atkins
warlord at cvs.gnucash.org
Mon Apr 19 23:48:12 EDT 2004
Log Message:
-----------
Fabien COELHO's zero-balance patch.
* src/report/standard-reports/balance-sheet.scm:
* src/report/standard-reports/pnl.scm:
Fabien COELHO's zero-balance patch to remove accounts of
zero balance from the report.
Modified Files:
--------------
gnucash:
ChangeLog
gnucash/src/report/standard-reports:
balance-sheet.scm
pnl.scm
Revision Data
-------------
Index: ChangeLog
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/ChangeLog,v
retrieving revision 1.1803
retrieving revision 1.1804
diff -LChangeLog -LChangeLog -u -r1.1803 -r1.1804
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,10 @@
+2004-04-19 Derek Atkins <derek at ihtfp.com>
+
+ * src/report/standard-reports/balance-sheet.scm:
+ * src/report/standard-reports/pnl.scm:
+ Fabien COELHO's zero-balance patch to remove accounts of
+ zero balance from the report.
+
2004-04-18 Derek Atkins <derek at ihtfp.com>
* src/engine/Transaction.c: fix a comment to better explain why
Index: pnl.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/standard-reports/pnl.scm,v
retrieving revision 1.12
retrieving revision 1.13
diff -Lsrc/report/standard-reports/pnl.scm -Lsrc/report/standard-reports/pnl.scm -u -r1.12 -r1.13
--- src/report/standard-reports/pnl.scm
+++ src/report/standard-reports/pnl.scm
@@ -56,6 +56,7 @@
(define optname-report-currency (N_ "Report's currency"))
(define optname-price-source (N_ "Price Source"))
(define optname-show-rates (N_ "Show Exchange Rates"))
+(define optname-show-zeros (N_ "Show accounts with a 0.0 total"))
;; options generator
(define (pnl-options-generator)
@@ -116,6 +117,12 @@
gnc:pagename-display optname-show-rates
"f" (N_ "Show the exchange rates used") #t))
+ (gnc:register-option
+ options
+ (gnc:make-simple-boolean-option
+ gnc:pagename-display optname-show-zeros
+ "g" (N_ "Show account with 0.0 balance") #t))
+
;; Set the general page as default option tab
(gnc:options-set-default-section options gnc:pagename-general)
@@ -156,6 +163,8 @@
optname-price-source))
(show-rates? (get-option gnc:pagename-display
optname-show-rates))
+ (show-zeros? (get-option gnc:pagename-display
+ optname-show-zeros))
(to-date-tp (gnc:timepair-end-day-time
(gnc:date-option-absolute-time
(get-option gnc:pagename-general
@@ -197,7 +206,7 @@
#t gnc:accounts-get-comm-total-profit
(_ "Profit") do-grouping?
show-parent-balance? show-parent-total?
- show-fcur? report-currency exchange-fn #t))
+ show-fcur? report-currency exchange-fn show-zeros?))
;; add the table
(gnc:html-document-add-object! doc table)
Index: balance-sheet.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/standard-reports/balance-sheet.scm,v
retrieving revision 1.14
retrieving revision 1.15
diff -Lsrc/report/standard-reports/balance-sheet.scm -Lsrc/report/standard-reports/balance-sheet.scm -u -r1.14 -r1.15
--- src/report/standard-reports/balance-sheet.scm
+++ src/report/standard-reports/balance-sheet.scm
@@ -52,6 +52,7 @@
(define optname-price-source (N_ "Price Source"))
(define optname-show-foreign (N_ "Show Foreign Currencies"))
(define optname-show-rates (N_ "Show Exchange Rates"))
+(define optname-show-zeros (N_ "Show accounts with zero balance"))
;; Moderatly ugly hack here, i.e. this depends on the internal
;; structure of html-table -- if that is changed, this might break.
@@ -153,6 +154,12 @@
gnc:pagename-display optname-show-rates
"f" (N_ "Show the exchange rates used") #f))
+ (gnc:register-option
+ options
+ (gnc:make-simple-boolean-option
+ gnc:pagename-display optname-show-zeros
+ "g" (N_ "Show accounts with a 0.0 total") #t))
+
;; Set the general page as default option tab
(gnc:options-set-default-section options gnc:pagename-general)
@@ -190,6 +197,8 @@
optname-price-source))
(show-rates? (get-option gnc:pagename-display
optname-show-rates))
+ (show-zeros? (get-option gnc:pagename-display
+ optname-show-zeros))
(from-date-printable (gnc:date-option-absolute-time
(get-option gnc:pagename-general
optname-from-date)))
@@ -315,7 +324,7 @@
30 20
#f #f #f #f #f
show-parent-balance? show-parent-total?
- show-fcur? report-currency exchange-fn #t))
+ show-fcur? report-currency exchange-fn show-zeros?))
(set! liability-table
(gnc:html-build-acct-table
#f to-date-tp
@@ -324,7 +333,7 @@
50 20
#f #f #f #f #f
show-parent-balance? show-parent-total?
- show-fcur? report-currency exchange-fn #t))
+ show-fcur? report-currency exchange-fn show-zeros?))
(set! equity-table
(gnc:html-build-acct-table
#f to-date-tp
@@ -333,7 +342,7 @@
70 10
#f #f #f #f #f
show-parent-balance? show-parent-total?
- show-fcur? report-currency exchange-fn #t))
+ show-fcur? report-currency exchange-fn show-zeros?))
(net-profit-balance 'minusmerge
neg-net-profit-balance
More information about the Gnucash-changes
mailing list