gnucash maint: Bug 796952 - Report formatting (justify) is broken

Christopher Lam clam at code.gnucash.org
Sun Mar 10 08:00:17 EDT 2019


Updated	 via  https://github.com/Gnucash/gnucash/commit/35ed4cf2 (commit)
	from  https://github.com/Gnucash/gnucash/commit/f99ca362 (commit)



commit 35ed4cf20af125fb7985557a0501643c94c5af31
Author: Matija-N <mnalis-gnucashbug at voyager.hr>
Date:   Sun Mar 10 17:14:50 2019 +0800

    Bug 796952 - Report formatting (justify) is broken
    
    Matija's patch manually applied

diff --git a/gnucash/report/standard-reports/account-summary.scm b/gnucash/report/standard-reports/account-summary.scm
index 2e5a7b170..b45dfea6b 100644
--- a/gnucash/report/standard-reports/account-summary.scm
+++ b/gnucash/report/standard-reports/account-summary.scm
@@ -458,25 +458,23 @@
 		)
           (if show-account-bals?
               (gnc:html-table-set-cell/tag!
-               build-table 0 (+ cur-col account-cols) "number-header"
+               build-table 0 (1+ cur-col) "number-header"
 	       (_ "Balance"))
               )
-	  (let ((row 0))
-	    (while (< row table-rows)
-		   (gnc:html-table-set-row-markup! build-table (+ row 1)
-						   (gnc:html-table-row-markup hold-table row))
-		   (let ((col 0))
-		     (while (< col hold-table-width)
-			    (gnc:html-table-set-cell!
-			     build-table (+ row 1) (+ cur-col col)
-			     (gnc:html-table-get-cell hold-table row col)
-			     )
-			    (set! col (+ col 1))
-			    )
-		     )
-		   (set! row (+ row 1))
-		   )
-	    )
+          (let ((row 0))
+            (while (< row table-rows)
+              (let ((col 1))
+                (gnc:html-table-set-cell! build-table (1+ row) cur-col
+                                          (gnc:html-table-get-cell hold-table row 0))
+                (if show-account-bals?
+                    (while (< col hold-table-width)
+                      (if (gnc:html-table-get-cell hold-table row col)
+                          (gnc:html-table-set-cell!
+                           build-table (1+ row) (1+ cur-col)
+                           (gnc:html-table-get-cell hold-table row col)))
+                      (set! col (1+ col)))))
+              (set! row (1+ row))))
+          (set! cur-col (+ cur-col (if show-account-bals? 2 1)))
 	  (set! cur-col (+ cur-col hold-table-width))
 	  (if show-account-notes?
 	      (begin



Summary of changes:
 .../report/standard-reports/account-summary.scm    | 32 ++++++++++------------
 1 file changed, 15 insertions(+), 17 deletions(-)



More information about the gnucash-changes mailing list