X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fsearch%2Fcust_main.cgi;h=24d49c588130828813bcdc9ab40ec983bb0f53d2;hp=62231a12013c3ca2a5a4c391551d071f8d403bfc;hb=1fc8addc56f8daf12397da568eb1ac1b27fd3984;hpb=6d821bf9a2419a177014cf882178370a0cdc748f diff --git a/httemplate/search/cust_main.cgi b/httemplate/search/cust_main.cgi index 62231a120..24d49c588 100755 --- a/httemplate/search/cust_main.cgi +++ b/httemplate/search/cust_main.cgi @@ -38,6 +38,10 @@ ( <% mt("$linklabel canceled customers") |h %> ) % } +% unless ($cgi->param('browse')) { + <& /elements/agent_transfer_link.html, {'list' => \@cust_main} &> +% } + % if ( $cgi->param('referral_custnum') ) { % $cgi->param('referral_custnum') =~ /^(\d+)$/ % or errorpage(emt("Illegal referral_custnum")); @@ -330,10 +334,11 @@ my $curuser = $FS::CurrentUser::CurrentUser; die "access denied" - unless $curuser->access_right('List all customers'); + unless $curuser->access_right('List all customers') + || $curuser->access_right('List customers'); my $conf = new FS::Conf; -my $maxrecords = $conf->config('maxsearchrecordsperpage'); +my $maxrecords = $conf->config('maxsearchrecordsperpage') || 100; # summarize more than this many services of the same svcpart my $large_pkg_size = $conf->config('cust_pkg-large_pkg_size') || 0; @@ -351,9 +356,11 @@ my(@cust_main, $sortby, $orderby); my @select = (); my @addl_headers = (); my @addl_cols = (); -if ( $cgi->param('browse') - || $cgi->param('otaker_on') - || $cgi->param('agentnum_on') +if ( ( $cgi->param('browse') + || $cgi->param('otaker_on') + || $cgi->param('agentnum_on') + ) + and $curuser->access_right('List all customers') ) { my %search = (); @@ -501,7 +508,7 @@ if ( $cgi->param('browse') ); } - @cust_main = grep { $_->num_ncancelled_pkgs || ! $_->num_pkgs } @cust_main + @cust_main = grep { $_->status ne 'cancelled' } @cust_main if ! $cgi->param('cancelled') && ( $cgi->param('showcancelledcustomers') eq '0' #see if it was set by me @@ -582,7 +589,7 @@ sub cardsearch { my($card)=$cgi->param('card'); $card =~ s/\D//g; - $card =~ /^(\d{13,16}|\d{8,9})$/ or errorpage(emt("Illegal card number")); + $card =~ /^(\d{13,19}|\d{8,9})$/ or errorpage(emt("Illegal card number")); my($payinfo)=$1; [ qsearch('cust_main',{'payinfo'=>$payinfo, 'payby'=>'CARD'}),