X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Fcust_main.cgi;h=4d3ec35642705accfed8f8ff16d272aa2714bba9;hb=85e18d1c25a16b3d37ff87484b36a9e17d17cbcf;hp=d5bc17aec6c59b0b21eaddccd6df44d94733683f;hpb=63ec39a8c2a32b5ac325c4973945a26398678347;p=freeside.git diff --git a/httemplate/search/cust_main.cgi b/httemplate/search/cust_main.cgi index d5bc17aec..4d3ec3564 100755 --- a/httemplate/search/cust_main.cgi +++ b/httemplate/search/cust_main.cgi @@ -1,5 +1,5 @@ <% -# +# use strict; #use vars qw( $conf %ncancelled_pkgs %all_pkgs $cgi @cust_main $sortby ); @@ -110,7 +110,7 @@ if ( $cgi->param('browse') ) { or die dbh->errstr. " doing $statement"; $sth->execute or die "Error executing \"$statement\": ". $sth->errstr; - $total = @{$sth->fetchrow_arrayref}[0]; + $total = $sth->fetchrow_arrayref->[0]; my @just_cust_main = qsearch('cust_main',{}, '', "$ncancelled $orderby $limit" @@ -154,7 +154,11 @@ if ( $conf->exists('hidecancelledpackages' ) ) { #%all_pkgs = (); if ( scalar(@cust_main) == 1 && ! $cgi->param('referral_custnum') ) { - print $cgi->redirect(popurl(2). "view/cust_main.cgi?". $cust_main[0]->custnum); + if ( $cgi->param('quickpay') eq 'yes' ) { + print $cgi->redirect(popurl(2). "edit/cust_pay.cgi?quickpay=yes;custnum=". $cust_main[0]->custnum); + } else { + print $cgi->redirect(popurl(2). "view/cust_main.cgi?". $cust_main[0]->custnum); + } exit; } elsif ( scalar(@cust_main) == 0 ) { eidiot "No matching customers found!\n"; @@ -282,7 +286,12 @@ END } #my($rowspan) = scalar(@{$all_pkgs{$custnum}}); - my $view = $p. 'view/cust_main.cgi?'. $custnum; + my $view; + if ( defined $cgi->param('quickpay') && $cgi->param('quickpay') eq 'yes' ) { + $view = $p. 'edit/cust_pay.cgi?quickpay=yes;custnum='. $custnum; + } else { + $view = $p. 'view/cust_main.cgi?'. $custnum; + } print < $custnum