summaryrefslogtreecommitdiff
path: root/src/account.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-06-06 13:04:44 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-06-06 13:04:44 -0400
commite8ffbd6f2fb57f2b65f57f92edf8eb444cc2f71f (patch)
treeb72e9a1454b6721d59e3844d71a91880c94e2cae /src/account.cc
parent290cac7b84b60305e185c140645c9bac2ca9fb0e (diff)
parent39f9854e2c1f807f6e9c90d80e1eec2bf9b90017 (diff)
downloadfork-ledger-e8ffbd6f2fb57f2b65f57f92edf8eb444cc2f71f.tar.gz
fork-ledger-e8ffbd6f2fb57f2b65f57f92edf8eb444cc2f71f.tar.bz2
fork-ledger-e8ffbd6f2fb57f2b65f57f92edf8eb444cc2f71f.zip
Merge branch 'next'
Diffstat (limited to 'src/account.cc')
-rw-r--r--src/account.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/account.cc b/src/account.cc
index e577c48e..37ff83f3 100644
--- a/src/account.cc
+++ b/src/account.cc
@@ -205,6 +205,10 @@ namespace {
value_t get_count(account_t& account) {
return long(account.family_details().posts_count);
}
+ value_t get_cost(account_t&) {
+ throw_(calc_error, _("An account does not have a 'cost' value"));
+ return false;
+ }
value_t get_depth(account_t& account) {
return long(account.depth);
@@ -311,6 +315,8 @@ expr_t::ptr_op_t account_t::lookup(const symbol_t::kind_t kind,
case 'c':
if (name == "count")
return WRAP_FUNCTOR(get_wrapper<&get_count>);
+ else if (name == "cost")
+ return WRAP_FUNCTOR(get_wrapper<&get_cost>);
break;
case 'd':