1 <& /elements/header.html, mt($title, @title_arg) &>
3 <FORM ACTION="cust_bill.html" METHOD="GET">
4 <INPUT TYPE="hidden" NAME="magic" VALUE="_date">
5 <INPUT TYPE="hidden" NAME="custnum" VALUE="<% $custnum %>">
7 % unless ( $custnum ) {
9 <TABLE BGCOLOR="#cccccc" CELLSPACING=0>
12 <TH CLASS="background" COLSPAN=2 ALIGN="left">
13 <FONT SIZE="+1">Customer search options</FONT>
17 <& /elements/tr-select-agent.html,
18 'curr_value' => scalar( $cgi->param('agentnum') ),
19 'label' => emt('Agent'),
23 <& /elements/tr-select-cust_main-status.html,
24 'label' => 'Customer status',
25 'field' => 'cust_status',
28 <& /elements/tr-select-cust_class.html,
29 label => mt('Customer Class'),
30 field => 'cust_classnum',
32 'pre_options' => [ '' => emt('(none)') ],
41 <TABLE BGCOLOR="#cccccc" CELLSPACING=0>
44 <TH CLASS="background" COLSPAN=2 ALIGN="left">
45 <FONT SIZE="+1">Invoice search options</FONT>
49 <& /elements/tr-input-beginning_ending.html &>
51 <& /elements/tr-input-lessthan_greaterthan.html,
52 label => emt('Charged'),
56 <& /elements/tr-input-lessthan_greaterthan.html,
61 % if ( $conf->exists('cust_bill-enable_promised_date') ) {
64 <TD ALIGN="right" STYLE="vertical-align:text-top">
65 <% emt('Promised payment date:') %></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>
80 <TABLE BGCOLOR="#cccccc" CELLSPACING=0>
83 <TH CLASS="background" COLSPAN=2 ALIGN="left">
84 <FONT SIZE="+1">Display options</FONT>
90 <TD ALIGN="right"><INPUT TYPE="checkbox" NAME="open" VALUE="1" CHECKED></TD>
91 <TD><% mt('Show only open invoices') |h %></TD>
94 % unless ( $custnum ) {
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>
104 <INPUT TYPE="submit" VALUE="<% mt('Get Report') |h %>">
108 <& /elements/footer.html &>
112 unless $FS::CurrentUser::CurrentUser->access_right('List invoices');
114 my $conf = new FS::Conf;
116 my $title = 'Invoice Report';
117 #false laziness w/report_cust_pkg.html
122 if ( $cgi->param('custnum') =~ /^(\d+)$/ ) {
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";
130 push @title_arg, $cust_main->name;