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 608306 - check amount_word doesn't print the fraction correctly
check amount_word doesn't print the fraction correctly
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Check Printing
unspecified
Other All
: Normal normal
: ---
Assigned To: David Hampton
Depends on:
Blocks:
 
 
Reported: 2010-01-28 05:30 UTC by Thomas Troesch
Modified: 2018-06-29 22:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
diff change to number_to_words to fix fraction string. (648 bytes, patch)
2010-01-28 05:30 UTC, Thomas Troesch
committed Details | Review

Description Thomas Troesch 2010-01-28 05:30:07 UTC
Created attachment 152463 [details] [review]
diff change to number_to_words to fix fraction string. 

check amount_word doesn't print the fraction correctly

Checks print the wrong string for the amount_words.  The utility number_to_words will produce e.g. from 100.04 -> One Hundred and 4/100.  The word string should be One Hundred and 04/100.

diff is attached.
Comment 1 Christian Stimming 2010-02-01 14:15:15 UTC
Are you sure the nominator parts should be printed with prefixing zero (on numbers smaller than 10)? Aesthetically this doesn't look as nice as without prefixing zero. Or this is a particular requirement for check printing?
Comment 2 Thomas Troesch 2010-02-01 15:46:08 UTC
It is positively this way in the US for checks.  It is also the way QB does it, if that is any comfort ;)
Comment 3 Andreas Köhler 2010-02-03 00:10:44 UTC
OK, but what about currencies with SCU different from 100?
04/100000 looks strange, IMHO.
Comment 4 Thomas Troesch 2010-02-03 03:17:42 UTC
Yes, I wondered about that.
  
1. Do you have an example?

2. I could not find in the code an example where the function was used when the commodity was not currency.

3.  4/100 is certainly wrong for a check with SCU of 100.

When I was thinking about this I had the idea that the format could be based on the SCU length, but I could not think of a reason to do it or a way to test it.  Of course, if it was coded that way, checks would come out correctly.

ps.  what does SCU mean?
Comment 5 Christian Stimming 2010-02-03 20:55:38 UTC
Committed as-is. I don't think (ha ha) check printing is used with anything else than a currency with SCU=100, hence this is an improvement for almost all cases. (SCU = Smallest Commodity Unit)
Comment 6 John Ralls 2018-06-29 22:34:12 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=608306. Please update any external references or bookmarks.