summaryrefslogtreecommitdiff
path: root/src/filters.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-09 00:57:56 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-09 00:57:56 -0400
commit391300aea29a755e20a60774be662e4ebd361b66 (patch)
treec493107dd2ac3c2d3c6a90fe5149b591b106e537 /src/filters.cc
parent90bba2a808fef9179c81d59eeb8b03a52e223de4 (diff)
downloadledger-391300aea29a755e20a60774be662e4ebd361b66.tar.gz
ledger-391300aea29a755e20a60774be662e4ebd361b66.tar.bz2
ledger-391300aea29a755e20a60774be662e4ebd361b66.zip
Had to step back from a change that was breaking regular reports.
Diffstat (limited to 'src/filters.cc')
-rw-r--r--src/filters.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/filters.cc b/src/filters.cc
index 4f49718b..a88f21e8 100644
--- a/src/filters.cc
+++ b/src/filters.cc
@@ -191,8 +191,15 @@ void calc_xacts::operator()(xact_t& xact)
add_or_set_value(xdata.total, last_xact->xdata().total);
if (! xdata.has_flags(XACT_EXT_NO_TOTAL)) {
+#if 0
bind_scope_t bound_scope(*amount_expr.get_context(), xact);
- xdata.total += amount_expr.calc();
+ if (xdata.total.is_null())
+ xdata.total = amount_expr.calc();
+ else
+ xdata.total += amount_expr.calc();
+#else
+ xact.add_to_value(xdata.total);
+#endif
}
item_handler<xact_t>::operator()(xact);