diff options
author | John Wiegley <johnw@newartisans.com> | 2009-10-31 03:07:15 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-10-31 03:07:15 -0400 |
commit | b0f12c600c8080d11d8f514aa7d4149323da6803 (patch) | |
tree | 1d295ceb2b49308184848a754d8572bb2376de41 /src/chain.cc | |
parent | 451b0e9b767d67cb116549b6fb508ace83af7d60 (diff) | |
download | ledger-b0f12c600c8080d11d8f514aa7d4149323da6803.tar.gz ledger-b0f12c600c8080d11d8f514aa7d4149323da6803.tar.bz2 ledger-b0f12c600c8080d11d8f514aa7d4149323da6803.zip |
Added a --forecast-years option
This sets how many years of forecasting Ledger will do before it
terminates the attempt.
Diffstat (limited to 'src/chain.cc')
-rw-r--r-- | src/chain.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/chain.cc b/src/chain.cc index d7d1460b..db52269c 100644 --- a/src/chain.cc +++ b/src/chain.cc @@ -209,7 +209,11 @@ post_handler_ptr chain_post_handlers(report_t& report, = new forecast_posts(handler, item_predicate(report.HANDLER(forecast_while_).str(), report.what_to_keep()), - report); + report, + report.HANDLED(forecast_years_) ? + static_cast<std::size_t> + (report.HANDLER(forecast_years_).value.to_long()) : + 5UL); forecast_handler->add_period_xacts(report.session.journal->period_xacts); handler.reset(forecast_handler); |