AUDIT: r17434 - gnucash/trunk/src/report/report-system - Report system: When computing average prices, don't assume all denominators will be identical. I tested this change with 15 years of data and saw no performance hit.
Charles Day
cedayiv at cvs.gnucash.org
Mon Jul 28 16:28:09 EDT 2008
Author: cedayiv
Date: 2008-07-28 16:28:09 -0400 (Mon, 28 Jul 2008)
New Revision: 17434
Trac: http://svn.gnucash.org/trac/changeset/17434
Modified:
gnucash/trunk/src/report/report-system/commodity-utilities.scm
Log:
Report system: When computing average prices, don't assume all denominators will be identical. I tested this change with 15 years of data and saw no performance hit.
BP
Modified: gnucash/trunk/src/report/report-system/commodity-utilities.scm
===================================================================
--- gnucash/trunk/src/report/report-system/commodity-utilities.scm 2008-07-28 20:08:09 UTC (rev 17433)
+++ gnucash/trunk/src/report/report-system/commodity-utilities.scm 2008-07-28 20:28:09 UTC (rev 17434)
@@ -184,10 +184,14 @@
report-currency (gnc-numeric-zero)))
(gnc-numeric-zero))
(begin
- (set! total-foreign (gnc-numeric-add-fixed
- total-foreign (third foreignlist)))
- (set! total-domestic (gnc-numeric-add-fixed
- total-domestic (second foreignlist)))
+ (set! total-foreign (gnc-numeric-add total-foreign
+ (third foreignlist)
+ GNC-DENOM-AUTO
+ GNC-DENOM-LCD))
+ (set! total-domestic (gnc-numeric-add total-domestic
+ (second foreignlist)
+ GNC-DENOM-AUTO
+ GNC-DENOM-LCD))
(gnc-numeric-div
total-domestic
total-foreign
More information about the gnucash-changes
mailing list