summaryrefslogtreecommitdiff
path: root/src/report.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-10-26 08:31:57 -0700
committerJohn Wiegley <johnw@newartisans.com>2012-10-26 08:31:57 -0700
commit7cee6c559b8198aea9fc75a197bac7bc6e71eaeb (patch)
treefac4c09dba9035c01a25ad84bc4fd3d12fdaa4f7 /src/report.cc
parent34ca6b3991d63dd04d60286452399c7e0d49974b (diff)
parentb044a74bd34afdc27baf6241fe398690ff5e043a (diff)
downloadfork-ledger-7cee6c559b8198aea9fc75a197bac7bc6e71eaeb.tar.gz
fork-ledger-7cee6c559b8198aea9fc75a197bac7bc6e71eaeb.tar.bz2
fork-ledger-7cee6c559b8198aea9fc75a197bac7bc6e71eaeb.zip
Merge pull request #96 from enderw88/Bug634-floor-ceil-round
Bug 634 and 488, Corrected behavior of floor, and added ceiling
Diffstat (limited to 'src/report.cc')
-rw-r--r--src/report.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/report.cc b/src/report.cc
index 662386a4..dc5a0704 100644
--- a/src/report.cc
+++ b/src/report.cc
@@ -681,6 +681,11 @@ value_t report_t::fn_floor(call_scope_t& args)
return args[0].floored();
}
+value_t report_t::fn_ceiling(call_scope_t& args)
+{
+ return args[0].ceilinged();
+}
+
value_t report_t::fn_round(call_scope_t& args)
{
return args[0].rounded();
@@ -1335,6 +1340,8 @@ expr_t::ptr_op_t report_t::lookup(const symbol_t::kind_t kind,
return WRAP_FUNCTOR(fn_cyan);
else if (is_eq(p, "commodity"))
return MAKE_FUNCTOR(report_t::fn_commodity);
+ else if (is_eq(p, "ceiling"))
+ return MAKE_FUNCTOR(report_t::fn_ceiling);
break;
case 'd':