diff options
Diffstat (limited to 'src/report.h')
-rw-r--r-- | src/report.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/report.h b/src/report.h index 94d39215..08819e23 100644 --- a/src/report.h +++ b/src/report.h @@ -273,6 +273,7 @@ public: HANDLER(pending).report(out); HANDLER(percent).report(out); HANDLER(period_).report(out); + HANDLER(pivot_).report(out); HANDLER(plot_amount_format_).report(out); HANDLER(plot_total_format_).report(out); HANDLER(prepend_format_).report(out); @@ -362,7 +363,7 @@ public: OPTION_(report_t, average, DO() { // -A parent->HANDLER(display_total_) - .set_expr(string("--average"), "total_expr/count"); + .set_expr(string("--average"), "count>0?(total_expr/count):0"); }); OPTION__(report_t, balance_format_, CTOR(report_t, balance_format_) { @@ -715,6 +716,8 @@ public: string_value(text.as_string() + " " + str())); }); + OPTION(report_t, pivot_); + OPTION__(report_t, plot_amount_format_, CTOR(report_t, plot_amount_format_) { on(none, "%(format_date(date, \"%Y-%m-%d\")) %(quantity(scrub(display_amount)))\n"); |