From f440fcd8b0420325af917448684e5029f9ab4380 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 23 Feb 2009 15:44:19 -0400 Subject: rounded() and quantity() act on the first value --- src/report.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/report.cc b/src/report.cc index 0e091135..92fc2b34 100644 --- a/src/report.cc +++ b/src/report.cc @@ -194,12 +194,13 @@ value_t report_t::fn_scrub(call_scope_t& args) value_t report_t::fn_rounded(call_scope_t& args) { - return args[0].rounded(); + return args.value().rounded(); } -value_t report_t::fn_quantity(call_scope_t& args) +value_t report_t::fn_quantity(call_scope_t& scope) { - return args[0].to_amount().number(); + interactive_t args(scope, "a"); + return args.get(0).number(); } value_t report_t::fn_truncate(call_scope_t& scope) -- cgit v1.2.3