always sort the transaction chain, if interval reporting is being used

This commit is contained in:
John Wiegley 2004-09-23 19:16:52 -04:00
parent 48215df43e
commit 69c84c86b8

10
main.cc
View file

@ -127,15 +127,19 @@ chain_formatters(const std::string& command,
// dow_transactions is like interval_transactions, except that it // dow_transactions is like interval_transactions, except that it
// reports all the transactions that fall on each subsequent day // reports all the transactions that fall on each subsequent day
// of the week. // of the week.
if (config.show_subtotal) if (config.show_subtotal) {
ptrs.push_back(formatter = new subtotal_transactions(formatter)); ptrs.push_back(formatter = new subtotal_transactions(formatter));
else if (! config.report_interval.empty()) }
else if (! config.report_interval.empty()) {
ptrs.push_back(formatter = ptrs.push_back(formatter =
new interval_transactions(formatter, new interval_transactions(formatter,
config.report_interval)); 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)); ptrs.push_back(formatter = new dow_transactions(formatter));
} }
}
// related_transactions will pass along all transactions related // related_transactions will pass along all transactions related
// to the transaction received. If `show_all_related' is true, // to the transaction received. If `show_all_related' is true,