r18524 - gnucash/trunk/src/report/standard-reports - Watch out for a missing pricing transaction when looking for price data.

Mike Alexander mta at code.gnucash.org
Thu Dec 17 03:04:48 EST 2009


Author: mta
Date: 2009-12-17 03:04:48 -0500 (Thu, 17 Dec 2009)
New Revision: 18524
Trac: http://svn.gnucash.org/trac/changeset/18524

Modified:
   gnucash/trunk/src/report/standard-reports/advanced-portfolio.scm
Log:
Watch out for  a missing pricing transaction when looking for price data.

Modified: gnucash/trunk/src/report/standard-reports/advanced-portfolio.scm
===================================================================
--- gnucash/trunk/src/report/standard-reports/advanced-portfolio.scm	2009-12-17 08:03:23 UTC (rev 18523)
+++ gnucash/trunk/src/report/standard-reports/advanced-portfolio.scm	2009-12-17 08:04:48 UTC (rev 18524)
@@ -614,7 +614,7 @@
 	    ;; now we determine which price data to use, the pricelist or the txn
 	    ;; and if we have a choice, use whichever is newest.
 	    (set! use-txn (if (not price) #t 
-			      (if prefer-pricelist #f
+			      (if (or prefer-pricelist (not pricing-txn)) #f
 				  (if (not (gnc:timepair-le txn-date (gnc-price-get-time price)))
 				      #t #f))))
 	    (gnc:debug "use txn is " use-txn)



More information about the gnucash-changes mailing list