r17515 - gnucash/branches/2.2/src/report/report-system - [r17434] Report system: When computing average prices, don't assume all denominators will be identical.
Andreas Köhler
andi5 at cvs.gnucash.org
Sun Sep 14 17:30:12 EDT 2008
Author: andi5
Date: 2008-09-14 17:30:11 -0400 (Sun, 14 Sep 2008)
New Revision: 17515
Trac: http://svn.gnucash.org/trac/changeset/17515
Modified:
gnucash/branches/2.2/src/report/report-system/commodity-utilities.scm
Log:
[r17434] 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.
Committed by cedayiv.
Modified: gnucash/branches/2.2/src/report/report-system/commodity-utilities.scm
===================================================================
--- gnucash/branches/2.2/src/report/report-system/commodity-utilities.scm 2008-09-14 21:30:03 UTC (rev 17514)
+++ gnucash/branches/2.2/src/report/report-system/commodity-utilities.scm 2008-09-14 21:30:11 UTC (rev 17515)
@@ -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