diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-09 17:27:54 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-09 17:27:54 -0400 |
commit | 6ca01af594148e12cd8e1da87302644a0bbae3a0 (patch) | |
tree | bb83af15a352e3125053a3d5c0761f8e395ed2c3 /src/filters.cc | |
parent | cad86ed87f3548aaf9d35890f2b686c2bf064368 (diff) | |
download | fork-ledger-6ca01af594148e12cd8e1da87302644a0bbae3a0.tar.gz fork-ledger-6ca01af594148e12cd8e1da87302644a0bbae3a0.tar.bz2 fork-ledger-6ca01af594148e12cd8e1da87302644a0bbae3a0.zip |
Fixed the use of --effective and --date-format (-y).
Diffstat (limited to 'src/filters.cc')
-rw-r--r-- | src/filters.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/filters.cc b/src/filters.cc index 8877812a..16fa8dad 100644 --- a/src/filters.cc +++ b/src/filters.cc @@ -420,10 +420,12 @@ void subtotal_xacts::report_subtotal(const char * spec_fmt) void subtotal_xacts::operator()(xact_t& xact) { - if (! is_valid(start) || xact.date() < start) - start = xact.date(); - if (! is_valid(finish) || xact.date() > finish) - finish = xact.date(); + date_t when = xact.date(); + + if (! is_valid(start) || when < start) + start = when; + if (! is_valid(finish) || when > finish) + finish = when; account_t * acct = xact.reported_account(); assert(acct); @@ -466,7 +468,7 @@ void interval_xacts::report_subtotal(const date_t& date) void interval_xacts::operator()(xact_t& xact) { - const date_t& date(xact.date()); + date_t date = xact.date(); if ((is_valid(interval.begin) && date < interval.begin) || (is_valid(interval.end) && date >= interval.end)) |