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 <TABLE BGCOLOR="#cccccc" CELLSPACING=0
9 % unless ( $custnum ) {
10 <& /elements/tr-select-agent.html,
11 'curr_value' => scalar( $cgi->param('agentnum') ),
12 'label' => emt('Invoices for agent: '),
17 <& /elements/tr-input-beginning_ending.html &>
19 <& /elements/tr-input-lessthan_greaterthan.html,
20 label => emt('Charged'),
24 <& /elements/tr-input-lessthan_greaterthan.html,
30 <INPUT TYPE="hidden" NAME="payby" VALUE="<% $cust_main->payby %>">
32 <& /elements/tr-select-payby.html,
33 label => emt('Payment method:'),
41 <TD ALIGN="right"><INPUT TYPE="checkbox" NAME="open" VALUE="1" CHECKED></TD>
42 <TD><% mt('Show only open invoices') |h %></TD>
45 % unless ( $custnum ) {
47 <TD ALIGN="right"><INPUT TYPE="checkbox" NAME="newest_percust" VALUE="1"></TD>
48 <TD><% mt('Show only the single most recent invoice per-customer') |h %></TD>
55 <INPUT TYPE="submit" VALUE="<% mt('Get Report') |h %>">
59 <& /elements/footer.html &>
63 unless $FS::CurrentUser::CurrentUser->access_right('List invoices');
65 my $title = 'Invoice Report';
66 #false laziness w/report_cust_pkg.html
71 if ( $cgi->param('custnum') =~ /^(\d+)$/ ) {
73 $cust_main = qsearchs({
74 'table' => 'cust_main',
75 'hashref' => { 'custnum' => $custnum },
76 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,
77 }) or die "unknown custnum $custnum";
79 push @title_arg, $cust_main->name;