Fixes to the 'xact' command (used to be 'entry')
This commit is contained in:
parent
83c93fdb73
commit
dabbd2c974
2 changed files with 14 additions and 3 deletions
|
|
@ -689,7 +689,7 @@ expr_t::ptr_op_t report_t::lookup(const string& name)
|
||||||
(reporter<>
|
(reporter<>
|
||||||
(new format_posts(*this, report_format(HANDLER(print_format_))),
|
(new format_posts(*this, report_format(HANDLER(print_format_))),
|
||||||
*this, "#equity"));
|
*this, "#equity"));
|
||||||
else if (is_eq(q, "xact") || is_eq(q, "entry"))
|
else if (is_eq(q, "entry"))
|
||||||
return WRAP_FUNCTOR(xact_command);
|
return WRAP_FUNCTOR(xact_command);
|
||||||
else if (is_eq(q, "emacs"))
|
else if (is_eq(q, "emacs"))
|
||||||
return WRAP_FUNCTOR
|
return WRAP_FUNCTOR
|
||||||
|
|
@ -733,6 +733,11 @@ expr_t::ptr_op_t report_t::lookup(const string& name)
|
||||||
if (is_eq(q, "server") && maybe_import("ledger.server"))
|
if (is_eq(q, "server") && maybe_import("ledger.server"))
|
||||||
return session.lookup(string(CMD_PREFIX) + "server");
|
return session.lookup(string(CMD_PREFIX) + "server");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'x':
|
||||||
|
if (is_eq(q, "xact"))
|
||||||
|
return WRAP_FUNCTOR(xact_command);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (is_eq(p, "cyan"))
|
else if (is_eq(p, "cyan"))
|
||||||
|
|
|
||||||
10
src/xact.cc
10
src/xact.cc
|
|
@ -387,10 +387,16 @@ expr_t::ptr_op_t xact_t::lookup(const string& name)
|
||||||
|
|
||||||
bool xact_t::valid() const
|
bool xact_t::valid() const
|
||||||
{
|
{
|
||||||
if (! _date || ! journal) {
|
if (! _date) {
|
||||||
DEBUG("ledger.validate", "xact_t: ! _date || ! journal");
|
DEBUG("ledger.validate", "xact_t: ! _date");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
|
if (! journal) {
|
||||||
|
DEBUG("ledger.validate", "xact_t: ! journal");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
foreach (post_t * post, posts)
|
foreach (post_t * post, posts)
|
||||||
if (post->xact != this || ! post->valid()) {
|
if (post->xact != this || ! post->valid()) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue