From 985fecb0321d0ad5739bece151c8f85b3147e846 Mon Sep 17 00:00:00 2001 From: Michalis Kamprianis Date: Sat, 10 May 2014 01:04:03 +0200 Subject: [PATCH 1/2] Bug 719457 - Template for Home Mortgage Loan isn't properly nested. Several account templates containted accounts with two parents, resulting to incorrect nesting. modified: accounts/C/acctchrt_homeloan.gnucash-xea modified: accounts/C/acctchrt_otherloan.gnucash-xea modified: accounts/C/acctchrt_retiremt.gnucash-xea modified: accounts/C/acctchrt_spouseretire.gnucash-xea modified: accounts/en_GB/acctchrt_homeloan.gnucash-xea modified: accounts/en_GB/acctchrt_otherloan.gnucash-xea modified: accounts/en_GB/acctchrt_retiremt.gnucash-xea modified: accounts/en_GB/acctchrt_spouseretire.gnucash-xea --- accounts/C/acctchrt_homeloan.gnucash-xea | 1 - accounts/C/acctchrt_otherloan.gnucash-xea | 1 - accounts/C/acctchrt_retiremt.gnucash-xea | 1 - accounts/C/acctchrt_spouseretire.gnucash-xea | 1 - accounts/en_GB/acctchrt_homeloan.gnucash-xea | 1 - accounts/en_GB/acctchrt_otherloan.gnucash-xea | 1 - accounts/en_GB/acctchrt_retiremt.gnucash-xea | 1 - accounts/en_GB/acctchrt_spouseretire.gnucash-xea | 1 - 8 files changed, 8 deletions(-) diff --git a/accounts/C/acctchrt_homeloan.gnucash-xea b/accounts/C/acctchrt_homeloan.gnucash-xea index d3850e33e6..ed5a7afe7e 100644 --- a/accounts/C/acctchrt_homeloan.gnucash-xea +++ b/accounts/C/acctchrt_homeloan.gnucash-xea @@ -48,7 +48,6 @@ true - 1972cce2e2364f95b2b0bc014502661d Mortgage Loan diff --git a/accounts/C/acctchrt_otherloan.gnucash-xea b/accounts/C/acctchrt_otherloan.gnucash-xea index 60f7adbf29..50907b279b 100644 --- a/accounts/C/acctchrt_otherloan.gnucash-xea +++ b/accounts/C/acctchrt_otherloan.gnucash-xea @@ -48,7 +48,6 @@ true - 1972cce2e2364f95b2b0bc014502661d Other Loan diff --git a/accounts/C/acctchrt_retiremt.gnucash-xea b/accounts/C/acctchrt_retiremt.gnucash-xea index d591164816..a0dbff85bc 100644 --- a/accounts/C/acctchrt_retiremt.gnucash-xea +++ b/accounts/C/acctchrt_retiremt.gnucash-xea @@ -48,7 +48,6 @@ true - 1972cce2e2364f95b2b0bc014502661d Retirement diff --git a/accounts/C/acctchrt_spouseretire.gnucash-xea b/accounts/C/acctchrt_spouseretire.gnucash-xea index 8cdff464df..77cd3772cf 100644 --- a/accounts/C/acctchrt_spouseretire.gnucash-xea +++ b/accounts/C/acctchrt_spouseretire.gnucash-xea @@ -48,7 +48,6 @@ true - 1972cce2e2364f95b2b0bc014502661d Spouse Retirement diff --git a/accounts/en_GB/acctchrt_homeloan.gnucash-xea b/accounts/en_GB/acctchrt_homeloan.gnucash-xea index d3850e33e6..ed5a7afe7e 100644 --- a/accounts/en_GB/acctchrt_homeloan.gnucash-xea +++ b/accounts/en_GB/acctchrt_homeloan.gnucash-xea @@ -48,7 +48,6 @@ true - 1972cce2e2364f95b2b0bc014502661d Mortgage Loan diff --git a/accounts/en_GB/acctchrt_otherloan.gnucash-xea b/accounts/en_GB/acctchrt_otherloan.gnucash-xea index 60f7adbf29..50907b279b 100644 --- a/accounts/en_GB/acctchrt_otherloan.gnucash-xea +++ b/accounts/en_GB/acctchrt_otherloan.gnucash-xea @@ -48,7 +48,6 @@ true - 1972cce2e2364f95b2b0bc014502661d Other Loan diff --git a/accounts/en_GB/acctchrt_retiremt.gnucash-xea b/accounts/en_GB/acctchrt_retiremt.gnucash-xea index d591164816..a0dbff85bc 100644 --- a/accounts/en_GB/acctchrt_retiremt.gnucash-xea +++ b/accounts/en_GB/acctchrt_retiremt.gnucash-xea @@ -48,7 +48,6 @@ true - 1972cce2e2364f95b2b0bc014502661d Retirement diff --git a/accounts/en_GB/acctchrt_spouseretire.gnucash-xea b/accounts/en_GB/acctchrt_spouseretire.gnucash-xea index 8cdff464df..77cd3772cf 100644 --- a/accounts/en_GB/acctchrt_spouseretire.gnucash-xea +++ b/accounts/en_GB/acctchrt_spouseretire.gnucash-xea @@ -48,7 +48,6 @@ true - 1972cce2e2364f95b2b0bc014502661d Spouse Retirement From f8139efad18f3b6cea36da9209e7d225eee97d67 Mon Sep 17 00:00:00 2001 From: Mike Alexander Date: Sun, 25 May 2014 18:48:44 -0400 Subject: [PATCH 2/2] Always use the price we display to calculate the current value of an account. --- src/report/standard-reports/advanced-portfolio.scm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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)))