summaryrefslogtreecommitdiff
path: root/src/chain.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-09 14:53:29 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-09 14:53:29 -0400
commit02110394b45fdf4121f00f3484f0caeacb7c404e (patch)
tree61feecac387c78bbcc7c0b0c894c0b8aa4d26d31 /src/chain.cc
parent3ee3b8f327fa1943dba4ef6043559186b26f86b4 (diff)
downloadfork-ledger-02110394b45fdf4121f00f3484f0caeacb7c404e.tar.gz
fork-ledger-02110394b45fdf4121f00f3484f0caeacb7c404e.tar.bz2
fork-ledger-02110394b45fdf4121f00f3484f0caeacb7c404e.zip
Use the report's amount_expr everywhere that computes an xact's amount.
Diffstat (limited to 'src/chain.cc')
-rw-r--r--src/chain.cc11
1 files changed, 6 insertions, 5 deletions
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"));
}
}