diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-23 15:37:39 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-23 15:37:39 -0400 |
commit | a576842865a4f5238dd029dd748c6628baf72a51 (patch) | |
tree | f4dfc9c77db9472d8473f391629032b7f08e4603 /src/chain.cc | |
parent | aff7b56673dc7af1fd597c1e847fa33d75cbd704 (diff) | |
download | fork-ledger-a576842865a4f5238dd029dd748c6628baf72a51.tar.gz fork-ledger-a576842865a4f5238dd029dd748c6628baf72a51.tar.bz2 fork-ledger-a576842865a4f5238dd029dd748c6628baf72a51.zip |
Added --revalued-total option, used by --gain
This option sets the total by which revalued transactions are
determined. Only needed if the display total is not appropriate.
Diffstat (limited to 'src/chain.cc')
-rw-r--r-- | src/chain.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/chain.cc b/src/chain.cc index 2a494fda..950afc32 100644 --- a/src/chain.cc +++ b/src/chain.cc @@ -78,10 +78,11 @@ xact_handler_ptr chain_xact_handlers(report_t& report, // changes in market value of commodities, which otherwise would affect // the running total unpredictably. if (report.HANDLED(revalued)) - handler.reset(new changed_value_xacts(handler, - report.HANDLER(display_total_).expr, - report, - report.HANDLED(revalued_only))); + handler.reset(new changed_value_xacts + (handler, report.HANDLED(revalued_total_) ? + report.HANDLER(revalued_total_).expr : + report.HANDLER(display_total_).expr, + report, report.HANDLED(revalued_only))); // calc_xacts computes the running total. When this appears will // determine, for example, whether filtered xacts are included or excluded |