From 963161a817c3d6b2a8171c8e3faa382dbc39ba02 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 21 Jun 2010 18:32:03 -0400 Subject: bal was sometimes reporting empty accounts --- src/report.cc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/report.cc') diff --git a/src/report.cc b/src/report.cc index da7c11f5..df37f9dc 100644 --- a/src/report.cc +++ b/src/report.cc @@ -428,6 +428,15 @@ void report_t::commodities_report(post_handler_ptr handler) session.journal->clear_xdata(); } +value_t report_t::display_value(const value_t& val) +{ + value_t temp(val.strip_annotations(what_to_keep())); + if (HANDLED(base)) + return temp; + else + return temp.unreduced(); +} + value_t report_t::fn_amount_expr(call_scope_t& scope) { return HANDLER(amount_).expr.calc(scope); @@ -533,11 +542,7 @@ value_t report_t::fn_print(call_scope_t& args) value_t report_t::fn_scrub(call_scope_t& args) { - value_t temp(args.value().strip_annotations(what_to_keep())); - if (HANDLED(base)) - return temp; - else - return temp.unreduced(); + return display_value(args.value()); } value_t report_t::fn_rounded(call_scope_t& args) -- cgit v1.2.3