summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-23 15:44:19 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-23 15:44:19 -0400
commitf440fcd8b0420325af917448684e5029f9ab4380 (patch)
tree9e43fb27174e00a55de08849215a6d7e94236716 /src
parent371fc62eece5ad75b41f5377d955ed3b946d1e7d (diff)
downloadfork-ledger-f440fcd8b0420325af917448684e5029f9ab4380.tar.gz
fork-ledger-f440fcd8b0420325af917448684e5029f9ab4380.tar.bz2
fork-ledger-f440fcd8b0420325af917448684e5029f9ab4380.zip
rounded() and quantity() act on the first value
Diffstat (limited to 'src')
-rw-r--r--src/report.cc7
1 files changed, 4 insertions, 3 deletions
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<amount_t>(0).number();
}
value_t report_t::fn_truncate(call_scope_t& scope)