gnucash maint: Bug 797659 - Liabilities in budget report no longer calculate correctly
Christopher Lam
clam at code.gnucash.org
Fri Apr 3 07:08:24 EDT 2020
Updated via https://github.com/Gnucash/gnucash/commit/2329c1c5 (commit)
from https://github.com/Gnucash/gnucash/commit/bedc9631 (commit)
commit 2329c1c508dc4e8849089e17328e8c7c3c05f270
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Thu Apr 2 22:06:35 2020 +0800
Bug 797659 - Liabilities in budget report no longer calculate correctly
candidate fix
diff --git a/gnucash/gnome/gnc-budget-view.c b/gnucash/gnome/gnc-budget-view.c
index 7b44c294a..05559a524 100644
--- a/gnucash/gnome/gnc-budget-view.c
+++ b/gnucash/gnome/gnc-budget-view.c
@@ -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:
@@ -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... */
@@ -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))
@@ -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... */
Summary of changes:
gnucash/gnome/gnc-budget-view.c | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
More information about the gnucash-changes
mailing list