r18354 - gnucash/trunk/src/register/ledger-core - Fix bug when register running balance column appears in template transaction.

Christian Stimming cstim at code.gnucash.org
Mon Sep 28 16:31:43 EDT 2009


Author: cstim
Date: 2009-09-28 16:31:42 -0400 (Mon, 28 Sep 2009)
New Revision: 18354
Trac: http://svn.gnucash.org/trac/changeset/18354

Modified:
   gnucash/trunk/src/register/ledger-core/split-register-layout.c
Log:
Fix bug when register running balance column appears in template transaction.

Patch by Tim M:

I noticed yesterday a bug in the reg run balance patch that was applied,
there is now a "Balance" column displayed in the template transaction
register.  If you open the scheduled transaction editor, then open a
scheduled transaction and go to the "Template Transaction" tab, there is a
"Balance" column displayed on the far right side of the register.

The attached patch fixes this defect so that the RBALN column is not
displayed in template registers.

Signed-off-by: Christian Stimming <stimming at tuhh.de>

Modified: gnucash/trunk/src/register/ledger-core/split-register-layout.c
===================================================================
--- gnucash/trunk/src/register/ledger-core/split-register-layout.c	2009-09-28 20:25:49 UTC (rev 18353)
+++ gnucash/trunk/src/register/ledger-core/split-register-layout.c	2009-09-28 20:31:42 UTC (rev 18354)
@@ -268,7 +268,10 @@
         gnc_table_layout_set_cell (layout, curs, DESC_CELL,  0, 2);
         gnc_table_layout_set_cell (layout, curs, TDEBT_CELL, 0, 5);
         gnc_table_layout_set_cell (layout, curs, TCRED_CELL, 0, 6);
-        gnc_table_layout_set_cell (layout, curs, RBALN_CELL, 0, 7);
+        if (!reg->is_template)
+        {
+          gnc_table_layout_set_cell (layout, curs, RBALN_CELL, 0, 7);
+        }
         gnc_table_layout_set_cell (layout, curs, RATE_CELL, 0, 8);
 
         curs_last = curs;



More information about the gnucash-changes mailing list