Always use the price we display to calculate the current value of an account.

This commit is contained in:
Mike Alexander 2014-05-25 18:48:44 -04:00
parent 985fecb032
commit f8139efad1

View File

@ -438,12 +438,13 @@
)
(define (my-exchange-fn fromunits tocurrency)
(if (and use-txn
(gnc-commodity-equiv currency tocurrency)
(if (and (gnc-commodity-equiv currency tocurrency)
(gnc-commodity-equiv (gnc:gnc-monetary-commodity fromunits) commodity))
(gnc:make-gnc-monetary tocurrency
(gnc-numeric-mul (gnc:gnc-monetary-amount fromunits)
(if use-txn
(gnc:gnc-monetary-amount price)
(gnc-price-get-value price))
currency-frac GNC-RND-ROUND))
(exchange-fn fromunits tocurrency)))