X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fsearch%2Fcust_pay.cgi;h=c23653aa94f68c565c173d90ab4eeaa2cb590e12;hp=01a2ed95a7a620b2603e6be65af345afad374409;hb=c2146ae32fdef80049abfa13098db2d45f3ebdd5;hpb=34647c32b50ce3b8ee1b6d3d7aef4ba9d0297bdb diff --git a/httemplate/search/cust_pay.cgi b/httemplate/search/cust_pay.cgi index 01a2ed95a..c23653aa9 100755 --- a/httemplate/search/cust_pay.cgi +++ b/httemplate/search/cust_pay.cgi @@ -19,20 +19,23 @@ if ( $3 ) { if ( $3 eq 'VisaMC' ) { #avoid posix regexes for portability - push @search, " ( substring(payinfo from 1 for 1) = '4' ". - " OR substring(payinfo from 1 for 2) = '51' ". - " OR substring(payinfo from 1 for 2) = '52' ". - " OR substring(payinfo from 1 for 2) = '53' ". - " OR substring(payinfo from 1 for 2) = '54' ". - " OR substring(payinfo from 1 for 2) = '54' ". - " OR substring(payinfo from 1 for 2) = '55' ". - " ) "; + push @search, + " ( substring(cust_pay.payinfo from 1 for 1) = '4' ". + " OR substring(cust_pay.payinfo from 1 for 2) = '51' ". + " OR substring(cust_pay.payinfo from 1 for 2) = '52' ". + " OR substring(cust_pay.payinfo from 1 for 2) = '53' ". + " OR substring(cust_pay.payinfo from 1 for 2) = '54' ". + " OR substring(cust_pay.payinfo from 1 for 2) = '54' ". + " OR substring(cust_pay.payinfo from 1 for 2) = '55' ". + " ) "; } elsif ( $3 eq 'Amex' ) { - push @search, " ( substring(payinfo from 1 for 2 ) = '34' ". - " OR substring(payinfo from 1 for 2 ) = '37' ". - " ) "; + push @search, + " ( substring(cust_pay.payinfo from 1 for 2 ) = '34' ". + " OR substring(cust_pay.payinfo from 1 for 2 ) = '37' ". + " ) "; } elsif ( $3 eq 'Discover' ) { - push @search, " substring(payinfo from 1 for 4 ) = '6011' "; + push @search, + " substring(cust_pay.payinfo from 1 for 4 ) = '6011' "; } else { die "unknown card type $3"; }