diff --git a/gnucash/gnome/gnc-budget-view.c b/gnucash/gnome/gnc-budget-view.c index 05559a524d2..7b44c294acf 100644 --- a/gnucash/gnome/gnc-budget-view.c +++ b/gnucash/gnome/gnc-budget-view.c @@ -1202,9 +1202,10 @@ totals_col_source (GtkTreeViewColumn *col, GtkCellRenderer *cell, switch (row_type) { case TOTALS_TYPE_ASSET_LIAB_EQ: - if ((acctype != ACCT_TYPE_ASSET) && - (acctype != ACCT_TYPE_EQUITY) && - (acctype != ACCT_TYPE_LIABILITY)) + if ((acctype == ACCT_TYPE_LIABILITY) || + (acctype == ACCT_TYPE_EQUITY)) + neg = !neg; + else if (acctype != ACCT_TYPE_ASSET) continue; break; case TOTALS_TYPE_EXPENSES: @@ -1217,7 +1218,10 @@ totals_col_source (GtkTreeViewColumn *col, GtkCellRenderer *cell, neg = !neg; break; case TOTALS_TYPE_REMAINDER: - neg = !neg; + if ((acctype == ACCT_TYPE_ASSET) || + (acctype == ACCT_TYPE_INCOME) || + (acctype == ACCT_TYPE_EXPENSE)) + neg = !neg; break; default: continue; /* don't count if unexpected total row type is passed in... */ @@ -1231,7 +1235,6 @@ totals_col_source (GtkTreeViewColumn *col, GtkCellRenderer *cell, switch (row_type) { case TOTALS_TYPE_ASSET_LIAB_EQ: - neg = (acctype == ACCT_TYPE_ASSET); if ((acctype != ACCT_TYPE_ASSET) && (acctype != ACCT_TYPE_LIABILITY) && (acctype != ACCT_TYPE_EQUITY)) @@ -1246,8 +1249,7 @@ totals_col_source (GtkTreeViewColumn *col, GtkCellRenderer *cell, continue; break; case TOTALS_TYPE_REMAINDER: - neg = ((acctype == ACCT_TYPE_ASSET) || - (acctype == ACCT_TYPE_EXPENSE)); + neg = (acctype != ACCT_TYPE_INCOME); break; default: continue; /* don't count if unexpected total row type is passed in... */