r18229 - gnucash/trunk/src/report/standard-reports - Center budget report period dates properly over the columns for that period

Phil Longstaff plongstaff at code.gnucash.org
Sat Aug 1 22:42:50 EDT 2009


Author: plongstaff
Date: 2009-08-01 22:42:50 -0400 (Sat, 01 Aug 2009)
New Revision: 18229
Trac: http://svn.gnucash.org/trac/changeset/18229

Modified:
   gnucash/trunk/src/report/standard-reports/budget.scm
Log:
Center budget report period dates properly over the columns for that period


Modified: gnucash/trunk/src/report/standard-reports/budget.scm
===================================================================
--- gnucash/trunk/src/report/standard-reports/budget.scm	2009-08-02 01:08:06 UTC (rev 18228)
+++ gnucash/trunk/src/report/standard-reports/budget.scm	2009-08-02 02:42:50 UTC (rev 18229)
@@ -335,39 +335,50 @@
       (gnc:html-table-prepend-row! html-table '())
       (gnc:html-table-prepend-row! html-table '())
 
+	  (while (< period num-periods)
+             (let* (
+					 (tc #f)
+                     (date (gnc-budget-get-period-start-date budget period))
+                   )
+               (gnc:html-table-set-cell!
+                  html-table 0 (+ current-col period)
+				  (gnc-print-date date))
+               (set! tc (gnc:html-table-get-cell html-table 0 (+ current-col period)))
+			   (gnc:html-table-cell-set-colspan! tc (if show-diff? 3 2))
+			   (gnc:html-table-cell-set-tag! tc "centered-label-cell")
+               (set! period (+ period 1))
+             )
+      )
+
       ;; make the column headers
+      (set! period 0)
       (while (< period num-periods)
-             (let* ((date (gnc-budget-get-period-start-date budget period)))
-               (gnc:html-table-set-cell/tag!
-                html-table 0 (if show-diff? (+ current-col 1) current-col) "centered-label-cell"
-				(gnc-print-date date))
-               (if show-budget?
-                 (begin
-                   (gnc:html-table-set-cell/tag!
-                    html-table 1 current-col "centered-label-cell"
-					(_ "Bgt")) ;; Translators: Abbreviation for "Budget"
-                   (set! current-col (+ current-col 1))
-                 )
+             (if show-budget?
+               (begin
+                 (gnc:html-table-set-cell/tag!
+                  html-table 1 current-col "centered-label-cell"
+                  (_ "Bgt")) ;; Translators: Abbreviation for "Budget"
+                  (set! current-col (+ current-col 1))
                )
-               (if show-actual?
-                 (begin 
-                   (gnc:html-table-set-cell/tag!
-                    html-table 1 current-col "centered-label-cell"
-					(_ "Act")) ;; Translators: Abbreviation for "Actual"
-                   (set! current-col (+ current-col 1))
-                 )
+             )
+             (if show-actual?
+               (begin 
+                 (gnc:html-table-set-cell/tag!
+                  html-table 1 current-col "centered-label-cell"
+                  (_ "Act")) ;; Translators: Abbreviation for "Actual"
+                 (set! current-col (+ current-col 1))
                )
-               (if show-diff?
-                 (begin 
-                   (gnc:html-table-set-cell/tag!
-                    html-table 1 current-col "centered-label-cell"
-					(_ "Diff")) ;; Translators: Abbrevation for "Difference"
-                   (set! current-col (+ current-col 1))
-                 )
+             )
+             (if show-diff?
+               (begin 
+                 (gnc:html-table-set-cell/tag!
+                  html-table 1 current-col "centered-label-cell"
+                  (_ "Diff")) ;; Translators: Abbrevation for "Difference"
+                 (set! current-col (+ current-col 1))
                )
-               (set! period (+ period 1))
-               )
              )
+             (set! period (+ period 1))
+             )
 		 (if show-totalcol?
 		    (begin
                (gnc:html-table-set-cell/tag!



More information about the gnucash-changes mailing list