[Gnucash-changes] r13709 - gnucash/trunk - Move gnc:options-add-subtotal-view! options from income-statement,

Christian Stimming cstim at cvs.gnucash.org
Tue Mar 28 16:19:30 EST 2006


Author: cstim
Date: 2006-03-28 16:19:29 -0500 (Tue, 28 Mar 2006)
New Revision: 13709
Trac: http://svn.gnucash.org/trac/changeset/13709

Modified:
   gnucash/trunk/ChangeLog
   gnucash/trunk/src/report/report-system/options-utilities.scm
   gnucash/trunk/src/report/report-system/report-system.scm
   gnucash/trunk/src/report/standard-reports/account-summary.scm
   gnucash/trunk/src/report/standard-reports/balance-sheet.scm
   gnucash/trunk/src/report/standard-reports/income-statement.scm
Log:
Move gnc:options-add-subtotal-view! options from income-statement,
account-summary, and balance-sheet to option-utilisies.scm. Try to
clarify the wording of the option -- any native english speaker please
feel free to correct the wording even more.



Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog	2006-03-28 20:31:17 UTC (rev 13708)
+++ gnucash/trunk/ChangeLog	2006-03-28 21:19:29 UTC (rev 13709)
@@ -1,5 +1,11 @@
 2006-03-28  Christian Stimming  <stimming at tuhh.de>
 
+	* src/report/report-system/options-utilities.scm: Move
+	gnc:options-add-subtotal-view! options from income-statement,
+	account-summary, and balance-sheet to here. Try to clarify the
+	wording of the option -- any native english speaker please feel
+	free to correct the wording even more.
+
 	* src/report/standard-reports/trial-balance.scm,
 	income-statement.scm, equity-statement.scm: Remove unused strings.
 

Modified: gnucash/trunk/src/report/report-system/options-utilities.scm
===================================================================
--- gnucash/trunk/src/report/report-system/options-utilities.scm	2006-03-28 20:31:17 UTC (rev 13708)
+++ gnucash/trunk/src/report/report-system/options-utilities.scm	2006-03-28 21:19:29 UTC (rev 13709)
@@ -236,3 +236,47 @@
      (vector 'alphabetical (N_ "Alphabetical") (N_ "Alphabetical by account name"))
      (vector 'amount (N_ "Amount") (N_ "By amount, largest to smallest"))))))
 
+
+;; These control the calculation and view mode of subtotal balances
+(define (gnc:options-add-subtotal-view!
+	 options pagename 
+	 optname-parent-balance-mode optname-parent-total-mode
+	 sort-tag)
+  ;; what to show for non-leaf accounts
+  (gnc:register-option
+   options
+   (gnc:make-multichoice-option
+    pagename 
+    ;; usually the option name is: (N_ "Parent account balances")
+    optname-parent-balance-mode
+    (string-append sort-tag "a")
+    (N_ "How to show the balances of parent accounts")
+    'immediate-bal
+    (list (vector 'immediate-bal
+		  (N_ "Account Balance")
+		  (N_ "Show only the balance in the parent account, excluding any subaccounts"))
+	  (vector 'recursive-bal
+		  (N_ "Subtotal")
+		  (N_ "Calculate the subtotal for this parent account and all of its subaccounts, and show this as the parent account balance"))
+	  (vector 'omit-bal
+		  (N_ "Do not show")
+		  (N_ "Do not show any balances of parent accounts")))))
+  (gnc:register-option
+   options
+   (gnc:make-multichoice-option
+    pagename
+    ;; usually the option name is: (N_ "Parent account subtotals")
+    optname-parent-total-mode
+    (string-append sort-tag "b")
+    (N_ "How to show account subtotals for parent accounts")
+    'f
+    (list (vector 't
+		  (N_ "Show subtotals")
+		  (N_ "Show subtotals for selected parent accounts which have subaccounts"))
+	  (vector 'f
+		  (N_ "Do not show")
+		  (N_ "Do not show any subtotals for parent accounts"))
+	  (vector 'canonically-tabbed
+		  ;;(N_ "Subtotals indented text book style")
+		  (N_ "Text book style (experimental)")
+		  (N_ "Show parent account subtotals, indented per accounting text book practice (experimental)"))))))

Modified: gnucash/trunk/src/report/report-system/report-system.scm
===================================================================
--- gnucash/trunk/src/report/report-system/report-system.scm	2006-03-28 20:31:17 UTC (rev 13708)
+++ gnucash/trunk/src/report/report-system/report-system.scm	2006-03-28 21:19:29 UTC (rev 13709)
@@ -65,6 +65,7 @@
 (export gnc:options-add-plot-size!)
 (export gnc:options-add-marker-choice!)
 (export gnc:options-add-sort-method!)
+(export gnc:options-add-subtotal-view!)
 
 ;; html-utilities.scm 
 

Modified: gnucash/trunk/src/report/standard-reports/account-summary.scm
===================================================================
--- gnucash/trunk/src/report/standard-reports/account-summary.scm	2006-03-28 20:31:17 UTC (rev 13708)
+++ gnucash/trunk/src/report/standard-reports/account-summary.scm	2006-03-28 21:19:29 UTC (rev 13709)
@@ -82,11 +82,7 @@
   (N_ "How to treat accounts which exceed the specified depth limit (if any)"))
 
 (define optname-parent-balance-mode (N_ "Parent account balances"))
-(define opthelp-parent-balance-mode
-  (N_ "How to show any balance in parent accounts"))
 (define optname-parent-total-mode (N_ "Parent account subtotals"))
-(define opthelp-parent-total-mode
-  (N_ "How to show account subtotals for selected accounts having children"))
 
 (define optname-show-zb-accts (N_ "Include accounts with zero total balances"))
 (define opthelp-show-zb-accts
@@ -211,36 +207,11 @@
       gnc:pagename-display optname-omit-zb-bals
       "b" opthelp-omit-zb-bals #f))
     ;; what to show for non-leaf accounts
-    (add-option
-     (gnc:make-multichoice-option
-      gnc:pagename-display optname-parent-balance-mode
-      "c" opthelp-parent-balance-mode
-      'immediate-bal
-      (list (vector 'immediate-bal
-		    (N_ "Show Immediate Balance")
-		    (N_ "Show only the balance in the parent account, excluding any subaccounts"))
-	    (vector 'recursive-bal
-		    (N_ "Recursive Balance")
-		    (N_ "Include subaccounts in balance"))
-	    (vector 'omit-bal
-		    (N_ "Omit Balance")
-		    (N_ "Do not show parent account balances")))))
-    (add-option
-     (gnc:make-multichoice-option
-      gnc:pagename-display optname-parent-total-mode
-      "d" opthelp-parent-total-mode
-      'f
-      (list (vector 't
-		    (N_ "Show subtotals")
-		    (N_ "Show subtotals for selected accounts which have subaccounts"))
-	    (vector 'f
-		    (N_ "Do not show subtotals")
-		    (N_ "Do not subtotal selected parent accounts"))
-	    (vector 'canonically-tabbed
-		    ;;(N_ "Subtotals indented text book style")
-		    (N_ "Text book style (experimental)")
-		    (N_ "Show parent account subtotals, indented per text book practice (experimental)")))))
-    
+    (gnc:options-add-subtotal-view!
+     options gnc:pagename-display
+     optname-parent-balance-mode optname-parent-total-mode
+     "c")
+
     ;; some detailed formatting options
     (add-option 
      (gnc:make-simple-boolean-option

Modified: gnucash/trunk/src/report/standard-reports/balance-sheet.scm
===================================================================
--- gnucash/trunk/src/report/standard-reports/balance-sheet.scm	2006-03-28 20:31:17 UTC (rev 13708)
+++ gnucash/trunk/src/report/standard-reports/balance-sheet.scm	2006-03-28 21:19:29 UTC (rev 13709)
@@ -32,8 +32,6 @@
 ;;    
 ;;    The variables in this code could use more consistent naming.
 ;;    
-;;    I'm not sure if I got (_ ) vs (N_ ) right. (What are they?)
-;;    
 ;;    The multicurrency support has been tested, BUT IS ALPHA.  I
 ;;    *think* it works right, but can make no guarantees....  In
 ;;    particular, I have made the educated assumption <grin> that a
@@ -98,11 +96,7 @@
   (N_ "Displays accounts which exceed the depth limit at the depth limit"))
 
 (define optname-parent-balance-mode (N_ "Parent account balances"))
-(define opthelp-parent-balance-mode
-  (N_ "How to show any balance in parent accounts"))
 (define optname-parent-total-mode (N_ "Parent account subtotals"))
-(define opthelp-parent-total-mode
-  (N_ "How to show account subtotals for selected accounts having children"))
 
 (define optname-show-zb-accts (N_ "Include accounts with zero total balances"))
 (define opthelp-show-zb-accts
@@ -224,36 +218,11 @@
       gnc:pagename-display optname-omit-zb-bals
       "b" opthelp-omit-zb-bals #f))
     ;; what to show for non-leaf accounts
-    (add-option
-     (gnc:make-multichoice-option
-      gnc:pagename-display optname-parent-balance-mode
-      "c" opthelp-parent-balance-mode
-      'immediate-bal
-      (list (vector 'immediate-bal
-		    (N_ "Show Immediate Balance")
-		    (N_ "Show only the balance in the parent account, excluding any subaccounts"))
-	    (vector 'recursive-bal
-		    (N_ "Recursive Balance")
-		    (N_ "Include subaccounts in balance"))
-	    (vector 'omit-bal
-		    (N_ "Omit Balance")
-		    (N_ "Do not show parent account balances")))))
-    (add-option
-     (gnc:make-multichoice-option
-      gnc:pagename-display optname-parent-total-mode
-      "d" opthelp-parent-total-mode
-      'f
-      (list (vector 't
-		    (N_ "Show subtotals")
-		    (N_ "Show subtotals for selected accounts which have subaccounts"))
-	    (vector 'f
-		    (N_ "Do not show subtotals")
-		    (N_ "Do not subtotal selected parent accounts"))
-	    (vector 'canonically-tabbed
-		    ;;(N_ "Subtotals indented text book style")
-		    (N_ "Text book style (experimental)")
-		    (N_ "Show parent account subtotals, indented per text book practice (experimental)")))))
-    
+    (gnc:options-add-subtotal-view!
+     options gnc:pagename-display
+     optname-parent-balance-mode optname-parent-total-mode
+     "c")
+
     ;; some detailed formatting options
     (add-option 
      (gnc:make-simple-boolean-option

Modified: gnucash/trunk/src/report/standard-reports/income-statement.scm
===================================================================
--- gnucash/trunk/src/report/standard-reports/income-statement.scm	2006-03-28 20:31:17 UTC (rev 13708)
+++ gnucash/trunk/src/report/standard-reports/income-statement.scm	2006-03-28 21:19:29 UTC (rev 13709)
@@ -73,11 +73,7 @@
   (N_ "Displays accounts which exceed the depth limit at the depth limit"))
 
 (define optname-parent-balance-mode (N_ "Parent account balances"))
-(define opthelp-parent-balance-mode
-  (N_ "How to show any balance in parent accounts"))
 (define optname-parent-total-mode (N_ "Parent account subtotals"))
-(define opthelp-parent-total-mode
-  (N_ "How to show account subtotals for selected accounts having children"))
 
 (define optname-show-zb-accts (N_ "Include accounts with zero total balances"))
 (define opthelp-show-zb-accts
@@ -201,36 +197,11 @@
       gnc:pagename-display optname-omit-zb-bals
       "b" opthelp-omit-zb-bals #f))
     ;; what to show for non-leaf accounts
-    (add-option
-     (gnc:make-multichoice-option
-      gnc:pagename-display optname-parent-balance-mode
-      "c" opthelp-parent-balance-mode
-      'immediate-bal
-      (list (vector 'immediate-bal
-		    (N_ "Show Immediate Balance")
-		    (N_ "Show only the balance in the parent account, excluding any subaccounts"))
-	    (vector 'recursive-bal
-		    (N_ "Recursive Balance")
-		    (N_ "Include subaccounts in balance"))
-	    (vector 'omit-bal
-		    (N_ "Omit Balance")
-		    (N_ "Do not show parent account balances")))))
-    (add-option
-     (gnc:make-multichoice-option
-      gnc:pagename-display optname-parent-total-mode
-      "d" opthelp-parent-total-mode
-      'f
-      (list (vector 't
-		    (N_ "Show subtotals")
-		    (N_ "Show subtotals for selected accounts which have subaccounts"))
-	    (vector 'f
-		    (N_ "Do not show subtotals")
-		    (N_ "Do not subtotal selected parent accounts"))
-	    (vector 'canonically-tabbed
-		    ;;(N_ "Subtotals indented text book style")
-		    (N_ "Text book style (experimental)")
-		    (N_ "Show parent account subtotals, indented per text book practice (experimental)")))))
-    
+    (gnc:options-add-subtotal-view!
+     options gnc:pagename-display
+     optname-parent-balance-mode optname-parent-total-mode
+     "c")
+
     ;; some detailed formatting options
     (add-option 
      (gnc:make-simple-boolean-option



More information about the gnucash-changes mailing list