diff --git a/src/report/standard-reports/advanced-portfolio.scm b/src/report/standard-reports/advanced-portfolio.scm index 77953ebf71..101b0f2754 100644 --- a/src/report/standard-reports/advanced-portfolio.scm +++ b/src/report/standard-reports/advanced-portfolio.scm @@ -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) - (gnc:gnc-monetary-amount price) + (if use-txn + (gnc:gnc-monetary-amount price) + (gnc-price-get-value price)) currency-frac GNC-RND-ROUND)) (exchange-fn fromunits tocurrency)))