diff options
author | John Wiegley <johnw@newartisans.com> | 2004-08-13 17:29:46 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2004-08-13 17:29:46 -0400 |
commit | 0c8dff61edf2db560c92c25468520cd1bc773d77 (patch) | |
tree | 59727c6f574ab9ebe3081d7ed4616efb9d80dd04 /walk.cc | |
parent | 6944e5950a90b17d53a6efe87c71512085d4e1f7 (diff) | |
download | fork-ledger-0c8dff61edf2db560c92c25468520cd1bc773d77.tar.gz fork-ledger-0c8dff61edf2db560c92c25468520cd1bc773d77.tar.bz2 fork-ledger-0c8dff61edf2db560c92c25468520cd1bc773d77.zip |
fixed problem with writing binary amounts
Diffstat (limited to 'walk.cc')
-rw-r--r-- | walk.cc | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -20,8 +20,12 @@ void sort_transactions::flush() void calc_transactions::operator()(transaction_t * xact) { - if (last_xact) + if (last_xact) { xact->total += last_xact->total; + xact->index = last_xact->index + 1; + } else { + xact->index = 0; + } if (inverted) { xact->amount.negate(); @@ -29,7 +33,6 @@ void calc_transactions::operator()(transaction_t * xact) } xact->total += *xact; - xact->index = last_xact ? last_xact->index + 1 : 0; (*handler)(xact); |