diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/chain.cc | 9 | ||||
-rw-r--r-- | src/report.h | 13 |
2 files changed, 18 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 diff --git a/src/report.h b/src/report.h index 0c2be64d..57cef3c5 100644 --- a/src/report.h +++ b/src/report.h @@ -537,6 +537,19 @@ public: OPTION(report_t, related_all); OPTION(report_t, revalued); OPTION(report_t, revalued_only); + + OPTION__ + (report_t, revalued_total_, + expr_t expr; + CTOR(report_t, revalued_total_) {} + void set_expr(const string& str) { + expr = str; + on(str); + } + DO_(args) { + set_expr(args[0].to_string()); + }); + OPTION(report_t, set_account_); OPTION(report_t, set_payee_); OPTION(report_t, set_price_); |