[GNC] New Imbalance-XXX Behavior

Jim DeLaHunt list+gnucash at jdlh.com
Tue Jun 1 01:42:43 EDT 2021


Michael:

On 2021-05-31 14:36, Michael or Penny Novack wrote:
> I suspect you were not seeing the behavior you thought you were seeing.…

I see the same behaviour as David, in GnuCash 4.2.  I just created a 
credit card transaction, and intentionally left the other Account field 
blank. GnuCash filled in the account: "Z Specials:Imbalance-CAD". Note: 
Note "Imbalance-CAD" at the root, but the imbalance account under the "Z 
Specials" root-level account.

I value this behaviour for the same reason that David stated: I don't 
want those accounts cluttering up the root of my Chart of Accounts tree.

On 2021-05-31 14:36, Michael or Penny Novack wrote:
> …An account is NOT defined by its name but by its name within the 
> context of its position in the tree (the CoA).…


That is ONE way that accounts are identified (a name within context of 
its position in the CoA tree). But it is not the only one. Each Account 
also has a unique, arbitrary identifier ("GUID"). GnuCash generates this 
identifier when it creates the account. Transactions link to this unique 
identifier, not to the name within context of the CofA tree.

Remember, you can change the name of an account, or move the account to 
a different parent in a different part of the CoA tree. All the 
transactions in that account remain with the account. That is because 
the accounts are linked to the account's unique identifier, not to the 
name and CofA context.

My model of how GnuCash operates is that it has a list of Imbalance and 
Orphan account unique identifiers, indexed by currency (and maybe 
security) codes. When GnuCash needs to use an Imbalance account in a 
transaction, it looks up the transaction's currency in that list. If 
there is an entry in that list for the currency, GnuCash retrieves the 
unique identifier and uses it in the transaction. If there is no entry, 
GnuCash creates it in the root of the CoA tree, with the name 
"Imbalance-XXX", creates the unique identifier, then adds that to the 
list, and uses it in the transaction.

My model of what David's report means is that recently, GnuCash changed 
its behaviour to store the account name and CoA context in that list, 
instead of the unique identifier.

There may be advantages to that change, but I agree with David that 
cluttering up the root of the CoA tree is a disadvantage.

Best regards,
      —Jim DeLaHunt




More information about the gnucash-user mailing list