gnucash maint: Bug 796409 - Incorrect Current Value for Stocks

John Ralls jralls at code.gnucash.org
Sat May 26 13:33:32 EDT 2018


Updated	 via  https://github.com/Gnucash/gnucash/commit/6b5ee8f5 (commit)
	from  https://github.com/Gnucash/gnucash/commit/243bf8af (commit)



commit 6b5ee8f5e89837588267bf1f4eb94addcd181d2c
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat May 26 10:32:14 2018 -0700

    Bug 796409 - Incorrect Current Value for Stocks
    
    This is in the register summary bar. Missed calculating the value in
    8877f86.

diff --git a/gnucash/gnome/gnc-split-reg.c b/gnucash/gnome/gnc-split-reg.c
index d934cb3..6a28a28 100644
--- a/gnucash/gnome/gnc-split-reg.c
+++ b/gnucash/gnome/gnc-split-reg.c
@@ -569,8 +569,11 @@ gsr_redraw_all_cb (GnucashRegister *g_reg, gpointer data)
         QofBook *book = gnc_account_get_book (leader);
         GNCPriceDB *pricedb = gnc_pricedb_get_db (book);
         gnc_commodity *currency = gnc_default_currency ();
+        gnc_numeric value =
+            gnc_pricedb_convert_balance_latest_price (pricedb, amount,
+                                                      commodity, currency);
         print_info = gnc_commodity_print_info (currency, TRUE);
-        xaccSPrintAmount (string, amount, print_info);
+        xaccSPrintAmount (string, value, print_info);
         gnc_set_label_color (gsr->value_label, amount);
         gtk_label_set_text (GTK_LABEL (gsr->value_label), string);
 



Summary of changes:
 gnucash/gnome/gnc-split-reg.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)



More information about the gnucash-changes mailing list