r15777 - gnucash/trunk/src/gnome - Bug#343795: Be explicit about number of months so auto-decimal-point doesn't bite us. Patch from Jerry Quinn <mailto:jlquinn at optonline.net>.

Josh Sled jsled at cvs.gnucash.org
Mon Apr 2 20:55:57 EDT 2007


Author: jsled
Date: 2007-04-02 20:55:56 -0400 (Mon, 02 Apr 2007)
New Revision: 15777
Trac: http://svn.gnucash.org/trac/changeset/15777

Modified:
   gnucash/trunk/src/gnome/druid-loan.c
Log:
Bug#343795: Be explicit about number of months so auto-decimal-point doesn't bite us.  Patch from Jerry Quinn <mailto:jlquinn at optonline.net>.


Modified: gnucash/trunk/src/gnome/druid-loan.c
===================================================================
--- gnucash/trunk/src/gnome/druid-loan.c	2007-04-03 00:19:04 UTC (rev 15776)
+++ gnucash/trunk/src/gnome/druid-loan.c	2007-04-03 00:55:56 UTC (rev 15777)
@@ -927,7 +927,7 @@
 {
         g_assert( ldd != NULL );
         g_assert( gstr != NULL );
-        g_string_append_printf( gstr, "pmt( %.5f / 12 : %0.2f : %0.2f : 0 : 0 )",
+        g_string_append_printf( gstr, "pmt( %.5f / 12.0 : %0.2f : %0.2f : 0 : 0 )",
                                 (ldd->ld.interestRate / 100),
                                 ( ldd->ld.numPer
                                   * ( ldd->ld.perSize == GNC_MONTHS ? 1 : 12 ) ) * 1.,
@@ -940,7 +940,7 @@
 {
         g_assert( ldd != NULL );
         g_assert( gstr != NULL );
-        g_string_printf( gstr, "ppmt( %.5f / 12 : i : %0.2f : %0.2f : 0 : 0 )",
+        g_string_printf( gstr, "ppmt( %.5f / 12.0 : i : %0.2f : %0.2f : 0 : 0 )",
                          (ldd->ld.interestRate / 100),
                          ( ldd->ld.numPer
                            * ( ldd->ld.perSize == GNC_MONTHS ? 1 : 12 ) ) * 1.,
@@ -953,7 +953,7 @@
 {
         g_assert( ldd != NULL );
         g_assert( gstr != NULL );
-        g_string_printf( gstr, "ipmt( %.5f / 12 : i : %0.2f : %0.2f : 0 : 0 )",
+        g_string_printf( gstr, "ipmt( %.5f / 12.0 : i : %0.2f : %0.2f : 0 : 0 )",
                          (ldd->ld.interestRate / 100),
                          ( ldd->ld.numPer
                            * ( ldd->ld.perSize == GNC_MONTHS ? 1 : 12 ) ) * 1.,



More information about the gnucash-changes mailing list