Multi-currency transactions with trading accounts from 2.4.13 getting messed up in latest 2.6.3

John Ralls jralls at ceridwen.us
Sun Jun 22 19:42:32 EDT 2014


On Jun 22, 2014, at 1:15 PM, Mark <msalists at gmx.net> wrote:

> I think I figured out what is happening (not why, and also no fix for it, though):
> 
> For some reason, when I created the multi-currency transactions in 2.4.13, GnuCash did not create any exchange rate record in the prices repository. This shouldn't be a problem, since the exchange rate is implicitly stored in the split lines of the transaction.
> And so, GnuCash 2.4.13 is fine with this.
> 
> For some reason, version 2.6.3 is misbehaving when it finds transactions without a matching exchange rate.
> Instead of just not touching the transaction and its split lines, it assumes an exchange rate of 1 and then based on that exchange rate, modifies one of the 2 trading account split amounts (this is the crucial thing which definitely must NOT happen), thus imbalancing (and essentially corrupting) the transaction. This is not happening in the file, but in memory.
> And because it just imbalanced the transaction by messing with the Trading account split amount, it adds the Imbalance split line to compensate.
> 
> When I try to fix the error by reverting the 4 lines back to their original amounts and removing the Imbalance split line, as soon as I try to save the transaction, it once again tries to pull the exchange rate, does not find it and kicks off the previously described corrupting mechanism.
> 
> The only way to fix the corrupted transactions is to use "Edit exchange rate" on the transaction, which can not be regarded as a fix for this bug, though.
> 
> I also documented this in my bug submission.
> 
> 
> I wonder if there are other circumstances, in which existing transations are modified in the background without the user knowing...
> Fortunately, this one was pretty obvious, so that I stumbled over it right away, but others might b more subtle…
> 

Close, but not quite. The entry in the pricedb from the editing the exchange rate is a new feature in 2.6; it’s there for reports that use historical prices like the net worth graph.

GnuCash didn’t change any of the splits in your transaction, either, even though it should have. The USD trading account split was created with an exchange rate of 1 in 2.4, but 2.4’s transaction balance routine had a bug that caused it to not notice. That bug was fixed for 2.6, so now your invalid transactions have an imbalance that you need to fix with the transfer dialog (“Edit Exchange Rate”) as you have already done for one. 

More detail on the bug report.

Regards,
John Ralls






More information about the gnucash-user mailing list