r17510 - gnucash/branches/2.2/src/engine - [r17409] Bug #454827: Don't round derived commodity prices until the very last step.

Andreas Köhler andi5 at cvs.gnucash.org
Sun Sep 14 17:29:30 EDT 2008


Author: andi5
Date: 2008-09-14 17:29:30 -0400 (Sun, 14 Sep 2008)
New Revision: 17510
Trac: http://svn.gnucash.org/trac/changeset/17510

Modified:
   gnucash/branches/2.2/src/engine/gnc-pricedb.c
Log:
[r17409] Bug #454827: Don't round derived commodity prices until the very last step.

Committed by cedayiv.

Modified: gnucash/branches/2.2/src/engine/gnc-pricedb.c
===================================================================
--- gnucash/branches/2.2/src/engine/gnc-pricedb.c	2008-09-14 20:03:48 UTC (rev 17509)
+++ gnucash/branches/2.2/src/engine/gnc-pricedb.c	2008-09-14 21:29:30 UTC (rev 17510)
@@ -1883,8 +1883,8 @@
           (!gnc_numeric_zero_p(currency_price_value)));
 
   balance = gnc_numeric_mul (balance, currency_price_value,
-                             gnc_commodity_get_fraction (new_currency),
-                             GNC_HOW_RND_ROUND);
+                             GNC_DENOM_AUTO,
+                             GNC_HOW_DENOM_EXACT | GNC_HOW_RND_NEVER);
   balance = gnc_numeric_mul (balance, gnc_price_get_value (price),
                              gnc_commodity_get_fraction (new_currency),
                              GNC_HOW_RND_ROUND);



More information about the gnucash-changes mailing list