From 02110394b45fdf4121f00f3484f0caeacb7c404e Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 9 Feb 2009 14:53:29 -0400 Subject: Use the report's amount_expr everywhere that computes an xact's amount. --- src/chain.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/chain.cc') diff --git a/src/chain.cc b/src/chain.cc index c953366a..ed800c47 100644 --- a/src/chain.cc +++ b/src/chain.cc @@ -92,7 +92,7 @@ xact_handler_ptr chain_xact_handlers(report_t& report, // collapse_xacts causes entries with multiple xacts to appear as entries // with a subtotaled xact for each commodity used. if (report.HANDLED(collapse)) - handler.reset(new collapse_xacts(handler, report.session)); + handler.reset(new collapse_xacts(handler, expr)); // subtotal_xacts combines all the xacts it receives into one subtotal // entry, which has one xact for each commodity in each account. @@ -103,17 +103,18 @@ xact_handler_ptr chain_xact_handlers(report_t& report, // dow_xacts is like period_xacts, except that it reports all the xacts // that fall on each subsequent day of the week. if (report.HANDLED(subtotal)) - handler.reset(new subtotal_xacts(handler)); + handler.reset(new subtotal_xacts(handler, expr)); if (report.HANDLED(dow)) - handler.reset(new dow_xacts(handler)); + handler.reset(new dow_xacts(handler, expr)); else if (report.HANDLED(by_payee)) - handler.reset(new by_payee_xacts(handler)); + handler.reset(new by_payee_xacts(handler, expr)); // interval_xacts groups xacts together based on a time period, such as // weekly or monthly. if (report.HANDLED(period_)) { - handler.reset(new interval_xacts(handler, report.HANDLER(period_).str())); + handler.reset(new interval_xacts(handler, expr, + report.HANDLER(period_).str())); handler.reset(new sort_xacts(handler, "d")); } } -- cgit v1.2.3