summaryrefslogtreecommitdiff
path: root/src/chain.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-23 01:51:23 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-23 01:51:23 -0400
commit9f53efbf5f8e49b9c4dbe8c3ff595e99903b3aab (patch)
treeacf41ff447a8d2adac68c51f40f0a50e846133c8 /src/chain.cc
parentde6de07bac1337b0dd87b41c853369dc8432c2af (diff)
downloadfork-ledger-9f53efbf5f8e49b9c4dbe8c3ff595e99903b3aab.tar.gz
fork-ledger-9f53efbf5f8e49b9c4dbe8c3ff595e99903b3aab.tar.bz2
fork-ledger-9f53efbf5f8e49b9c4dbe8c3ff595e99903b3aab.zip
Many fixes to both --market and --exchange
Diffstat (limited to 'src/chain.cc')
-rw-r--r--src/chain.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/chain.cc b/src/chain.cc
index 8d51d11c..2a494fda 100644
--- a/src/chain.cc
+++ b/src/chain.cc
@@ -74,6 +74,15 @@ xact_handler_ptr chain_xact_handlers(report_t& report,
handler.reset(new filter_xacts(handler, display_predicate, report));
}
+ // changed_value_xacts adds virtual xacts to the list to account for
+ // 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)));
+
// calc_xacts computes the running total. When this appears will
// determine, for example, whether filtered xacts are included or excluded
// from the running total.
@@ -98,14 +107,6 @@ xact_handler_ptr chain_xact_handlers(report_t& report,
handler.reset(new sort_xacts(handler, report.HANDLER(sort_).str()));
}
- // changed_value_xacts adds virtual xacts to the list to account for
- // 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(total_).expr,
- report.HANDLED(revalued_only)));
-
// collapse_xacts causes entries with multiple xacts to appear as entries
// with a subtotaled xact for each commodity used.
if (report.HANDLED(collapse))
@@ -137,7 +138,6 @@ xact_handler_ptr chain_xact_handlers(report_t& report,
if (report.HANDLED(period_)) {
handler.reset(new interval_xacts(handler, expr,
report.HANDLER(period_).str(),
- report.session.master.get(),
report.HANDLED(exact),
report.HANDLED(empty)));
handler.reset(new sort_xacts(handler, "date"));