multiple payment options (remove cust_main.payby reporting options), RT#23741
[freeside.git] / httemplate / search / report_cust_bill.html
1 <& /elements/header.html, mt($title, @title_arg) &>
2
3 <FORM ACTION="cust_bill.html" METHOD="GET">
4 <INPUT TYPE="hidden" NAME="magic" VALUE="_date">
5 <INPUT TYPE="hidden" NAME="custnum" VALUE="<% $custnum %>">
6
7 % unless ( $custnum ) {
8
9   <TABLE BGCOLOR="#cccccc" CELLSPACING=0>
10
11     <TR>
12       <TH CLASS="background" COLSPAN=2 ALIGN="left">
13         <FONT SIZE="+1">Customer search options</FONT>
14       </TH>
15     </TR>
16
17   <& /elements/tr-select-agent.html,
18                  'curr_value'    => scalar( $cgi->param('agentnum') ),
19                  'label'         => emt('Agent'),
20                  'disable_empty' => 0,
21   &>
22
23   <& /elements/tr-select-cust_main-status.html,
24        'label' => 'Customer status',
25        'field' => 'cust_status',
26   &>
27
28   <& /elements/tr-select-cust_class.html,
29       label         => mt('Customer Class'),
30       field         => 'cust_classnum',
31       multiple      => 1,
32      'pre_options'  => [ '' => emt('(none)') ],
33      'all_selected' => 1,
34   &>
35
36   </TABLE>
37   <BR>
38
39 % }
40
41   <TABLE BGCOLOR="#cccccc" CELLSPACING=0>
42
43     <TR>
44       <TH CLASS="background" COLSPAN=2 ALIGN="left">
45         <FONT SIZE="+1">Invoice search options</FONT>
46       </TH>
47     </TR>
48
49   <& /elements/tr-input-beginning_ending.html &>
50
51   <& /elements/tr-input-lessthan_greaterthan.html,
52                 label   => emt('Charged'),
53                 field   => 'charged',
54   &>
55
56   <& /elements/tr-input-lessthan_greaterthan.html,
57                 label   => emt('Owed'),
58                 field   => 'owed',
59   &>
60
61 % if ( $conf->exists('cust_bill-enable_promised_date') ) {
62   <TR>
63     
64     <TD ALIGN="right" STYLE="vertical-align:text-top">
65       <% emt('Promised payment date:') %></TD>
66     <TD>
67       <INPUT TYPE="checkbox" NAME="promised_date"   CHECKED VALUE="null">
68         <% emt('None') %> <BR>
69       <INPUT TYPE="checkbox" NAME="promised_date"   CHECKED VALUE="past">
70         <% emt('In the past') %><BR>
71       <INPUT TYPE="checkbox" NAME="promised_date"   CHECKED VALUE="future">
72         <% emt('In the future') %><BR>
73     </TD>
74   </TR>
75 % }
76
77 </TABLE>
78 <BR>
79
80 <TABLE BGCOLOR="#cccccc" CELLSPACING=0>
81
82   <TR>
83     <TH CLASS="background" COLSPAN=2 ALIGN="left">
84       <FONT SIZE="+1">Display options</FONT>
85     </TH>
86   </TR>
87
88
89 <TR>
90     <TD ALIGN="right"><INPUT TYPE="checkbox" NAME="open" VALUE="1" CHECKED></TD>
91     <TD><% mt('Show only open invoices') |h %></TD>
92   </TR>
93
94 % unless ( $custnum ) {
95   <TR>
96     <TD ALIGN="right"><INPUT TYPE="checkbox" NAME="newest_percust" VALUE="1"></TD>
97     <TD><% mt('Show only the single most recent invoice per-customer') |h %></TD>
98   </TR>
99 % }
100
101 </TABLE>
102
103 <BR>
104 <INPUT TYPE="submit" VALUE="<% mt('Get Report') |h %>">
105
106 </FORM>
107
108 <& /elements/footer.html &>
109 <%init>
110
111 die "access denied"
112   unless $FS::CurrentUser::CurrentUser->access_right('List invoices');
113
114 my $conf = new FS::Conf;
115
116 my $title = 'Invoice Report';
117 #false laziness w/report_cust_pkg.html
118 my @title_arg = ();
119
120 my $custnum = '';
121 my $cust_main = '';
122 if ( $cgi->param('custnum') =~ /^(\d+)$/ ) {
123   $custnum = $1;
124   $cust_main = qsearchs({
125     'table'     => 'cust_main', 
126     'hashref'   => { 'custnum' => $custnum },
127     'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,
128   }) or die "unknown custnum $custnum";
129   $title .= ': [_1]';
130   push @title_arg, $cust_main->name;
131 }
132
133 </%init>