GnuCash
Contact   Instructions
Bug 605602 - precision of Financial Calculator seems to depend on locale
Summary: precision of Financial Calculator seems to depend on locale
Status: RESOLVED FIXED
Alias: None
Product: GnuCash
Classification: Unclassified
Component: General (show other bugs)
Version: 2.3.x
Hardware: Other Linux
: Normal normal
Target Milestone: ---
Assignee: general
QA Contact: general
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-28 09:16 EST by TANIGUCHI Yasuaki
Modified: 2019-08-27 09:29 EDT (History)
5 users (show)

See Also:


Attachments
calculated result with LANG=C (127.95 KB, image/png)
2009-12-28 09:16 EST, TANIGUCHI Yasuaki
no flags Details
calculated result with LANG=ja (Japanese gnucash.mo is removed) (129.93 KB, image/png)
2009-12-28 09:17 EST, TANIGUCHI Yasuaki
no flags Details

Description TANIGUCHI Yasuaki 2009-12-28 09:16:37 EST
Created attachment 150491 [details]
calculated result with LANG=C

I'm calculating loans with financial calculator like the GnuCash Concepts Guide Chapter 7.3 (http://svn.gnucash.org/docs/guide/loans_calcs1.html).

When I use it in LANG=C environment, the calculated result is the same as the Guide because the internal precision seems to be second decimal places.

But when I use it in LANG=ja, the calculated result is different because the internal precison seems to be integer.

Please see two attached files.

fc_LANG_C.png: calculated result with LANG=C
fc_LANG_ja.png: calculated result with LANG=ja (Japanese gnucash.mo is removed)
Comment 1 TANIGUCHI Yasuaki 2009-12-28 09:17:39 EST
Created attachment 150492 [details]
calculated result with LANG=ja (Japanese gnucash.mo is removed)
Comment 2 TANIGUCHI Yasuaki 2009-12-28 09:19:31 EST
Request For Enhancement

I think it is better to be able to select currency in financial calculator.
Comment 3 Christopher Lam 2019-06-26 00:32:10 EDT
I think this is the offending line

https://github.com/Gnucash/gnucash/blob/2d06d703f2164eeeb7782f61a379fc1dc06735ba/gnucash/gnome/dialog-fincalc.c#L156

Should there be option for decimal places?

It's just a calculator...
Comment 4 John Ralls 2019-06-26 00:45:05 EDT
Yup, that would do it.

Yeah, a GtkSpinButton with values from 0-9 would be a more appropriate way to set the precision than getting the SCU for the default currency.
Comment 5 Christopher Lam 2019-08-27 09:29:49 EDT
fixed, will appear in 3.7

https://github.com/Gnucash/gnucash/commit/13d3179729130f893

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