X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Felements%2Fcust_pay_or_refund.html;h=eeef0c0e165064650e1255a4e7e20175ba34fd20;hb=e5d6af11f52aabe8c9e6e12ce43c3401ccf025a8;hp=dc3cb2a994c96e5db9d1ab96e674da0e26be791a;hpb=64948ee373a03fa156ebc89cb39adfa6d4d2c3d5;p=freeside.git diff --git a/httemplate/search/elements/cust_pay_or_refund.html b/httemplate/search/elements/cust_pay_or_refund.html index dc3cb2a99..eeef0c0e1 100755 --- a/httemplate/search/elements/cust_pay_or_refund.html +++ b/httemplate/search/elements/cust_pay_or_refund.html @@ -239,6 +239,12 @@ if ( $cgi->param('magic') ) { $title = $part_referral->referral. " $title"; } + if ( $cgi->param('cust_classnum') ) { + my @classnums = grep /^\d+$/, $cgi->param('cust_classnum'); + push @search, 'cust_main.classnum IN('.join(',',@classnums).')' + if @classnums; + } + if ( $cgi->param('custnum') =~ /^(\d+)$/ ) { push @search, "custnum = $1"; } @@ -324,6 +330,16 @@ if ( $cgi->param('magic') ) { push @search, "$table.payinfo = '$1'"; } + if ( $cgi->param('ccpay') =~ /^([\w-:]+)$/ ) { + # I think that's all the characters we need to allow. + # To avoid confusion, this parameter searches both auth and order_number. + push @search, "($table.auth LIKE '$1%') OR ($table.order_number LIKE '$1%')"; + push @fields, 'auth', 'order_number'; + push @header, 'Auth #', 'Transaction #'; + $align .= 'rr'; + + } + if ( $cgi->param('usernum') =~ /^(\d+)$/ ) { push @search, "$table.usernum = $1"; } @@ -357,6 +373,15 @@ if ( $cgi->param('magic') ) { $orderby = "LOWER(company || ' ' || last || ' ' || first )"; + } elsif ( $cgi->param('magic') eq 'batchnum' ) { + + $cgi->param('batchnum') =~ /^(\d+)$/ + or die "illegal batchnum: ".$cgi->param('batchnum'); + + push @search, "batchnum = $1"; + + $orderby = "LOWER(company || ' ' || last || ' ' || first )"; + } else { die "unknown search magic: ". $cgi->param('magic'); }