diff --git a/ChangeLog b/ChangeLog index 61e40d0a13..f2ef8803e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2000-03-10 Dave Peticolas + + * src/MultiLedger.c (xaccLedgerDisplayRefresh): don't reverse the + balances ever -- let the GUI do it. + + * src/motif/RegWindow.c (regRefresh): reverse the balances + for INCOME and expense. + 2000-03-09 Dave Peticolas * src/gnome/window-register.c (regRefresh): print diff --git a/src/MultiLedger.c b/src/MultiLedger.c index 8c8d38f877..5715afb15a 100644 --- a/src/MultiLedger.c +++ b/src/MultiLedger.c @@ -406,8 +406,6 @@ xaccLedgerDisplayGeneral (Account *lead_acc, Account **acclist, int ledger_type) void xaccLedgerDisplayRefresh (xaccLedgerDisplay *regData) { - int typo; - /* If we don't really need the redraw, don't do it. */ if (!(regData->dirty)) return; regData->dirty = 0; /* mark clean */ @@ -416,41 +414,23 @@ xaccLedgerDisplayRefresh (xaccLedgerDisplay *regData) * assign a default source account for a "blank split" * that is attached to the bottom of the register. * The "blank split" is what the user edits to create - * new splits and get them into the system. - */ + * new splits and get them into the system. */ xaccSRLoadRegister (regData->ledger, xaccQueryGetSplits (regData->query), regData->leader); - /* hack alert -- this computation of totals is incorrect * for multi-account ledgers */ - /* provide some convenience data for the ture GUI window. - * If the GUI wants to display yet other stuff, its on its own. - */ - /* xaccAccountRecomputeBalance(regData->leader); */ + /* provide some convenience data for the the GUI window. + * If the GUI wants to display yet other stuff, it's on its own. */ regData->balance = xaccAccountGetBalance (regData->leader); regData->clearedBalance = xaccAccountGetClearedBalance (regData->leader); regData->reconciledBalance = xaccAccountGetReconciledBalance (regData->leader); - /* for income and expense acounts, we have to reverse - * the meaning of balance, since, in a dual entry - * system, income will show up as a credit to a - * bank account, and a debit to the income account. - * Thus, positive and negative are interchanged */ - typo = regData->type & REG_TYPE_MASK; - if ((INCOME_REGISTER == typo) || - (EXPENSE_REGISTER == typo)) { - regData->balance = - (regData->balance); - regData->clearedBalance = - (regData->clearedBalance); - regData->reconciledBalance = - (regData->reconciledBalance); - } - /* OK, now tell this specific GUI window to redraw itself ... */ - if (regData->redraw) { - (regData->redraw) (regData); - } + if (regData->redraw) + (regData->redraw) (regData); } /********************************************************************\