X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fsearch%2Felements%2Fcust_pay_or_refund.html;h=c272a16140d6d544b624776bc06e95c52e6a9785;hp=234121fa3816064f804085f2a1ee6677f344f8cc;hb=17ca8b897e82cffb3731a63ccae1fb12494a7246;hpb=bbf3f6d6af46d522a395e4c31ed8818059517b75 diff --git a/httemplate/search/elements/cust_pay_or_refund.html b/httemplate/search/elements/cust_pay_or_refund.html index 234121fa3..c272a1614 100755 --- a/httemplate/search/elements/cust_pay_or_refund.html +++ b/httemplate/search/elements/cust_pay_or_refund.html @@ -440,8 +440,6 @@ if ( $cgi->param('magic') ) { $cgi->param('paybatch') =~ /^([\w\/\:\-\.]+)$/ or die "illegal paybatch: ". $cgi->param('paybatch'); - push @search, "paybatch = '$1'"; - $orderby = "LOWER(company || ' ' || last || ' ' || first )"; } elsif ( $cgi->param('magic') eq 'batchnum' ) { @@ -457,6 +455,10 @@ if ( $cgi->param('magic') ) { die "unknown search magic: ". $cgi->param('magic'); } + if ( $cgi->param('paybatch') =~ /^([\w\/\:\-\.]+)$/ ) { + push @search, "paybatch = '$1'"; + } + #unapplied payment/refund if ( $unapplied ) { push @select, '(' . "FS::$table"->unapplied_sql . ') AS unapplied_amount';