mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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:
parent
9ed6d4b5f6
commit
78ebc1fd43
@ -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
|
||||
|
@ -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,17 +313,22 @@ 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)
|
||||
gnc_numeric_sub (euro_accum->profits,
|
||||
gnc_convert_to_euro(account_currency, amount),
|
||||
gnc_commodity_get_fraction (euro_commodity),
|
||||
GNC_RND_ROUND);
|
||||
euro_accum->profits =
|
||||
gnc_numeric_sub (euro_accum->profits,
|
||||
gnc_convert_to_euro(account_currency, amount),
|
||||
gnc_commodity_get_fraction (euro_commodity),
|
||||
GNC_RND_ROUND);
|
||||
|
||||
if (children != NULL)
|
||||
gnc_ui_accounts_recurse(children, currency_list, euro);
|
||||
|
Loading…
Reference in New Issue
Block a user