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-part_referral.html,
39 'label' => 'Advertising source ',
41 'pre_options' => [ 'all' => 'all (aggregate)' ],
42 'empty_label' => 'all (breakdown)',
43 'onchange' => 'enable_agent_totals'
46 <& /elements/tr-select-pkg_class.html,
47 'field' => 'classnum',
48 'pre_options' => [ 'all' => 'all (aggregate)',
49 '0' => 'all (breakdown)' ],
50 'empty_label' => '(empty class)',
51 'onchange' => 'enable_agent_totals',
56 <TD ALIGN="right"><INPUT TYPE="checkbox" NAME="separate_0freq" VALUE="1"></TD>
57 <TD>Separate one-time vs. recurring sales</TD>
61 % foreach ( qw(Setup Usage) ) {
62 <& /elements/tr-select.html,
64 'field' => 'use_'.lc($_),
65 'options' => [ 0, 1, 2 ],
66 'labels' => { 0 => 'Combine', 1 => 'Separate', 2 => 'Do not show' },
67 'onchange'=> 'enable_agent_totals',
72 <TD ALIGN="right"><INPUT TYPE="checkbox" NAME="agent_totals" VALUE="1" DISABLED="1"></TD>
73 <TD>Show per-agent subtotals</TD>
77 <TD ALIGN="right"><INPUT TYPE="checkbox" NAME="use_override" VALUE="1"></TD>
78 <TD>Separate sub-packages from parents</TD>
82 <TD ALIGN="right"><INPUT TYPE="checkbox" NAME="average_per_cust_pkg" VALUE="1"></TD>
83 <TD>Average per customer package</TD>
87 <TD ALIGN="right"><INPUT TYPE="checkbox" NAME="distribute" VALUE="1"></TD>
88 <TD>Distribute recurring fees over billing period</TD>
93 <BR><INPUT TYPE="submit" VALUE="Display">
96 <% include('/elements/footer.html') %>
100 unless $FS::CurrentUser::CurrentUser->access_right('Financial reports');