Skip to content

Commit

Permalink
Bug 798919 - Inconsistent signs in creating budget
Browse files Browse the repository at this point in the history
further Reversed Balance Accounts fixes
  • Loading branch information
christopherlam committed Jun 4, 2023
1 parent ccc75cf commit d47230a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions gnucash/gnome/gnc-budget-view.c
Original file line number Diff line number Diff line change
Expand Up @@ -1219,6 +1219,9 @@ bgv_get_total_for_account (Account *account, GncBudget *budget, gnc_commodity *n
}
}

if (gnc_reverse_balance (account))
total = gnc_numeric_neg (total);

return total;
}

Expand Down
4 changes: 3 additions & 1 deletion gnucash/gnome/gnc-plugin-page-budget.c
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,9 @@ allperiods_budget_helper (GtkTreeModel *model, GtkTreePath *path,
acct = gnc_budget_view_get_account_from_path (priv->budget_view, path);
num_periods = gnc_budget_get_num_periods (priv->budget);
allvalue = priv->allValue;
allvalue = gnc_numeric_neg (allvalue);

if (gnc_reverse_balance (acct))
allvalue = gnc_numeric_neg (priv->allValueallvalue);

for (i = 0; i < num_periods; i++)
{
Expand Down

0 comments on commit d47230a

Please sign in to comment.