diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-15 23:00:16 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-15 23:00:16 -0400 |
commit | 8c2a70e1979377660ab0b88d0161b4b7f5be62f0 (patch) | |
tree | b7e9a20e9802b90da1d674ee3d356ceb42ec2e84 /src/chain.cc | |
parent | 14ffc2b31a38a7fdd25bd93fe21d17132b16062a (diff) | |
download | fork-ledger-8c2a70e1979377660ab0b88d0161b4b7f5be62f0.tar.gz fork-ledger-8c2a70e1979377660ab0b88d0161b4b7f5be62f0.tar.bz2 fork-ledger-8c2a70e1979377660ab0b88d0161b4b7f5be62f0.zip |
Made several of the filters more context aware
This resolves certain issues where value expressions were not being
looked up within their full context.
Diffstat (limited to 'src/chain.cc')
-rw-r--r-- | src/chain.cc | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/chain.cc b/src/chain.cc index 62aac7b0..dae72db1 100644 --- a/src/chain.cc +++ b/src/chain.cc @@ -58,7 +58,8 @@ xact_handler_ptr chain_xact_handlers(report_t& report, if (report.HANDLED(display_)) handler.reset(new filter_xacts (handler, item_predicate(report.HANDLER(display_).str(), - report.what_to_keep()))); + report.what_to_keep()), + report)); // calc_xacts computes the running total. When this appears will // determine, for example, whether filtered xacts are included or excluded @@ -71,7 +72,8 @@ xact_handler_ptr chain_xact_handlers(report_t& report, if (report.HANDLED(only_)) handler.reset(new filter_xacts (handler, item_predicate(report.HANDLER(only_).str(), - report.what_to_keep()))); + report.what_to_keep()), + report)); // sort_xacts will sort all the xacts it sees, based on the `sort_order' // value expression. @@ -146,7 +148,8 @@ xact_handler_ptr chain_xact_handlers(report_t& report, "Report predicate expression = " << report.HANDLER(limit_).str()); handler.reset(new filter_xacts (handler, item_predicate(report.HANDLER(limit_).str(), - report.what_to_keep()))); + report.what_to_keep()), + report)); } // budget_xacts takes a set of xacts from a data file and uses them to @@ -169,13 +172,15 @@ xact_handler_ptr chain_xact_handlers(report_t& report, if (report.HANDLED(limit_)) handler.reset(new filter_xacts (handler, item_predicate(report.HANDLER(limit_).str(), - report.what_to_keep()))); + report.what_to_keep()), + report)); } else if (report.HANDLED(forecast_)) { forecast_xacts * forecast_handler = new forecast_xacts(handler, item_predicate(report.HANDLER(forecast_).str(), - report.what_to_keep())); + report.what_to_keep()), + report); forecast_handler->add_period_entries(report.session.journal->period_entries); handler.reset(forecast_handler); @@ -183,7 +188,8 @@ xact_handler_ptr chain_xact_handlers(report_t& report, if (report.HANDLED(limit_)) handler.reset(new filter_xacts (handler, item_predicate(report.HANDLER(limit_).str(), - report.what_to_keep()))); + report.what_to_keep()), + report)); } if (report.HANDLED(comm_as_payee)) |