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_class.html,
24 label => mt('Customer Class'),
25 field => 'cust_classnum',
27 'pre_options' => [ '' => emt('(none)') ],
32 <INPUT TYPE="hidden" NAME="payby" VALUE="<% $cust_main->payby %>">
34 <& /elements/tr-select-payby.html,
35 label => emt('Payment method:'),
47 <TABLE BGCOLOR="#cccccc" CELLSPACING=0>
50 <TH CLASS="background" COLSPAN=2 ALIGN="left">
51 <FONT SIZE="+1">Invoice search options</FONT>
55 <& /elements/tr-input-beginning_ending.html &>
57 <& /elements/tr-input-lessthan_greaterthan.html,
58 label => emt('Charged'),
62 <& /elements/tr-input-lessthan_greaterthan.html,
67 % if ( $conf->exists('cust_bill-enable_promised_date') ) {
70 <TD ALIGN="right" STYLE="vertical-align:text-top">
71 <% emt('Promised payment date:') %></TD>
73 <INPUT TYPE="checkbox" NAME="promised_date" CHECKED VALUE="null">
74 <% emt('None') %> <BR>
75 <INPUT TYPE="checkbox" NAME="promised_date" CHECKED VALUE="past">
76 <% emt('In the past') %><BR>
77 <INPUT TYPE="checkbox" NAME="promised_date" CHECKED VALUE="future">
78 <% emt('In the future') %><BR>
86 <TABLE BGCOLOR="#cccccc" CELLSPACING=0>
89 <TH CLASS="background" COLSPAN=2 ALIGN="left">
90 <FONT SIZE="+1">Display options</FONT>
96 <TD ALIGN="right"><INPUT TYPE="checkbox" NAME="open" VALUE="1" CHECKED></TD>
97 <TD><% mt('Show only open invoices') |h %></TD>
100 % unless ( $custnum ) {
102 <TD ALIGN="right"><INPUT TYPE="checkbox" NAME="newest_percust" VALUE="1"></TD>
103 <TD><% mt('Show only the single most recent invoice per-customer') |h %></TD>
110 <INPUT TYPE="submit" VALUE="<% mt('Get Report') |h %>">
114 <& /elements/footer.html &>
118 unless $FS::CurrentUser::CurrentUser->access_right('List invoices');
120 my $conf = new FS::Conf;
122 my $title = 'Invoice Report';
123 #false laziness w/report_cust_pkg.html
128 if ( $cgi->param('custnum') =~ /^(\d+)$/ ) {
130 $cust_main = qsearchs({
131 'table' => 'cust_main',
132 'hashref' => { 'custnum' => $custnum },
133 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,
134 }) or die "unknown custnum $custnum";
136 push @title_arg, $cust_main->name;