gnucash maint: Always use the price we display to calculate the current value of an account.
Mike Alexander
mta at code.gnucash.org
Sun May 25 18:38:11 EDT 2014
Updated via https://github.com/Gnucash/gnucash/commit/f8139efa (commit)
from https://github.com/Gnucash/gnucash/commit/985fecb0 (commit)
commit f8139efad18f3b6cea36da9209e7d225eee97d67
Author: Mike Alexander <mta at umich.edu>
Date: Sun May 25 18:48:44 2014 -0400
Always use the price we display to calculate the current value of an account.
diff --git a/src/report/standard-reports/advanced-portfolio.scm b/src/report/standard-reports/advanced-portfolio.scm
index 77953eb..101b0f2 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)))
Summary of changes:
src/report/standard-reports/advanced-portfolio.scm | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
More information about the gnucash-changes
mailing list