summaryrefslogtreecommitdiff
path: root/httemplate/graph/report_cust_bill_pkg.html
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2013-07-16 16:24:12 -0700
committerMark Wells <mark@freeside.biz>2013-07-16 16:24:12 -0700
commitd0fcbc3d04250ec54cb5dea7abcc58d1f45d78b1 (patch)
treebd28375a339b23eba15f85b67b6c174d81bdbf67 /httemplate/graph/report_cust_bill_pkg.html
parent3289bfbbc1196f383f98db8365d2444f96a5e4ef (diff)
sales report: filter/breakdown by package report class, #24002
Diffstat (limited to 'httemplate/graph/report_cust_bill_pkg.html')
-rw-r--r--httemplate/graph/report_cust_bill_pkg.html62
1 files changed, 55 insertions, 7 deletions
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;
</SCRIPT>
<& /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',
-&>
+<TR>
+ <TD ALIGN="right">
+ <INPUT TYPE="radio" NAME="mode" VALUE="pkg" onchange="mode_changed('pkg')" CHECKED>
+ <% emt('Package class') %>
+ <BR>
+ <INPUT TYPE="radio" NAME="mode" VALUE="report" onchange="mode_changed('report')">
+ <% emt('Report class') %>
+ </TD>
+ <TD>
+ <DIV ID="pkg_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',
+ &>
+ </DIV>
+ <DIV ID="report_class" STYLE="display: none">
+ <& /elements/select-table.html,
+ 'field' => 'report_optionnum',
+ 'table' => 'part_pkg_report_option',
+ 'name_col' => 'name',
+ 'value_col' => 'num',
+ 'pre_options' => [ 'all' => 'all (aggregate)',
+ '' => 'all (breakdown)',
+ '0' => '(empty class)' ],
+ 'disable_empty' => 1,
+ 'onchange' => 'enable_agent_totals',
+ &>
+ </DIV>
+ </TD>
+</TR>
<!--
<TR>