Watch out for a missing pricing transaction when looking for price data.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18524 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Mike Alexander 2009-12-17 08:04:48 +00:00
parent 812a9fa6c5
commit 003d7209a9

View File

@ -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)