Skip to content

Commit

Permalink
Bug 797659 - Liabilities in budget report no longer calculate correctly
Browse files Browse the repository at this point in the history
candidate fix
  • Loading branch information
christopherlam committed Apr 2, 2020
1 parent bedc963 commit 2329c1c
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions gnucash/gnome/gnc-budget-view.c
Expand Up @@ -1202,10 +1202,9 @@ totals_col_source (GtkTreeViewColumn *col, GtkCellRenderer *cell,
switch (row_type)
{
case TOTALS_TYPE_ASSET_LIAB_EQ:
if ((acctype == ACCT_TYPE_LIABILITY) ||
(acctype == ACCT_TYPE_EQUITY))
neg = !neg;
else if (acctype != ACCT_TYPE_ASSET)
if ((acctype != ACCT_TYPE_ASSET) &&
(acctype != ACCT_TYPE_EQUITY) &&
(acctype != ACCT_TYPE_LIABILITY))
continue;
break;
case TOTALS_TYPE_EXPENSES:
Expand All @@ -1218,10 +1217,7 @@ totals_col_source (GtkTreeViewColumn *col, GtkCellRenderer *cell,
neg = !neg;
break;
case TOTALS_TYPE_REMAINDER:
if ((acctype == ACCT_TYPE_ASSET) ||
(acctype == ACCT_TYPE_INCOME) ||
(acctype == ACCT_TYPE_EXPENSE))
neg = !neg;
neg = !neg;
break;
default:
continue; /* don't count if unexpected total row type is passed in... */
Expand All @@ -1235,6 +1231,7 @@ 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))
Expand All @@ -1249,7 +1246,8 @@ totals_col_source (GtkTreeViewColumn *col, GtkCellRenderer *cell,
continue;
break;
case TOTALS_TYPE_REMAINDER:
neg = (acctype != ACCT_TYPE_INCOME);
neg = ((acctype == ACCT_TYPE_ASSET) ||
(acctype == ACCT_TYPE_EXPENSE));
break;
default:
continue; /* don't count if unexpected total row type is passed in... */
Expand Down

0 comments on commit 2329c1c

Please sign in to comment.