some questions on accounts/commodities

John Ralls jralls at ceridwen.us
Mon Dec 29 12:36:06 EST 2014


> On Dec 29, 2014, at 7:17 AM, Sébastien de Menten <sdementen at gmail.com> wrote:
> 
> hello,
> 
> I have some questions on gnucash behavior regarding some "limit" changes:
> - a placeholder account: an account can be converted to a placeholder
> account even if there are splits related to it. Is it expected behavior ?
> or should the placeholder flag be selectable only if there are no split in
> the account.

Expected, because one use of "placeholder" is to freeze an account, perhaps because it's been closed.

> - once an account has splits, it is still possible to change the commodity
> of the account (ie we can move from EUR to YHOO stock without any warning).
> Is it expected behavior ?

Expected behavior. Countries change currency (adoption of the Euro being the most common case, but others include Zimbabwe's adoption of the USD after the collapse of their own currency). There's code in the engine to recalculate all of the existing splits in the new commodity.

> - once an account has splits, it is still possible to change the
> commodity_scu (smallest fraction) of the account (ie we can move from 1/100
> to 1/10). The existing splits are not adjusted to the new commodity_scu. Is
> it expected behavior ?

There are a couple of ways of looking at that. The most accurate representation would be that SCU is for display only and all numbers should be maintained at the maximum possible precision to reduce rounding errors, but that's not always industry practice; some institutions round every transaction using a so-called "banker's round" and expect the results to even out over time. GnuCash's code is inconsistent in this regard: Some operations check the SCU and round to it, others don't. As part of the rewrite we should decide on a policy and make sure that we consistently apply it.

> - similarly the "fraction traded" in a commodity (non currency) can be
> changed even though accounts related to it have already splits that may use
> higher precision that the new "fraction traded". Is it expected behavior ?

That's a more general example, with the same answer.

> - in the security editor, are "symbol/abbreviation" and "display symbol"
> the same field ?

No, the latter is a recent change to allow users to select a different character for display depending on their local needs. For example, a Canadian might want $ to represent CAD and U$ for USD, while someone to the south might prefer the other way around.

> 
> I was wondering if there was not a set of characteristics of the
> accounts/commodity that are "write once" (ie, they are defined at the
> creation of the account/commodity but they can't be modified once they have
> other objects, like splits, relating to them). Is it more or less correct ?

Perhaps there should be but the code doesn't work that way, nor does real life: Consider the decimalization of Pounds Sterling or of the US stock pricing. If we do adopt a policy that some properties should be immutable I think it should
be absolute rather than dependent upon whether there are instances in the database. The latter choice would complicate the
code for IMO little gain.

Regards,
John Ralls




More information about the gnucash-devel mailing list