Skip to content

Commit

Permalink
Merge branch 'master-budget-changes' #1238
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherlam committed Sep 16, 2022
2 parents 8e6c07d + 42a22ee commit 58c1a51
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions gnucash/gnome/gnc-budget-view.c
Expand Up @@ -1040,9 +1040,6 @@ budget_accum_helper (Account *account, gpointer data)
info->pdb, numeric, currency, info->total_currency,
gnc_budget_get_period_start_date (info->budget, info->period_num));

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

info->total = gnc_numeric_add (info->total, numeric, GNC_DENOM_AUTO,
GNC_HOW_DENOM_LCD);
}
Expand All @@ -1068,9 +1065,6 @@ gbv_get_accumulated_budget_amount (GncBudget *budget, Account *account, guint pe
else
info.total = gnc_budget_get_account_period_value (budget, account, period_num);

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

return info.total;
}

Expand Down Expand Up @@ -1109,6 +1103,10 @@ budget_col_source (Account *account, GtkTreeViewColumn *col,
gtk_style_context_get_color (stylectxt, GTK_STATE_FLAG_NORMAL, &color);

numeric = gbv_get_accumulated_budget_amount (priv->budget, account, period_num);

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

xaccSPrintAmount (amtbuff, numeric, gnc_account_print_info (account, FALSE));
if (gnc_is_dark_theme (&color))
g_object_set (cell, "foreground",
Expand Down Expand Up @@ -1184,9 +1182,6 @@ bgv_get_total_for_account (Account *account, GncBudget *budget, gnc_commodity *n
{
numeric = gbv_get_accumulated_budget_amount (budget, account, period_num);

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

if (new_currency)
{
numeric = gnc_pricedb_convert_balance_nearest_price_t64 (
Expand Down

0 comments on commit 58c1a51

Please sign in to comment.