GNOME Bugzilla – Bug 608306
check amount_word doesn't print the fraction correctly
Last modified: 2018-06-29 22:34:12 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.
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?
It is positively this way in the US for checks. It is also the way QB does it, if that is any comfort ;)
OK, but what about currencies with SCU different from 100? 04/100000 looks strange, IMHO.
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?
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)
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.