1 <% include('/elements/header.html', 'Sales Report' ) %>
3 <FORM ACTION="cust_bill_pkg.cgi" METHOD="GET">
7 <% include('/elements/tr-select-from_to.html' ) %>
10 <TD ALIGN="right"><INPUT TYPE="checkbox" NAME="projection" VALUE="1"></TD>
11 <TD>Show projected data for future months</TD>
14 <SCRIPT TYPE="text/javascript">
15 function enable_agent_totals(obj) {
16 %# enable it iff we are breaking down by agent AND something else
17 obj.form.agent_totals.disabled = !(
18 obj.form.agentnum.value == '' && (
19 obj.form.refnum.value == '' ||
20 obj.form.classnum.value == 0 ||
21 obj.form.use_setup.value == 1 ||
22 obj.form.use_usage.value == 1
28 <& /elements/tr-select-agent.html,
29 'field' => 'agentnum',
32 'pre_options' => [ 'all' => 'all (aggregate)' ],
33 'empty_label' => 'all (breakdown)',
34 'onchange' => 'enable_agent_totals',
37 <& /elements/tr-select-cust_class.html,
38 'field' => 'cust_classnum',
39 'label' => 'Customer class',
43 <& /elements/tr-select-part_referral.html,
45 'label' => 'Advertising source ',
47 'pre_options' => [ 'all' => 'all (aggregate)' ],
48 'empty_label' => 'all (breakdown)',
49 'onchange' => 'enable_agent_totals'
52 <& /elements/tr-select-pkg_class.html,
53 'field' => 'classnum',
54 'pre_options' => [ 'all' => 'all (aggregate)',
55 '0' => 'all (breakdown)' ],
56 'empty_label' => '(empty class)',
57 'onchange' => 'enable_agent_totals',
62 <TD ALIGN="right"><INPUT TYPE="checkbox" NAME="separate_0freq" VALUE="1"></TD>
63 <TD>Separate one-time vs. recurring sales</TD>
67 % foreach ( qw(Setup Usage) ) {
68 <& /elements/tr-select.html,
70 'field' => 'use_'.lc($_),
71 'options' => [ 0, 1, 2 ],
72 'labels' => { 0 => 'Combine', 1 => 'Separate', 2 => 'Do not show' },
73 'onchange'=> 'enable_agent_totals',
78 <TD ALIGN="right"><INPUT TYPE="checkbox" NAME="agent_totals" VALUE="1" DISABLED="1"></TD>
79 <TD>Show per-agent subtotals</TD>
83 <TD ALIGN="right"><INPUT TYPE="checkbox" NAME="use_override" VALUE="1"></TD>
84 <TD>Separate sub-packages from parents</TD>
88 <TD ALIGN="right"><INPUT TYPE="checkbox" NAME="average_per_cust_pkg" VALUE="1"></TD>
89 <TD>Average per customer package</TD>
93 <TD ALIGN="right"><INPUT TYPE="checkbox" NAME="distribute" VALUE="1"></TD>
94 <TD>Distribute recurring fees over billing period</TD>
99 <BR><INPUT TYPE="submit" VALUE="Display">
102 <% include('/elements/footer.html') %>
106 unless $FS::CurrentUser::CurrentUser->access_right('Financial reports');