summaryrefslogtreecommitdiff
path: root/src/report.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-06-21 18:32:03 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-06-21 18:32:03 -0400
commit963161a817c3d6b2a8171c8e3faa382dbc39ba02 (patch)
tree28baefd70f0b51229ae1bdf4b01a0fc9e49afe1b /src/report.cc
parent2f1b1c8ceded9bff5fa26d0899da04180f539e94 (diff)
downloadfork-ledger-963161a817c3d6b2a8171c8e3faa382dbc39ba02.tar.gz
fork-ledger-963161a817c3d6b2a8171c8e3faa382dbc39ba02.tar.bz2
fork-ledger-963161a817c3d6b2a8171c8e3faa382dbc39ba02.zip
bal was sometimes reporting empty accounts
Diffstat (limited to 'src/report.cc')
-rw-r--r--src/report.cc15
1 files changed, 10 insertions, 5 deletions
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)