mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-29 12:14:31 -06:00
Bug 797326 - Enhancement: budget's Estimate tool should ignore Closing Entries
addition to estimate-budget tool to optionally ignore closing entries using brand new API
This commit is contained in:
parent
198570d8c8
commit
8b8c957ed2
@ -892,9 +892,10 @@ estimate_budget_helper(GtkTreeModel *model, GtkTreePath *path,
|
||||
|
||||
if (priv->useAvg && num_periods)
|
||||
{
|
||||
num = xaccAccountGetBalanceChangeForPeriod(acct,
|
||||
recurrenceGetPeriodTime(&priv->r, 0, FALSE),
|
||||
num = xaccAccountGetNoclosingBalanceChangeForPeriod
|
||||
(acct, recurrenceGetPeriodTime(&priv->r, 0, FALSE),
|
||||
recurrenceGetPeriodTime(&priv->r, num_periods - 1, TRUE), TRUE);
|
||||
|
||||
num = gnc_numeric_div(num,
|
||||
gnc_numeric_create(num_periods, 1),
|
||||
GNC_DENOM_AUTO,
|
||||
@ -913,7 +914,10 @@ estimate_budget_helper(GtkTreeModel *model, GtkTreePath *path,
|
||||
{
|
||||
for (i = 0; i < num_periods; i++)
|
||||
{
|
||||
num = recurrenceGetAccountPeriodValue(&priv->r, acct, i);
|
||||
num = xaccAccountGetNoclosingBalanceChangeForPeriod
|
||||
(acct, recurrenceGetPeriodTime(&priv->r, i, FALSE),
|
||||
recurrenceGetPeriodTime(&priv->r, i, TRUE), TRUE);
|
||||
|
||||
if (!gnc_numeric_check(num))
|
||||
{
|
||||
if (gnc_reverse_balance(acct))
|
||||
|
Loading…
Reference in New Issue
Block a user