summaryrefslogtreecommitdiff
path: root/src/filters.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-08-10 00:57:29 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-08-10 00:57:29 -0400
commitc9d575abceb672d1c23383d973adee40daeecda8 (patch)
treedea80d45787359712e582cc7bf5d700a4419ec30 /src/filters.cc
parent65510c9a9f0d588a8d0285072dfc2e2a153e5253 (diff)
downloadledger-c9d575abceb672d1c23383d973adee40daeecda8.tar.gz
ledger-c9d575abceb672d1c23383d973adee40daeecda8.tar.bz2
ledger-c9d575abceb672d1c23383d973adee40daeecda8.zip
Basic balance reports are working again!
Diffstat (limited to 'src/filters.cc')
-rw-r--r--src/filters.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/filters.cc b/src/filters.cc
index e5455423..f9115c37 100644
--- a/src/filters.cc
+++ b/src/filters.cc
@@ -128,10 +128,7 @@ void calc_xacts::operator()(xact_t& xact)
xact_t::xdata_t& xdata(xact.xdata());
if (last_xact && last_xact->has_xdata()) {
- if (xdata.total.is_null())
- xdata.total = last_xact->xdata().total;
- else
- xdata.total += last_xact->xdata().total;
+ add_or_set_value(xdata.total, last_xact->xdata().total);
xdata.index = last_xact->xdata().index + 1;
} else {
xdata.index = 0;