[Gnucash-changes] Fabien COELHO's zero-balance patch.

Derek Atkins warlord at cvs.gnucash.org
Mon Apr 19 23:48:27 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.

Tags:
----
gnucash-1-8-branch

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.1461.2.325
retrieving revision 1.1461.2.326
diff -LChangeLog -LChangeLog -u -r1.1461.2.325 -r1.1461.2.326
--- 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  Christian Stimming  <stimming at tuhh.de>
 
 	* po/cs.po: Update Czech translation by Miloslav Trmac
Index: pnl.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/standard-reports/pnl.scm,v
retrieving revision 1.12
retrieving revision 1.12.2.1
diff -Lsrc/report/standard-reports/pnl.scm -Lsrc/report/standard-reports/pnl.scm -u -r1.12 -r1.12.2.1
--- 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.11.2.3
retrieving revision 1.11.2.4
diff -Lsrc/report/standard-reports/balance-sheet.scm -Lsrc/report/standard-reports/balance-sheet.scm -u -r1.11.2.3 -r1.11.2.4
--- 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