summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-05-23 01:11:16 -0600
committerJohn Wiegley <johnw@newartisans.com>2010-05-23 01:11:27 -0600
commitefcede3ca5ce31603ef8454a0bd6c19ef67b2aeb (patch)
treeb512b2f2de7a06e700c36d4d8685cd1600a4c89b /src
parent834d223c27f8240122dcc0de0e614f1b2e62c08e (diff)
downloadfork-ledger-efcede3ca5ce31603ef8454a0bd6c19ef67b2aeb.tar.gz
fork-ledger-efcede3ca5ce31603ef8454a0bd6c19ef67b2aeb.tar.bz2
fork-ledger-efcede3ca5ce31603ef8454a0bd6c19ef67b2aeb.zip
Fix to an interaction between --period and --sort
Fixes 3AAB00ED-9904-4380-8988-16506B0AFE08
Diffstat (limited to 'src')
-rw-r--r--src/report.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/report.cc b/src/report.cc
index 4c8f4060..dfdc77cc 100644
--- a/src/report.cc
+++ b/src/report.cc
@@ -145,9 +145,6 @@ void report_t::normalize_options(const string& verb)
// then ignore the period since the begin/end are the only interesting
// details.
if (HANDLED(period_)) {
- if (! HANDLED(sort_all_))
- HANDLER(sort_xacts_).on_only(string("?normalize"));
-
date_interval_t interval(HANDLER(period_).str());
optional<date_t> begin = interval.begin(session.current_year);
@@ -164,6 +161,8 @@ void report_t::normalize_options(const string& verb)
if (! interval.duration)
HANDLER(period_).off();
+ else if (! HANDLED(sort_all_))
+ HANDLER(sort_xacts_).on_only(string("?normalize"));
}
// If -j or -J were specified, set the appropriate format string now so as