diff options
author | John Wiegley <johnw@newartisans.com> | 2009-10-27 08:04:59 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-10-27 08:30:59 -0400 |
commit | fd23b56a21ef2374538541599b82bdde3dbe1d18 (patch) | |
tree | d652052ec2d68cbf0f1adfc3a657896711b0d683 /src/account.cc | |
parent | 88460db2fbb0ab76c0ab3705cc4043e7fb2726d4 (diff) | |
download | fork-ledger-fd23b56a21ef2374538541599b82bdde3dbe1d18.tar.gz fork-ledger-fd23b56a21ef2374538541599b82bdde3dbe1d18.tar.bz2 fork-ledger-fd23b56a21ef2374538541599b82bdde3dbe1d18.zip |
Added a new "cleared" report
This is a balance report with three columns:
Current balance | Cleared balance | Last cleared date
Diffstat (limited to 'src/account.cc')
-rw-r--r-- | src/account.cc | 10 |
1 files changed, 10 insertions, 0 deletions
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 (*Func)(account_t&)> value_t get_wrapper(call_scope_t& scope) { return (*Func)(find_scope<account_t>(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); |