The attached patch is an improvement to the original patch (and should
be applied over it, this patch was generated from very recent trunk
with the original patch already applied) which supplies the correct
number of columns to gnucash for the general_ledger register view if
the register is a template.
-Tim
2009/9/28 Christian Stimming <[email protected]>:
> Am Samstag, 26. September 2009 14:59 schrieb 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.
>
> Applied. Thanks a lot!
>
> Christian
>
Index: src/register/ledger-core/split-register-layout.c
===================================================================
--- src/register/ledger-core/split-register-layout.c (revision 18357)
+++ src/register/ledger-core/split-register-layout.c (working copy)
@@ -242,13 +242,15 @@
{
gnc_table_layout_set_cell (layout, curs, FDEBT_CELL, 0, 5);
gnc_table_layout_set_cell (layout, curs, FCRED_CELL, 0, 6);
+ gnc_table_layout_set_cell (layout, curs, RATE_CELL, 0, 7);
}
else
{
gnc_table_layout_set_cell (layout, curs, DEBT_CELL, 0, 5);
gnc_table_layout_set_cell (layout, curs, CRED_CELL, 0, 6);
+ gnc_table_layout_set_cell (layout, curs, RBALN_CELL, 0, 7);
+ gnc_table_layout_set_cell (layout, curs, RATE_CELL, 0, 8);
}
- gnc_table_layout_set_cell (layout, curs, RATE_CELL, 0, 8);
curs_last = curs;
curs = gnc_table_layout_get_cursor (layout,
@@ -268,11 +270,12 @@
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);
- if (!reg->is_template)
- {
+ if (reg->is_template)
+ gnc_table_layout_set_cell (layout, curs, RATE_CELL, 0, 7);
+ else {
gnc_table_layout_set_cell (layout, curs, RBALN_CELL, 0, 7);
+ gnc_table_layout_set_cell (layout, curs, RATE_CELL, 0, 8);
}
- gnc_table_layout_set_cell (layout, curs, RATE_CELL, 0, 8);
curs_last = curs;
curs = gnc_table_layout_get_cursor (layout,
@@ -294,13 +297,14 @@
{
gnc_table_layout_set_cell (layout, curs, FDEBT_CELL, 0, 5);
gnc_table_layout_set_cell (layout, curs, FCRED_CELL, 0, 6);
+ gnc_table_layout_set_cell (layout, curs, RATE_CELL, 0, 7);
}
else
{
gnc_table_layout_set_cell (layout, curs, DEBT_CELL, 0, 5);
gnc_table_layout_set_cell (layout, curs, CRED_CELL, 0, 6);
+ gnc_table_layout_set_cell (layout, curs, RATE_CELL, 0, 8);
}
- gnc_table_layout_set_cell (layout, curs, RATE_CELL, 0, 8);
break;
}
@@ -463,7 +467,10 @@
case INCOME_LEDGER:
case GENERAL_LEDGER:
case SEARCH_LEDGER:
- num_cols = 9;
+ if (reg->is_template)
+ num_cols = 8;
+ else
+ num_cols = 9;
break;
case STOCK_REGISTER:
_______________________________________________
gnucash-devel mailing list
[email protected]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel