GnuCash
Contact   Instructions
Bug 797677 - Price Database Saving Wrong Price for Foreign Currency
Summary: Price Database Saving Wrong Price for Foreign Currency
Status: RESOLVED FIXED
Alias: None
Product: GnuCash
Classification: Unclassified
Component: General (show other bugs)
Version: 3.8
Hardware: PC Windows
: Normal minor
Target Milestone: ---
Assignee: general
QA Contact: general
URL:
Whiteboard:
Keywords:
: 797719 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-04-10 19:47 EDT by Robert Chapin
Modified: 2020-05-04 22:11 EDT (History)
4 users (show)

See Also:


Attachments

Description Robert Chapin 2020-04-10 19:47:08 EDT
I'm noticing a problem with foreign transactions having a large number of decimal places in the conversion factor.

My default currency is USD.

Let's say I get paid something like $0.45 USD interest, but instead of USD it's in a foreign currency where the conversion rate is like 0.000245.  So what I'm entering in the account ledger is like 1835.00 for the deposit and then the conversion dialog opens and I enter 0.000245.

The Price Database should simply save 0.000245 as the price of the foreign currency.

Unfortunately, it's saving either 0.0002 or 0.000200 (I'm not sure which) and this is causing the balance in the Total (USD) column to be in error by about 20%.  I have to go back to the Price Database and manually re-enter the correct price to get the correct account balance in USD.
Comment 1 John Ralls 2020-04-10 20:09:31 EDT
Try entering the amount in USD into the exchange rate part of the transfer dialog instead of the rate.
Comment 2 Robert Chapin 2020-04-10 20:20:47 EDT
Same problem.  I tried just now entering a deposit of 1845.00 with a conversion to 0.45.  Then I open the Price Database and the new entry is 0.000200
Comment 3 John Ralls 2020-04-11 13:14:41 EDT
Is "Force Prices to display as decimals" checked in Preferences>General?

Did GnuCash record the correct USD amount for the deposit?
Comment 4 Robert Chapin 2020-04-11 14:29:57 EDT
Yes and Yes.
Comment 5 John Ralls 2020-04-11 16:02:13 EDT
What does the pricedb display when you un-check the preference item?
Comment 6 Robert Chapin 2020-04-11 21:24:40 EDT
Tried it just now.  Unchecking that preference had no effect on this bug.  The accounts are Bank and Income type.  Didn't see any changes in the accounts or in the price database behavior.
Comment 7 John Ralls 2020-04-14 17:38:14 EDT
Found and fixed: There was a stray call to round the value in the Transfer Dialogs new_price function.
Comment 8 John Ralls 2020-05-04 13:07:02 EDT
*** Bug 797719 has been marked as a duplicate of this bug. ***
Comment 9 Robert Chapin 2020-05-04 22:11:25 EDT
Just tested 3.10-57 and it seems fixed now.  Thank you!

Note You need to log in before you can comment on or make changes to this bug.