From 60e6c23ac9711761c39b296b2f1f02d4812f386a Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Mon, 5 Jun 2023 18:56:39 +0800 Subject: [PATCH] Bug 798919 - Inconsistent signs in creating budget, bis bgv_get_total_for_account must return the account budget total. --- gnucash/gnome/gnc-budget-view.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnucash/gnome/gnc-budget-view.c b/gnucash/gnome/gnc-budget-view.c index ccde4668284..dab47171d0b 100644 --- a/gnucash/gnome/gnc-budget-view.c +++ b/gnucash/gnome/gnc-budget-view.c @@ -1219,9 +1219,6 @@ bgv_get_total_for_account (Account *account, GncBudget *budget, gnc_commodity *n } } - if (gnc_reverse_balance (account)) - total = gnc_numeric_neg (total); - return total; } @@ -1240,6 +1237,9 @@ budget_total_col_source (Account *account, GtkTreeViewColumn *col, priv = GNC_BUDGET_VIEW_GET_PRIVATE(budget_view); total = bgv_get_total_for_account (account, priv->budget, NULL); + if (gnc_reverse_balance (account)) + total = gnc_numeric_neg (total); + xaccSPrintAmount (amtbuff, total, gnc_account_print_info (account, TRUE)); if (priv->use_red_color && gnc_numeric_negative_p (total))