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>
|
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
|
* AUTHORS: credits
|
||||||
|
|
||||||
* doc/sgml/C/xacc-about.sgml: credits
|
* doc/sgml/C/xacc-about.sgml: credits
|
||||||
|
@ -291,7 +291,11 @@ gnc_ui_accounts_recurse (AccountGroup *group, GList **currency_list,
|
|||||||
case MUTUAL:
|
case MUTUAL:
|
||||||
case CREDIT:
|
case CREDIT:
|
||||||
case LIABILITY:
|
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 =
|
currency_accum->assets =
|
||||||
gnc_numeric_add (currency_accum->assets, amount,
|
gnc_numeric_add (currency_accum->assets, amount,
|
||||||
gnc_commodity_get_fraction (account_currency),
|
gnc_commodity_get_fraction (account_currency),
|
||||||
@ -309,13 +313,18 @@ gnc_ui_accounts_recurse (AccountGroup *group, GList **currency_list,
|
|||||||
break;
|
break;
|
||||||
case INCOME:
|
case INCOME:
|
||||||
case EXPENSE:
|
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 =
|
currency_accum->profits =
|
||||||
gnc_numeric_sub (currency_accum->profits, amount,
|
gnc_numeric_sub (currency_accum->profits, amount,
|
||||||
gnc_commodity_get_fraction (account_currency),
|
gnc_commodity_get_fraction (account_currency),
|
||||||
GNC_RND_ROUND);
|
GNC_RND_ROUND);
|
||||||
|
|
||||||
if (euro)
|
if (euro)
|
||||||
|
euro_accum->profits =
|
||||||
gnc_numeric_sub (euro_accum->profits,
|
gnc_numeric_sub (euro_accum->profits,
|
||||||
gnc_convert_to_euro(account_currency, amount),
|
gnc_convert_to_euro(account_currency, amount),
|
||||||
gnc_commodity_get_fraction (euro_commodity),
|
gnc_commodity_get_fraction (euro_commodity),
|
||||||
|
Loading…
Reference in New Issue
Block a user