r17770 - gnucash/branches/2.2/src/report/report-system - [r17627] Fix the Average Cost price source computation for a certain case.

Andreas Köhler andi5 at cvs.gnucash.org
Sat Dec 13 21:05:00 EST 2008


Author: andi5
Date: 2008-12-13 21:05:00 -0500 (Sat, 13 Dec 2008)
New Revision: 17770
Trac: http://svn.gnucash.org/trac/changeset/17770

Modified:
   gnucash/branches/2.2/src/report/report-system/commodity-utilities.scm
Log:
[r17627] 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.

Patch from 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-12-13 22:08:16 UTC (rev 17769)
+++ gnucash/branches/2.2/src/report/report-system/commodity-utilities.scm	2008-12-14 02:05:00 UTC (rev 17770)
@@ -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