diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-15 21:05:59 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-15 21:05:59 -0400 |
commit | e861c312ac4685c7a9c967312cffeb7388d3be1e (patch) | |
tree | b64db3c16b91b61e32023eebb3751d0686b96c59 | |
parent | bfa6a643a1317515e10cca2170463f941e6d0f10 (diff) | |
download | fork-ledger-e861c312ac4685c7a9c967312cffeb7388d3be1e.tar.gz fork-ledger-e861c312ac4685c7a9c967312cffeb7388d3be1e.tar.bz2 fork-ledger-e861c312ac4685c7a9c967312cffeb7388d3be1e.zip |
The "xact" variable now returns null for accounts
-rw-r--r-- | src/output.h | 4 | ||||
-rw-r--r-- | src/report.cc | 5 | ||||
-rw-r--r-- | src/report.h | 3 |
3 files changed, 11 insertions, 1 deletions
diff --git a/src/output.h b/src/output.h index 188013c3..e68e51f3 100644 --- a/src/output.h +++ b/src/output.h @@ -173,7 +173,9 @@ public: bool should_display(account_t& account) { if (! disp_pred.predicate && report.HANDLED(display_)) disp_pred.predicate.parse(report.HANDLER(display_).str()); - return disp_pred(account); + + bind_scope_t bound_scope(report, account); + return disp_pred(bound_scope); } virtual void flush(); diff --git a/src/report.cc b/src/report.cc index aea565ec..b0b18ad2 100644 --- a/src/report.cc +++ b/src/report.cc @@ -646,6 +646,11 @@ expr_t::ptr_op_t report_t::lookup(const string& name) else if (is_eq(p, "total_expr")) return MAKE_FUNCTOR(report_t::fn_total_expr); break; + + case 'x': + if (is_eq(p, "xact")) + return MAKE_FUNCTOR(report_t::fn_false); + break; } // Check if they are trying to access an option's setting or value. diff --git a/src/report.h b/src/report.h index 73eefd95..69ae11e5 100644 --- a/src/report.h +++ b/src/report.h @@ -138,6 +138,9 @@ public: value_t fn_quoted(call_scope_t& scope); value_t fn_join(call_scope_t& scope); value_t fn_format_date(call_scope_t& scope); + value_t fn_false(call_scope_t&) { + return false; + } value_t fn_options(call_scope_t& scope) { return value_t(static_cast<scope_t *>(this)); |