2001-06-25 Dave Peticolas <dave@krondo.com>

* src/gnome/window-main-summarybar.c: fix bug in euro profit
	calculation. use share prices in calculating totals.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@4786 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Dave Peticolas 2001-06-25 23:38:43 +00:00
parent 9ed6d4b5f6
commit 78ebc1fd43
2 changed files with 18 additions and 6 deletions

View File

@ -1,5 +1,8 @@
2001-06-25 Dave Peticolas <dave@krondo.com>
* src/gnome/window-main-summarybar.c: fix bug in euro profit
calculation. use share prices in calculating totals.
* AUTHORS: credits
* doc/sgml/C/xacc-about.sgml: credits

View File

@ -291,7 +291,11 @@ gnc_ui_accounts_recurse (AccountGroup *group, GList **currency_list,
case MUTUAL:
case CREDIT:
case LIABILITY:
amount = xaccAccountGetBalance(account);
amount = gnc_ui_account_get_balance (account, FALSE);
/* unreverse sign */
if (gnc_reverse_balance (account))
amount = gnc_numeric_neg (amount);
currency_accum->assets =
gnc_numeric_add (currency_accum->assets, amount,
gnc_commodity_get_fraction (account_currency),
@ -309,13 +313,18 @@ gnc_ui_accounts_recurse (AccountGroup *group, GList **currency_list,
break;
case INCOME:
case EXPENSE:
amount = xaccAccountGetBalance(account);
amount = gnc_ui_account_get_balance (account, FALSE);
/* unreverse sign */
if (gnc_reverse_balance (account))
amount = gnc_numeric_neg (amount);
currency_accum->profits =
gnc_numeric_sub (currency_accum->profits, amount,
gnc_commodity_get_fraction (account_currency),
GNC_RND_ROUND);
if (euro)
euro_accum->profits =
gnc_numeric_sub (euro_accum->profits,
gnc_convert_to_euro(account_currency, amount),
gnc_commodity_get_fraction (euro_commodity),