Skip to content

Commit

Permalink
Revert "Bug 797659 - Liabilities in budget report no longer calculate…
Browse files Browse the repository at this point in the history
… correctly"

This reverts commit 2329c1c.

Reverted for snap release. Not tested thoroughly yet. Bug 797659 need
further betatesters.
  • Loading branch information
christopherlam committed Apr 10, 2020
1 parent 9733b4c commit 642885a
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions gnucash/gnome/gnc-budget-view.c
Expand Up @@ -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:
Expand All @@ -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... */
Expand All @@ -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))
Expand All @@ -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... */
Expand Down

0 comments on commit 642885a

Please sign in to comment.