diff options
author | John Wiegley <johnw@newartisans.com> | 2010-03-17 00:07:58 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-03-17 00:49:14 -0400 |
commit | 01c3eb8547ce6b93cae77c747af0c1b06d504c90 (patch) | |
tree | d8a1a8518019a0c7cb5a3411ab34bd4bafe649b4 /src/print.cc | |
parent | 91f839e8279804d495adc0d33e28fd6048e72680 (diff) | |
download | fork-ledger-01c3eb8547ce6b93cae77c747af0c1b06d504c90.tar.gz fork-ledger-01c3eb8547ce6b93cae77c747af0c1b06d504c90.tar.bz2 fork-ledger-01c3eb8547ce6b93cae77c747af0c1b06d504c90.zip |
Improved the new implementation of "print"
Diffstat (limited to 'src/print.cc')
-rw-r--r-- | src/print.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/print.cc b/src/print.cc index e190ad31..eb102a87 100644 --- a/src/print.cc +++ b/src/print.cc @@ -71,8 +71,6 @@ namespace { void print_xact(report_t& report, std::ostream& out, xact_t& xact) { - // jww (2010-03-07): Also add support for --raw - out << format_date(item_t::use_effective_date ? xact.date() : xact.actual_date(), FMT_WRITTEN); @@ -80,7 +78,6 @@ namespace { out << '=' << format_date(*xact.effective_date(), FMT_WRITTEN); out << ' '; - // jww (2010-03-06): Output posting state, if different out << (xact.state() == item_t::CLEARED ? "* " : (xact.state() == item_t::PENDING ? "! " : "")); @@ -112,10 +109,13 @@ namespace { continue; out << " "; - // jww (2010-03-06): Output posting state, if different std::ostringstream buf; + if (xact.state() == item_t::UNCLEARED) + buf << (post->state() == item_t::CLEARED ? "* " : + (post->state() == item_t::PENDING ? "! " : "")); + if (post->has_flags(POST_VIRTUAL)) { if (post->has_flags(POST_MUST_BALANCE)) buf << '['; |