summaryrefslogtreecommitdiff
path: root/emacs.cc
diff options
context:
space:
mode:
Diffstat (limited to 'emacs.cc')
-rw-r--r--emacs.cc25
1 files changed, 13 insertions, 12 deletions
diff --git a/emacs.cc b/emacs.cc
index 76d10fa6..d4e9c1f5 100644
--- a/emacs.cc
+++ b/emacs.cc
@@ -15,18 +15,6 @@ void format_emacs_transactions::write_entry(entry_t& entry)
out << (((unsigned long)entry.beg_pos) + 1) << " ";
- switch (entry.state) {
- case entry_t::CLEARED:
- out << "t ";
- break;
- case entry_t::PENDING:
- out << "pending ";
- break;
- case entry_t::UNCLEARED:
- out << "nil ";
- break;
- }
-
out << "(" << (entry.date / 65536) << " "
<< (entry.date % 65536) << " 0) ";
@@ -61,6 +49,19 @@ void format_emacs_transactions::operator()(transaction_t& xact)
out << " (\"" << xact.account->fullname() << "\" \""
<< xact.amount << "\"";
+
+ switch (xact.state) {
+ case transaction_t::CLEARED:
+ out << " t";
+ break;
+ case transaction_t::PENDING:
+ out << " pending";
+ break;
+ default:
+ out << " nil";
+ break;
+ }
+
if (xact.cost)
out << " \"" << *xact.cost << "\"";
else if (! xact.note.empty())