summaryrefslogtreecommitdiff
path: root/src/report.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-19 13:40:48 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-19 13:40:48 -0400
commit1f1a83c0838a0d4e97cbc32e51d40210714b198f (patch)
tree8a112a44af233729a228b7c92d269ca17a188d8c /src/report.cc
parentb684783eff255508ad567afd43b05b2ba9e6ecb7 (diff)
downloadfork-ledger-1f1a83c0838a0d4e97cbc32e51d40210714b198f.tar.gz
fork-ledger-1f1a83c0838a0d4e97cbc32e51d40210714b198f.tar.bz2
fork-ledger-1f1a83c0838a0d4e97cbc32e51d40210714b198f.zip
Restored the -j and -J options
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 d1ee635e..7ba9ac2f 100644
--- a/src/report.cc
+++ b/src/report.cc
@@ -143,6 +143,11 @@ value_t report_t::fn_strip(call_scope_t& args)
return args[0].strip_annotations(what_to_keep());
}
+value_t report_t::fn_quantity(call_scope_t& args)
+{
+ return args[0].to_amount().number();
+}
+
value_t report_t::fn_truncate(call_scope_t& args)
{
var_t<long> width(args, 1);
@@ -602,6 +607,8 @@ expr_t::ptr_op_t report_t::lookup(const string& name)
case 'q':
if (is_eq(p, "quoted"))
return MAKE_FUNCTOR(report_t::fn_quoted);
+ else if (is_eq(p, "quantity"))
+ return MAKE_FUNCTOR(report_t::fn_quantity);
break;
case 's':