r18607 - gnucash/trunk/src/app-utils - Bug #608306: check amount_word should print the fraction correctly.

Christian Stimming cstim at code.gnucash.org
Wed Feb 3 15:54:26 EST 2010


Author: cstim
Date: 2010-02-03 15:54:26 -0500 (Wed, 03 Feb 2010)
New Revision: 18607
Trac: http://svn.gnucash.org/trac/changeset/18607

Modified:
   gnucash/trunk/src/app-utils/gnc-ui-util.c
Log:
Bug #608306: check amount_word should print the fraction correctly.

Patch by Thomas Troesch:

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

Modified: gnucash/trunk/src/app-utils/gnc-ui-util.c
===================================================================
--- gnucash/trunk/src/app-utils/gnc-ui-util.c	2010-02-03 20:51:07 UTC (rev 18606)
+++ gnucash/trunk/src/app-utils/gnc-ui-util.c	2010-02-03 20:54:26 UTC (rev 18607)
@@ -1857,7 +1857,7 @@
     /* Inside of the gettext macro _(...) we must not use any macros but
        only plain string literals. For this reason, convert the strings
        separately. */
-    nomin_string = g_strdup_printf("%" G_GINT64_FORMAT, frac_part);
+    nomin_string = g_strdup_printf("%02" G_GINT64_FORMAT, frac_part);
     denom_string = g_strdup_printf("%" G_GINT64_FORMAT, denom);
     full_string =
         /* Translators: This is for the "amount, in words" field in check



More information about the gnucash-changes mailing list