After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 792157 - Cannot create account with different currency
Cannot create account with different currency
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Currency and Commodity
2.7.x
Other Linux
: Normal major
: ---
Assigned To: gnucash-core-maint
gnucash-core-maint
Depends on:
Blocks:
 
 
Reported: 2018-01-03 10:37 UTC by Fabio
Modified: 2018-06-30 00:02 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Fabio 2018-01-03 10:37:18 UTC
I'm using the SQLite3 backend, tested with git master as of 03-01-2018, 2.7.3 and 2.7.2, Arch Linux (built from AUR - gnucash-gtk3-git).
When I create a new account in a new file, if I choose a Currency different from the default one, this currency does not keep if I close GnuCash and open it again. When I reopen gnucash the account has no currency at all. If I edit the account the currency field is gone (there is only the label). It's worth noticing that everything works fine until the first time I close gnucash (I think that the memory model is ok, but something is not being saved to the database).

I looked in the sqlite file and noticed that the selected currency was not present in the commodity table, only the default currency was there.
If I open a file created in an older version of gnucash (2.6) with multiple currencies, all work fine, and I can create new accounts with multiple currencies if the currency I choose is already in the commodity table (but I cannot create account with currencies that are not in the commodity table already).

Steps to reproduce:
- Open gnucash and create a new file. It doesn't matter if you use trading accounts or not. Choose your default currency and default accounts and save the file with the data format "sqlite3" (my default currency is BRL - Brazilian Real).
- Create a new asset account, and when creating the account, select a currency different from the default one (I chose Euro)
- Open this account and enter a transaction to a account in the default currency. The "transfer funds" dialog will open and you can choose an exchange rate).
- Close gnucash
- Reopen gnucash (the last file will open automatically)
- the created account will show "0" (zero) balance, with no currency set
- If you open the account, you can see the transaction. But if you edit the account, the field for the currency will be gone.
- If you open the sqlite3 file in other tool and see the commodity table, there will be only one currency there (the default one). I suppose the currency selected when created the account should be there.
Comment 1 Geert Janssens 2018-02-03 15:09:35 UTC
Thank you for your report. I can indeed confirm this. It only fails on sql. The xml backend works fine.
Comment 2 John Ralls 2018-02-21 01:34:15 UTC
A regression from the C++ conversion.
Comment 3 John Ralls 2018-06-30 00:02:33 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=792157. Please update any external references or bookmarks.