diff options
author | John Wiegley <johnw@newartisans.com> | 2003-10-10 19:38:20 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2003-10-10 19:38:20 +0000 |
commit | 4e8bd8cc5bf5292f79a7ea852d0d3953b3d4aaa6 (patch) | |
tree | 0f11cef068f3ba9362f22a313908d8dbe5d95199 | |
parent | a39dfa95fdac52810df6f6196a32182a0fae6d1f (diff) | |
download | fork-ledger-4e8bd8cc5bf5292f79a7ea852d0d3953b3d4aaa6.tar.gz fork-ledger-4e8bd8cc5bf5292f79a7ea852d0d3953b3d4aaa6.tar.bz2 fork-ledger-4e8bd8cc5bf5292f79a7ea852d0d3953b3d4aaa6.zip |
*** empty log message ***
-rw-r--r-- | reports.cc | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -78,9 +78,9 @@ void report_balances(std::ostream& out, regexps_map& regexps) for (entries_list_iterator i = main_ledger->entries.begin(); i != main_ledger->entries.end(); i++) { - if ((have_beginning && difftime((*i)->date, begin_date) < 0) || - (have_ending && difftime((*i)->date, end_date) >= 0) || - (show_cleared && ! (*i)->cleared)) + if ((show_cleared && ! (*i)->cleared) || + (have_beginning && difftime((*i)->date, begin_date) < 0) || + (have_ending && difftime((*i)->date, end_date) >= 0)) continue; for (std::list<transaction *>::iterator x = (*i)->xacts.begin(); @@ -183,8 +183,11 @@ void print_register(const std::string& acct_name, std::ostream& out, for (std::list<transaction *>::iterator x = (*i)->xacts.begin(); x != (*i)->xacts.end(); x++) { - if (! acct_regex.match((*x)->acct->as_str()) || - ! show_cleared && (*i)->cleared) + if ((! have_beginning && ! have_ending && + ! show_cleared && (*i)->cleared) || + (have_beginning && difftime((*i)->date, begin_date) < 0) || + (have_ending && difftime((*i)->date, end_date) >= 0) || + (! acct_regex.match((*x)->acct->as_str()))) continue; char buf[32]; @@ -234,7 +237,7 @@ void print_register(const std::string& acct_name, std::ostream& out, std::string xact_str = xact->acct_as_str(); if (xact == *x && ! show_subtotals) - xact_str = "(Splits...)"; + xact_str = "<Splits...>"; out.width(22); out << std::left << truncated(xact_str, 22) << " "; |