From fd23b56a21ef2374538541599b82bdde3dbe1d18 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 27 Oct 2009 08:04:59 -0400 Subject: Added a new "cleared" report This is a balance report with three columns: Current balance | Cleared balance | Last cleared date --- src/account.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/account.cc') diff --git a/src/account.cc b/src/account.cc index 4301b5d5..c8fd3a6a 100644 --- a/src/account.cc +++ b/src/account.cc @@ -225,6 +225,11 @@ namespace { return string_value(out.str()); } + value_t get_latest_cleared(account_t& account) + { + return account.self_details().latest_cleared_post; + } + template value_t get_wrapper(call_scope_t& scope) { return (*Func)(find_scope(scope)); @@ -264,6 +269,11 @@ expr_t::ptr_op_t account_t::lookup(const string& name) return WRAP_FUNCTOR(get_wrapper<&get_true>); break; + case 'l': + if (name == "latest_cleared") + return WRAP_FUNCTOR(get_wrapper<&get_latest_cleared>); + break; + case 'p': if (name == "partial_account") return WRAP_FUNCTOR(get_partial_name); -- cgit v1.2.3