summaryrefslogtreecommitdiff
path: root/src/report.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/report.cc')
-rw-r--r--src/report.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/report.cc b/src/report.cc
index bd2df046..2b07efcb 100644
--- a/src/report.cc
+++ b/src/report.cc
@@ -162,6 +162,15 @@ void report_t::normalize_options(const string& verb)
terminus);
}
+ if (HANDLED(percent) && HANDLED(market)) {
+ HANDLER(total_)
+ .on("?normalize",
+ "(__tmp = market(parent.total, value_date, exchange);"
+ " ((is_account & parent & __tmp) ?"
+ " percent(scrub(market(total, value_date, exchange)), "
+ " scrub(__tmp)) : 0))");
+ }
+
if (HANDLED(immediate) && HANDLED(market)) {
HANDLER(amount_)
.on("?normalize", "market(amount_expr, value_date, exchange)");