summaryrefslogtreecommitdiff
path: root/src/filters.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-08 23:57:30 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-08 23:57:30 -0400
commit0cb8049c41b68ab999fbd2c4173c680fb1b545df (patch)
treed3b1b1e75d9a90a1a0ee196b6513c1260ba1e189 /src/filters.cc
parentfccf7e1cb5d2c0810e9b3a4c2cfb7355debbf819 (diff)
downloadledger-0cb8049c41b68ab999fbd2c4173c680fb1b545df.tar.gz
ledger-0cb8049c41b68ab999fbd2c4173c680fb1b545df.tar.bz2
ledger-0cb8049c41b68ab999fbd2c4173c680fb1b545df.zip
Pass amount expression to calc_xacts, to be used for computing the total.
Diffstat (limited to 'src/filters.cc')
-rw-r--r--src/filters.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/filters.cc b/src/filters.cc
index b19c36f1..4f49718b 100644
--- a/src/filters.cc
+++ b/src/filters.cc
@@ -190,8 +190,10 @@ void calc_xacts::operator()(xact_t& xact)
if (last_xact && last_xact->has_xdata())
add_or_set_value(xdata.total, last_xact->xdata().total);
- if (! xdata.has_flags(XACT_EXT_NO_TOTAL))
- xact.add_to_value(xdata.total);
+ if (! xdata.has_flags(XACT_EXT_NO_TOTAL)) {
+ bind_scope_t bound_scope(*amount_expr.get_context(), xact);
+ xdata.total += amount_expr.calc();
+ }
item_handler<xact_t>::operator()(xact);