mirror of
https://github.com/Gnucash/gnucash.git
synced 2026-09-03 20:53:02 -05:00
If you have a parent account with a subaccount whose commodity allows more
decimal places in the amount field than the parent account does things don't work right if you open a register for the parent account and all subaccounts. This situation can occur if you have a broker account with subaccounts for the securities held in that broker account. If you open a register for the top account and all subaccounts, it is impossible to enter a transaction to buy or sell a fractional share of the security where there are more digits after the decimal point than the parent account allows. This change fixes this if the subaccount allows no more than six digits after the decimal point. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19925 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -360,16 +360,13 @@ gnc_split_register_set_cell_fractions (SplitRegister *reg, Split *split)
|
||||
|
||||
account = xaccSplitGetAccount (split);
|
||||
|
||||
if (account == NULL)
|
||||
account = gnc_split_register_get_default_account (reg);
|
||||
|
||||
cell = (PriceCell *) gnc_table_layout_get_cell (reg->table->layout,
|
||||
SHRS_CELL);
|
||||
|
||||
if (account)
|
||||
gnc_price_cell_set_fraction (cell, xaccAccountGetCommoditySCU (account));
|
||||
else
|
||||
gnc_price_cell_set_fraction (cell, 100000);
|
||||
gnc_price_cell_set_fraction (cell, 1000000);
|
||||
}
|
||||
|
||||
CellBlock *
|
||||
|
||||
Reference in New Issue
Block a user