diff options
author | John Wiegley <johnw@newartisans.com> | 2012-04-15 01:17:01 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2012-04-15 01:17:01 -0500 |
commit | ee641f353c9a2216533800464d26afe86f1b028e (patch) | |
tree | 2f7b290d5e6ea5c395ff294d4c911a4f942fe6f6 /src/draft.cc | |
parent | 1ad826c2bccabad844156a181735dd960f87d174 (diff) | |
download | fork-ledger-ee641f353c9a2216533800464d26afe86f1b028e.tar.gz fork-ledger-ee641f353c9a2216533800464d26afe86f1b028e.tar.bz2 fork-ledger-ee641f353c9a2216533800464d26afe86f1b028e.zip |
Resolve some issues with proof builds
Diffstat (limited to 'src/draft.cc')
-rw-r--r-- | src/draft.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/draft.cc b/src/draft.cc index 7edf7edc..43c214cb 100644 --- a/src/draft.cc +++ b/src/draft.cc @@ -507,7 +507,6 @@ value_t template_command(call_scope_t& args) out << std::endl << std::endl; draft_t draft(args.value()); - out << _("--- Transaction template ---") << std::endl; draft.dump(out); @@ -517,15 +516,16 @@ value_t template_command(call_scope_t& args) value_t xact_command(call_scope_t& args) { report_t& report(find_scope<report_t>(args)); - draft_t draft(args.value()); + draft_t draft(args.value()); - xact_t * new_xact = draft.insert(*report.session.journal.get()); + unique_ptr<xact_t> new_xact(draft.insert(*report.session.journal.get())); + if (new_xact.get()) { + // Only consider actual postings for the "xact" command + report.HANDLER(limit_).on("#xact", "actual"); - // Only consider actual postings for the "xact" command - report.HANDLER(limit_).on("#xact", "actual"); + report.xact_report(post_handler_ptr(new print_xacts(report)), *new_xact.get()); + } - if (new_xact) - report.xact_report(post_handler_ptr(new print_xacts(report)), *new_xact); return true; } |