AUDIT: r17627 - gnucash/trunk/src/report/report-system - Reporting: Fix the Average Cost price source computation for a certain case. As this is a signed computation with the sign indicating the direction of buy/sell, it is necessary to flip the sign if you ever flip the sense of buy or sell.

Charles Day cedayiv at cvs.gnucash.org
Wed Oct 15 23:02:21 EDT 2008


Author: cedayiv
Date: 2008-10-15 23:02:20 -0400 (Wed, 15 Oct 2008)
New Revision: 17627
Trac: http://svn.gnucash.org/trac/changeset/17627

Modified:
   gnucash/trunk/src/report/report-system/commodity-utilities.scm
Log:
Reporting: Fix the Average Cost price source computation for a certain case. As this is a signed computation with the sign indicating the direction of buy/sell, it is necessary to flip the sign if you ever flip the sense of buy or sell.
BP


Modified: gnucash/trunk/src/report/report-system/commodity-utilities.scm
===================================================================
--- gnucash/trunk/src/report/report-system/commodity-utilities.scm	2008-10-12 20:08:42 UTC (rev 17626)
+++ gnucash/trunk/src/report/report-system/commodity-utilities.scm	2008-10-16 03:02:20 UTC (rev 17627)
@@ -677,7 +677,8 @@
 			   (list account-comm 
 				 share-amount value-amount)
 			   (list transaction-comm 
-				 value-amount share-amount)))
+				 (gnc-numeric-neg value-amount)
+                                 (gnc-numeric-neg share-amount))))
 		      ;; second commodity already existing in comm-list?
 		      (pair (assoc (car foreignlist) (cadr comm-list))))
 		   ;; if not, create a new entry in comm-list.



More information about the gnucash-changes mailing list