|
|
|
|
@ -496,13 +496,13 @@ gbv_create_widget (GncBudgetView *budget_view)
|
|
|
|
|
// Create totals tree view
|
|
|
|
|
totals_tree_model = gtk_list_store_new (4, G_TYPE_STRING, G_TYPE_INT, G_TYPE_STRING, G_TYPE_STRING);
|
|
|
|
|
gtk_list_store_append (totals_tree_model, &iter);
|
|
|
|
|
gtk_list_store_set (totals_tree_model, &iter, 0, _("Inflow from Income"),
|
|
|
|
|
gtk_list_store_set (totals_tree_model, &iter, 0, _("Income"),
|
|
|
|
|
1, TOTALS_TYPE_INCOME, 2, " ", 3, " ", -1);
|
|
|
|
|
gtk_list_store_append (totals_tree_model, &iter);
|
|
|
|
|
gtk_list_store_set (totals_tree_model, &iter, 0, _("Outflow to Expenses"),
|
|
|
|
|
gtk_list_store_set (totals_tree_model, &iter, 0, _("Expenses"),
|
|
|
|
|
1, TOTALS_TYPE_EXPENSES, 2, " ", 3, " ", -1);
|
|
|
|
|
gtk_list_store_append (totals_tree_model, &iter);
|
|
|
|
|
gtk_list_store_set (totals_tree_model, &iter, 0, _("Outflow to Asset/Equity/Liability"),
|
|
|
|
|
gtk_list_store_set (totals_tree_model, &iter, 0, _("Transfer"),
|
|
|
|
|
1, TOTALS_TYPE_ASSET_LIAB_EQ, 2, " ", 3, " ", -1);
|
|
|
|
|
gtk_list_store_append (totals_tree_model, &iter);
|
|
|
|
|
gtk_list_store_set (totals_tree_model, &iter, 0, _("Remaining to Budget"),
|
|
|
|
|
@ -1329,11 +1329,11 @@ 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_LIABILITY) &&
|
|
|
|
|
(acctype != ACCT_TYPE_EQUITY))
|
|
|
|
|
continue;
|
|
|
|
|
neg = !neg;
|
|
|
|
|
break;
|
|
|
|
|
case TOTALS_TYPE_EXPENSES:
|
|
|
|
|
if (acctype != ACCT_TYPE_EXPENSE)
|
|
|
|
|
@ -1345,10 +1345,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... */
|
|
|
|
|
@ -1366,6 +1363,7 @@ totals_col_source (GtkTreeViewColumn *col, GtkCellRenderer *cell,
|
|
|
|
|
(acctype != ACCT_TYPE_LIABILITY) &&
|
|
|
|
|
(acctype != ACCT_TYPE_EQUITY))
|
|
|
|
|
continue;
|
|
|
|
|
neg = (acctype == ACCT_TYPE_ASSET);
|
|
|
|
|
break;
|
|
|
|
|
case TOTALS_TYPE_EXPENSES:
|
|
|
|
|
if (acctype != ACCT_TYPE_EXPENSE)
|
|
|
|
|
@ -1376,7 +1374,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... */
|
|
|
|
|
|