diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-21 00:12:22 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-21 00:12:22 -0400 |
commit | 23725ffafbbe1d4463f9cfd805f4f59f4c8a2591 (patch) | |
tree | e28681157228a09d0bf729edb1100591e93d052e /src/chain.cc | |
parent | 3c18d3054f36dec049809cbf3321eeeeadcf2349 (diff) | |
download | fork-ledger-23725ffafbbe1d4463f9cfd805f4f59f4c8a2591.tar.gz fork-ledger-23725ffafbbe1d4463f9cfd805f4f59f4c8a2591.tar.bz2 fork-ledger-23725ffafbbe1d4463f9cfd805f4f59f4c8a2591.zip |
Restored --forecast, now also --forecast-while
Diffstat (limited to 'src/chain.cc')
-rw-r--r-- | src/chain.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/chain.cc b/src/chain.cc index c67de108..2fc6123e 100644 --- a/src/chain.cc +++ b/src/chain.cc @@ -48,6 +48,14 @@ xact_handler_ptr chain_xact_handlers(report_t& report, expr.set_context(&report); if (! only_preliminaries) { + // Make sure only forecast transactions which match are allowed through + if (report.HANDLED(forecast_while_)) { + handler.reset(new filter_xacts + (handler, item_predicate(report.HANDLER(forecast_while_).str(), + report.what_to_keep()), + report)); + } + // truncate_entries cuts off a certain number of _entries_ from being // displayed. It does not affect calculation. if (report.HANDLED(head_) || report.HANDLED(tail_)) @@ -183,10 +191,10 @@ xact_handler_ptr chain_xact_handlers(report_t& report, report.what_to_keep()), report)); } - else if (report.HANDLED(forecast_)) { + else if (report.HANDLED(forecast_while_)) { forecast_xacts * forecast_handler = new forecast_xacts(handler, - item_predicate(report.HANDLER(forecast_).str(), + item_predicate(report.HANDLER(forecast_while_).str(), report.what_to_keep()), report); forecast_handler->add_period_entries(report.session.journal->period_entries); |