1 <% encode_json(\@return) %>
4 my $curuser = $FS::CurrentUser::CurrentUser;
5 die 'access denied' unless $curuser->access_right('View invoices');
7 if ( $cgi->param('sub') eq 'custnum_search_open' ) {
8 my $custnum = $cgi->param('arg');
9 #warn "searching invoices for $custnum\n";
10 my $cust_main = FS::cust_main->by_key($custnum);
14 } $cust_main->open_cust_bill
15 if $curuser->agentnums_href->{ $cust_main->agentnum };