summaryrefslogtreecommitdiff
path: root/src/report.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/report.cc')
-rw-r--r--src/report.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/report.cc b/src/report.cc
index 81234b0f..e51736fd 100644
--- a/src/report.cc
+++ b/src/report.cc
@@ -842,6 +842,18 @@ value_t report_t::echo_command(call_scope_t& scope)
return true;
}
+value_t report_t::pricemap_command(call_scope_t& scope)
+{
+ interactive_t args(scope, "&s");
+ std::ostream& out(output_stream);
+
+ commodity_pool_t::current_pool->print_pricemap
+ (out, what_to_keep(), args.has(0) ?
+ optional<datetime_t>(datetime_t(parse_date(args.get<string>(0)))) : none);
+
+ return true;
+}
+
option_t<report_t> * report_t::lookup_option(const char * p)
{
switch (*p) {
@@ -1415,6 +1427,9 @@ expr_t::ptr_op_t report_t::lookup(const symbol_t::kind_t kind,
HANDLER(prepend_width_).value.to_long()),
*this, "#pricedb"));
}
+ else if (is_eq(p, "pricemap")) {
+ return MAKE_FUNCTOR(report_t::pricemap_command);
+ }
else if (is_eq(p, "payees")) {
return WRAP_FUNCTOR(reporter<>(new report_payees(*this), *this,
"#payees"));