Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git] / httemplate / graph / report_cust_bill_pkg.html
1 <% include('/elements/header.html', 'Sales Report' ) %>
2
3 <FORM ACTION="cust_bill_pkg.cgi" METHOD="GET">
4
5 <TABLE>
6
7 <% include('/elements/tr-select-from_to.html' ) %>
8
9 <TR>
10   <TD ALIGN="right"><INPUT TYPE="checkbox" NAME="projection" VALUE="1"></TD>
11   <TD>Show projected data for future months</TD>
12 </TR>
13
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
23     )
24   );
25 }
26 </SCRIPT>
27
28 <& /elements/tr-select-agent.html,
29   'field'         => 'agentnum',
30   'label'         => 'Agent ',
31   'disable_empty' => 0,
32   'pre_options'   => [ 'all' => 'all (aggregate)' ],
33   'empty_label'   => 'all (breakdown)',
34   'onchange'      => 'enable_agent_totals',
35 &>
36
37 <& /elements/tr-select-cust_class.html,
38   'field'         => 'cust_classnum',
39   'label'         => 'Customer class',
40   'multiple'      => 1,
41 &>
42
43 <& /elements/tr-select-part_referral.html,
44   'field'         => 'refnum',
45   'label'         => 'Advertising source ',
46   'disable_empty' => 0,
47   'pre_options'   => [ 'all' => 'all (aggregate)' ],
48   'empty_label'   => 'all (breakdown)',
49   'onchange'      => 'enable_agent_totals'
50 &>
51
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',
58 &>
59
60 <!--
61 <TR>
62   <TD ALIGN="right"><INPUT TYPE="checkbox" NAME="separate_0freq" VALUE="1"></TD>
63   <TD>Separate one-time vs. recurring sales</TD>
64 </TR>
65 -->
66
67 % foreach ( qw(Setup Usage) ) {
68 <& /elements/tr-select.html,
69     'label'   => "$_ fees",
70     'field'   => 'use_'.lc($_),
71     'options' => [ 0, 1, 2 ],
72     'labels'  => { 0 => 'Combine', 1 => 'Separate', 2 => 'Do not show' },
73     'onchange'=> 'enable_agent_totals',
74 &>
75 % }
76
77 <TR>
78   <TD ALIGN="right"><INPUT TYPE="checkbox" NAME="agent_totals" VALUE="1" DISABLED="1"></TD>
79   <TD>Show per-agent subtotals</TD>
80 </TR>
81
82 <TR>
83   <TD ALIGN="right"><INPUT TYPE="checkbox" NAME="use_override" VALUE="1"></TD>
84   <TD>Separate sub-packages from parents</TD>
85 </TR>
86
87 <TR>
88   <TD ALIGN="right"><INPUT TYPE="checkbox" NAME="average_per_cust_pkg" VALUE="1"></TD>
89   <TD>Average per customer package</TD>
90 </TR>
91
92 <TR>
93   <TD ALIGN="right"><INPUT TYPE="checkbox" NAME="distribute" VALUE="1"></TD>
94   <TD>Distribute recurring fees over billing period</TD>
95 </TR>
96
97 </TABLE>
98
99 <BR><INPUT TYPE="submit" VALUE="Display">
100 </FORM>
101
102 <% include('/elements/footer.html') %>
103 <%init>
104
105 die "access denied"
106   unless $FS::CurrentUser::CurrentUser->access_right('Financial reports');
107
108 </%init>