mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Follow-up to r18354: Patch for balance column displayed in template register
Patch by Tim M: The attached patch is an improvement to the original patch which supplies the correct number of columns to gnucash for the general_ledger register view if the register is a template. Signed-off-by: Christian Stimming <stimming@tuhh.de> git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18365 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
52fdf3ea53
commit
06f89503cc
@ -242,13 +242,15 @@ gnc_split_register_set_cells (SplitRegister *reg, TableLayout *layout)
|
|||||||
{
|
{
|
||||||
gnc_table_layout_set_cell (layout, curs, FDEBT_CELL, 0, 5);
|
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, FCRED_CELL, 0, 6);
|
||||||
|
gnc_table_layout_set_cell (layout, curs, RATE_CELL, 0, 7);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gnc_table_layout_set_cell (layout, curs, DEBT_CELL, 0, 5);
|
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, 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_last = curs;
|
||||||
curs = gnc_table_layout_get_cursor (layout,
|
curs = gnc_table_layout_get_cursor (layout,
|
||||||
@ -268,11 +270,12 @@ gnc_split_register_set_cells (SplitRegister *reg, TableLayout *layout)
|
|||||||
gnc_table_layout_set_cell (layout, curs, DESC_CELL, 0, 2);
|
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, TDEBT_CELL, 0, 5);
|
||||||
gnc_table_layout_set_cell (layout, curs, TCRED_CELL, 0, 6);
|
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, 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_last = curs;
|
||||||
curs = gnc_table_layout_get_cursor (layout,
|
curs = gnc_table_layout_get_cursor (layout,
|
||||||
@ -294,13 +297,14 @@ gnc_split_register_set_cells (SplitRegister *reg, TableLayout *layout)
|
|||||||
{
|
{
|
||||||
gnc_table_layout_set_cell (layout, curs, FDEBT_CELL, 0, 5);
|
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, FCRED_CELL, 0, 6);
|
||||||
|
gnc_table_layout_set_cell (layout, curs, RATE_CELL, 0, 7);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gnc_table_layout_set_cell (layout, curs, DEBT_CELL, 0, 5);
|
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, 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;
|
break;
|
||||||
}
|
}
|
||||||
@ -463,7 +467,10 @@ gnc_split_register_layout_add_cursors (SplitRegister *reg,
|
|||||||
case INCOME_LEDGER:
|
case INCOME_LEDGER:
|
||||||
case GENERAL_LEDGER:
|
case GENERAL_LEDGER:
|
||||||
case SEARCH_LEDGER:
|
case SEARCH_LEDGER:
|
||||||
num_cols = 9;
|
if (reg->is_template)
|
||||||
|
num_cols = 8;
|
||||||
|
else
|
||||||
|
num_cols = 9;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STOCK_REGISTER:
|
case STOCK_REGISTER:
|
||||||
|
Loading…
Reference in New Issue
Block a user