summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-06-19 00:00:57 +0100
committerJohn Wiegley <johnw@newartisans.com>2009-06-19 00:00:57 +0100
commitdabbd2c974ceca39889a565bbd0e618bfdd41a45 (patch)
treea1b2330b82c36df5cb575abbae7789ebde7b22ae /src
parent83c93fdb739a014997b142406558e0b70afc56a1 (diff)
downloadfork-ledger-dabbd2c974ceca39889a565bbd0e618bfdd41a45.tar.gz
fork-ledger-dabbd2c974ceca39889a565bbd0e618bfdd41a45.tar.bz2
fork-ledger-dabbd2c974ceca39889a565bbd0e618bfdd41a45.zip
Fixes to the 'xact' command (used to be 'entry')
Diffstat (limited to 'src')
-rw-r--r--src/report.cc7
-rw-r--r--src/xact.cc10
2 files changed, 14 insertions, 3 deletions
diff --git a/src/report.cc b/src/report.cc
index b016ba95..8ccdfad1 100644
--- a/src/report.cc
+++ b/src/report.cc
@@ -689,7 +689,7 @@ expr_t::ptr_op_t report_t::lookup(const string& name)
(reporter<>
(new format_posts(*this, report_format(HANDLER(print_format_))),
*this, "#equity"));
- else if (is_eq(q, "xact") || is_eq(q, "entry"))
+ else if (is_eq(q, "entry"))
return WRAP_FUNCTOR(xact_command);
else if (is_eq(q, "emacs"))
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"))
return session.lookup(string(CMD_PREFIX) + "server");
break;
+
+ case 'x':
+ if (is_eq(q, "xact"))
+ return WRAP_FUNCTOR(xact_command);
+ break;
}
}
else if (is_eq(p, "cyan"))
diff --git a/src/xact.cc b/src/xact.cc
index 9e5322fa..5c95b781 100644
--- a/src/xact.cc
+++ b/src/xact.cc
@@ -387,10 +387,16 @@ expr_t::ptr_op_t xact_t::lookup(const string& name)
bool xact_t::valid() const
{
- if (! _date || ! journal) {
- DEBUG("ledger.validate", "xact_t: ! _date || ! journal");
+ if (! _date) {
+ DEBUG("ledger.validate", "xact_t: ! _date");
return false;
}
+#if 0
+ if (! journal) {
+ DEBUG("ledger.validate", "xact_t: ! journal");
+ return false;
+ }
+#endif
foreach (post_t * post, posts)
if (post->xact != this || ! post->valid()) {