diff options
author | John Wiegley <johnw@newartisans.com> | 2009-10-28 01:17:10 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-10-28 01:17:10 -0400 |
commit | 559566751ddd29caf2cd74c3d44982c907bd1020 (patch) | |
tree | 251cfd38ee17dac245256d8a87d45735fca82a77 /src/chain.cc | |
parent | b7233edd8a7101c16d41837a8ebe2710ede76cc7 (diff) | |
download | fork-ledger-559566751ddd29caf2cd74c3d44982c907bd1020.tar.gz fork-ledger-559566751ddd29caf2cd74c3d44982c907bd1020.tar.bz2 fork-ledger-559566751ddd29caf2cd74c3d44982c907bd1020.zip |
Sort by default unless --unsorted is selected
Diffstat (limited to 'src/chain.cc')
-rw-r--r-- | src/chain.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/chain.cc b/src/chain.cc index 25f4833c..018b3812 100644 --- a/src/chain.cc +++ b/src/chain.cc @@ -114,6 +114,10 @@ post_handler_ptr chain_post_handlers(report_t& report, else handler.reset(new sort_posts(handler, report.HANDLER(sort_).str())); } + else if (! report.HANDLED(period_) && + ! report.HANDLED(unsorted)) { + handler.reset(new sort_posts(handler, "date")); + } // collapse_posts causes xacts with multiple posts to appear as xacts // with a subtotaled post for each commodity used. @@ -135,6 +139,10 @@ post_handler_ptr chain_post_handlers(report_t& report, else if (report.HANDLED(subtotal)) handler.reset(new subtotal_posts(handler, expr)); } + else if (! report.HANDLED(period_) && + ! report.HANDLED(unsorted)) { + handler.reset(new sort_posts(handler, "date")); + } if (report.HANDLED(dow)) handler.reset(new dow_posts(handler, expr)); |