Ommitting args to the entry command print nothing
This commit is contained in:
parent
a3482606dc
commit
925b70d5c6
1 changed files with 5 additions and 1 deletions
|
|
@ -240,6 +240,9 @@ void draft_t::parse_args(const value_t& args)
|
||||||
|
|
||||||
xact_t * draft_t::insert(journal_t& journal)
|
xact_t * draft_t::insert(journal_t& journal)
|
||||||
{
|
{
|
||||||
|
if (! tmpl)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
if (tmpl->payee_mask.empty())
|
if (tmpl->payee_mask.empty())
|
||||||
throw std::runtime_error(_("'xact' command requires at least a payee"));
|
throw std::runtime_error(_("'xact' command requires at least a payee"));
|
||||||
|
|
||||||
|
|
@ -528,7 +531,8 @@ value_t xact_command(call_scope_t& args)
|
||||||
// Only consider actual postings for the "xact" command
|
// Only consider actual postings for the "xact" command
|
||||||
report.HANDLER(limit_).on(string("#xact"), "actual");
|
report.HANDLER(limit_).on(string("#xact"), "actual");
|
||||||
|
|
||||||
report.xact_report(post_handler_ptr(new print_xacts(report)), *new_xact);
|
if (new_xact)
|
||||||
|
report.xact_report(post_handler_ptr(new print_xacts(report)), *new_xact);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue