add customer status to adv. customer report, template customer search for future...
[freeside.git] / httemplate / search / report_cust_main.html
1 <% include('/elements/header.html', 'Customer Report' ) %>
2
3 <FORM ACTION="cust_main.html" METHOD="GET">
4 <INPUT TYPE="hidden" NAME="magic" VALUE="bill">
5
6   <TABLE BGCOLOR="#cccccc" CELLSPACING=0>
7
8     <TR>
9       <TH BGCOLOR="#e8e8e8" COLSPAN=2 ALIGN="left"><FONT SIZE="+1">Search options</FONT></TH>
10     </TR>
11
12     <% include( '/elements/tr-select-agent.html',
13                    ($cgi->param('agentnum') || ''),
14                )
15     %>
16
17     <% include( '/elements/tr-select-cust_main-status.html',
18                   'label' => 'Status'
19               )
20     %>
21
22
23 %   foreach my $field (qw( signupdate )) {
24
25       <TR>
26         <TD ALIGN="right" VALIGN="center"><% $label{$field} %></TD>
27         <TD>
28           <TABLE>
29             <% include( '/elements/tr-input-beginning_ending.html',
30                           prefix   => $field,
31                           layout   => 'horiz',
32                       )
33             %>
34           </TABLE>
35         </TD>
36       </TR>
37
38 %   }
39
40     <% include( '/elements/tr-select-payby.html',
41                   'payby_type' => 'cust',
42                   'multiple'   => 1,
43                   'curr_value' => { map { $_ => 1 } FS::payby->cust_payby },
44               )
45     %>
46     
47     <% include( '/elements/tr-input-lessthan_greaterthan.html',
48                   label   => 'Current balance',
49                   field   => 'current_balance',
50               )
51     %>
52
53     <TR>
54       <TD ALIGN="right" VALIGN="center">Include cancelled packages</TD>
55         <TD><INPUT TYPE="checkbox" NAME="cancelled_pkgs"></TD>
56     </TR>
57
58     <TR>
59       <TH BGCOLOR="#e8e8e8" COLSPAN=2>&nbsp;</TH>
60     </TR>
61
62     <TR>
63       <TH BGCOLOR="#e8e8e8" COLSPAN=2 ALIGN="left"><FONT SIZE="+1">Display options</FONT></TH>
64     </TR>
65     <% include( '/elements/tr-select-cust-fields.html' ) %>
66
67     <TR>
68       <TD ALIGN="right" VALIGN="center">Add package columns</TD>
69         <TD><INPUT TYPE="checkbox" NAME="flattened_pkgs"></TD>
70     </TR>
71   </TABLE>
72
73 <BR>
74 <INPUT TYPE="submit" VALUE="Get Report">
75
76 </FORM>
77
78 <% include('/elements/footer.html') %>
79 <%init>
80
81 die "access denied"
82   unless ( $FS::CurrentUser::CurrentUser->access_right('List customers') &&
83            $FS::CurrentUser::CurrentUser->access_right('List packages')
84          );;
85
86 </%init>
87 <%once>
88
89 my %label = (
90   'signupdate'     => 'Signup date',
91 );
92
93 </%once>