Bug 798864 - Budget Reporting on select reports are wrong

net-income must add income and expense accounts. recalculate the
net-income from budget amounts, instead of calculating from
revenue-total and expense-total which were negated for presentation.

this fixes a test which was testing incorrect amounts
This commit is contained in:
Christopher Lam 2023-04-17 12:48:16 +08:00
parent b1cf200ad0
commit bff78f620a
2 changed files with 6 additions and 2 deletions

View File

@ -428,7 +428,11 @@
(gnc:get-assoc-account-balances-total expense-account-balances))
(net-income
(gnc:collector- revenue-total expense-total))
(gnc:collector-
(gnc:get-assoc-account-balances-total
(get-assoc-account-balances-budget
budget (append revenue-accounts expense-accounts)
period-start period-end gnc:budget-account-get-net))))
(table-env
(list

View File

@ -179,7 +179,7 @@
sxml))
(test-equal "net loss for budget"
'("Net loss for Budget test budget" "$285.00")
'("Net income for Budget test budget" "$105.00")
((sxpath '(// table // (tr 2) // table // (tr 5) // *text*))
sxml)))))