mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug 798408 - The calculation in budgets UI and reports are wrong.
gbv_get_accumulated_budget_amount returns a numeric, signed for DISPLAY and must be converted to unreversed before adding to info->total
This commit is contained in:
parent
3857897181
commit
85af1ff2fa
@ -1052,6 +1052,10 @@ budget_accum_helper (Account *account, gpointer data)
|
||||
numeric = gnc_pricedb_convert_balance_nearest_price_t64 (
|
||||
info->pdb, numeric, currency, info->total_currency,
|
||||
gnc_budget_get_period_start_date (info->budget, info->period_num));
|
||||
|
||||
if (gnc_reverse_budget_balance (account, TRUE))
|
||||
numeric = gnc_numeric_neg (numeric);
|
||||
|
||||
info->total = gnc_numeric_add (info->total, numeric, GNC_DENOM_AUTO,
|
||||
GNC_HOW_DENOM_LCD);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user