summaryrefslogtreecommitdiff
path: root/main.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2004-09-23 19:16:52 -0400
committerJohn Wiegley <johnw@newartisans.com>2004-09-23 19:16:52 -0400
commit69c84c86b8abe2b3dc79c8c2945adc2a6a6262db (patch)
tree853c23c89c4b8aa9980ce5cda89d33ab69286fd2 /main.cc
parent48215df43ef7e31055cf4d787571d39bc705cab4 (diff)
downloadfork-ledger-69c84c86b8abe2b3dc79c8c2945adc2a6a6262db.tar.gz
fork-ledger-69c84c86b8abe2b3dc79c8c2945adc2a6a6262db.tar.bz2
fork-ledger-69c84c86b8abe2b3dc79c8c2945adc2a6a6262db.zip
always sort the transaction chain, if interval reporting is being used
Diffstat (limited to 'main.cc')
-rw-r--r--main.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/main.cc b/main.cc
index 27ebc021..639a565c 100644
--- a/main.cc
+++ b/main.cc
@@ -127,14 +127,18 @@ chain_formatters(const std::string& command,
// dow_transactions is like interval_transactions, except that it
// reports all the transactions that fall on each subsequent day
// of the week.
- if (config.show_subtotal)
+ if (config.show_subtotal) {
ptrs.push_back(formatter = new subtotal_transactions(formatter));
- else if (! config.report_interval.empty())
+ }
+ else if (! config.report_interval.empty()) {
ptrs.push_back(formatter =
new interval_transactions(formatter,
config.report_interval));
- else if (config.days_of_the_week)
+ ptrs.push_back(formatter = new sort_transactions(formatter, "d"));
+ }
+ else if (config.days_of_the_week) {
ptrs.push_back(formatter = new dow_transactions(formatter));
+ }
}
// related_transactions will pass along all transactions related