change to keep all credited amounts positive

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@272 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Linas Vepstas 1997-12-04 11:29:03 +00:00
parent c56d88f30e
commit 989b0f25ab

View File

@ -557,6 +557,18 @@ regRefresh( RegWindow *regData )
NULL, NULL, NULL, delta_rows );
}
/* try to keep all amounts positive */
for (i=0; i<ntrans; i++) {
trans = tarray[i];
if (0.0 > trans->damount) {
struct _account *tmp;
tmp = trans->credit;
trans->credit = trans->debit;
trans->debit = tmp;
trans->damount = - (trans->damount);
}
}
/* and fill in the data for the matrix: */
for (i=0; i<ntrans; i++) {
int row;