X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Felements%2Fcust_pay_or_refund.html;h=0e3fce30339a6b05f2b0c4fb86ea0db2c3a241fc;hb=b9480e431289b01d37c8206df4285d311cf2c0e8;hp=7bebe7f40f998c43ab3726f6cf2fd40d80f8896b;hpb=8d953e7c2f94dc007d94da74650d27c5a74cc792;p=freeside.git diff --git a/httemplate/search/elements/cust_pay_or_refund.html b/httemplate/search/elements/cust_pay_or_refund.html index 7bebe7f40..0e3fce303 100755 --- a/httemplate/search/elements/cust_pay_or_refund.html +++ b/httemplate/search/elements/cust_pay_or_refund.html @@ -402,7 +402,8 @@ if ( $cgi->param('magic') ) { if ( $cgi->param('payinfo') ) { $cgi->param('payinfo') =~ /^\s*(\d+)\s*$/ or die "illegal payinfo ". $cgi->param('payinfo'); - push @search, "$table.payinfo = '$1'"; + my $regexp = regexp_sql(); + push @search, "$table.payinfo $regexp '^0*$1\$'"; } if ( $cgi->param('ccpay') =~ /^([\w-:]+)$/ ) { @@ -436,7 +437,7 @@ if ( $cgi->param('magic') ) { "$table.void_date <= $v_ending"; } - push @search, FS::UI::Web::parse_lt_gt($cgi, "$table.$amount_field" ); + push @search, FS::UI::Web::parse_lt_gt($cgi, $amount_field, $table); $orderby = '_date'; @@ -538,6 +539,7 @@ if ( $cgi->param('magic') ) { } else { #hmm... is this still used? + warn "undefined search magic"; $cgi->param('payinfo') =~ /^\s*(\d+)\s*$/ or die "illegal payinfo"; my $payinfo = $1;