From d0fcbc3d04250ec54cb5dea7abcc58d1f45d78b1 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Tue, 16 Jul 2013 16:24:12 -0700 Subject: sales report: filter/breakdown by package report class, #24002 --- httemplate/graph/report_cust_bill_pkg.html | 62 ++++++++++++++++++++++++++---- 1 file changed, 55 insertions(+), 7 deletions(-) (limited to 'httemplate/graph/report_cust_bill_pkg.html') diff --git a/httemplate/graph/report_cust_bill_pkg.html b/httemplate/graph/report_cust_bill_pkg.html index 251e7d36e..d3d8e664d 100644 --- a/httemplate/graph/report_cust_bill_pkg.html +++ b/httemplate/graph/report_cust_bill_pkg.html @@ -23,6 +23,27 @@ function enable_agent_totals(obj) { ) ); } + +function mode_changed() { + var options = document.getElementsByName('mode'); + var mode; + for(var i=0; i < options.length; i++) { + if (options[i].checked) { + mode = options[i].value; + } + } + + var div_pkg = document.getElementById('pkg_class'); + var div_report = document.getElementById('report_class'); + if (mode == 'pkg') { + div_pkg.style.display = ''; + div_report.style.display = 'none'; + } else if (mode == 'report') { + div_pkg.style.display = 'none'; + div_report.style.display = ''; + } +} +window.onload = mode_changed; <& /elements/tr-select-agent.html, @@ -49,13 +70,40 @@ function enable_agent_totals(obj) { 'onchange' => 'enable_agent_totals' &> -<& /elements/tr-select-pkg_class.html, - 'field' => 'classnum', - 'pre_options' => [ 'all' => 'all (aggregate)', - '0' => 'all (breakdown)' ], - 'empty_label' => '(empty class)', - 'onchange' => 'enable_agent_totals', -&> + + + + <% emt('Package class') %> +
+ + <% emt('Report class') %> + + +
+ <& /elements/select-pkg_class.html, + 'field' => 'classnum', + 'pre_options' => [ 'all' => 'all (aggregate)', + '' => 'all (breakdown)', + '0' => '(empty class)' ], + 'disable_empty' => 1, + 'onchange' => 'enable_agent_totals', + &> +
+ + +