GNOME Bugzilla – Bug 102161
Multi-Currency: Exchange rate in Multi-split view not changeable
Last modified: 2018-06-29 20:23:58 UTC
The "Edit exchange rate" dialog in multi-split view mode changes the amount in the from-account, not in the to-account. Open the attached sample file. Open the EUR account Assets:Checking. It contains one multi-currency transaction. View the register in "Basic Ledger" mode. Select the multi-currency txn. Click "Split" to view it in multi-split mode. Then select the split with the USD account Expenses:Groceries USD. Click "Edit exchange Rate". (The exchange rate is wrongly switched, as reported in bug#102157: The to-amount is USD 12,50 where in fact it should be USD 8.) Now enter a different to-amount, e.g. 7, to say that the EUR 10 are now worth USD 7 instead of USD 8. Click Ok. Click <Enter>. Result: The amount in the other account (Expenses:USD) is unchanged (USD 8), but the amount in this account (Assets:Checking) is changed according to the entered exchange rate -- it is now EUR 11.43 instead of EUR 10. Expected Result: The amount in this account (Assets:Checking) should be left unchanged (EUR 10), but the amount in the other account (Expenses:USD) should be changed to USD 7 just like I've specified the to-amount. On a side note, the "Edit Exchange Rate" dialog might well allow to edit the "Amount" field as well. In that case, the user can specify the from-amount and to-amount in the same dialog -- whereas currently one can only specify one in the register, and the other in the "Edit Exchange Rate" dialog.
Created attachment 13262 [details] Gnucash data file with one multi-currency transaction in Assets:Checking
This is not a bug per-se. When you are in expanded-mode, you are specifically editing the exchange rate of the split. It in no way _should_ modify any other split in the transaction. In this particular case (now that bug#102157 is fixed), when you change the "to_amount" from 8 to 7, you are changing the exchange rate of this particular split, but you are not changing the amount (which is in the foreign currency in your example). So, it recomputes the split's value based on the new exchange rate.. The result is an imbalanced transaction. If you re-adjust the amount to balance the transaction you will notice that the exchange rate is your new value. So, the question is: what is the right thing to do when the user edits the exchange rate but makes no other changes?
Note what happens if you edit the amount field (make a change to the field, but leave it 10. i.e., delete the '1' and then make the '1' again), and then (before you save the split), you edit the exchange rate and change it to '7'. In this case, you are editing both the amount AND the exchange rate, in which case it will auto-balance for you.
Ok, I understand your explanation and the logic behind it. However, that's just not the way I expect the register to be used. I expect to have one exchange rate in the txn and *not* one per split. (more below) There's another issue: In multi-split view, the "edit exchange rate" dialog opens only if I've selected a split where account-currency != txn-currency. Otherwise simply nothing happens. This is very confusing, especially since you can't see the txn-currency. Expexted behaviour: The "edit exchange rate" dialog opens regardless which split is selected. Now I understand that this works only if the transaction has only one exchange rate, meaning that it has at most two different currencies involved. Fine -- IMHO we can introduce this as a new constraint. Hm... thinking of it: What I expect is some easy possibility to edit the exchange rate of a txn, for those 2000 txns that I have that consist of precisely two currencies. Formerly I have been using the currency-account register, and there I was able to edit price, from-amount and to-amount easily. The currency-account's register has the GUI for editing one exchange rate *per split*. Why don't we say that any transaction can have at most two different currencies involved -- except for splits into currency/stock-accounts, which can all have their own currencies? In that case, the "exchange rate dialog" always has to deal with at most two currencies, and any further currencies are dealt with through the currency/stock-account register.
As per email conversation, I've changed the behavior to always change the split's value as the result of the exchange-rate conversion. I believe this is what you wanted. I'll leave this bug open for now, but please close it if you feel what we've got is sufficient for you now.
Any other comments before I consider this closed?
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=102161. Please update any external references or bookmarks.