projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix payment amount search, RT#34471
[freeside.git]
/
httemplate
/
search
/
elements
/
cust_pay_or_refund.html
diff --git
a/httemplate/search/elements/cust_pay_or_refund.html
b/httemplate/search/elements/cust_pay_or_refund.html
index
b5172fb
..
0e3fce3
100755
(executable)
--- a/
httemplate/search/elements/cust_pay_or_refund.html
+++ b/
httemplate/search/elements/cust_pay_or_refund.html
@@
-271,7
+271,7
@@
if ( $cgi->param('magic') ) {
foreach my $payby ( $cgi->param('payby') ) {
$payby =~
foreach my $payby ( $cgi->param('payby') ) {
$payby =~
- /^(CARD|CHEK|BILL|CASH|PPAL|APPL|ANRD|PREP|WIRE|WEST|EDI|MCRD)(-(VisaMC|Amex|Discover|Maestro|Tokenized))?$/
+ /^(CARD|CHEK|BILL|CASH|PPAL|APPL|ANRD|PREP|WIRE|WEST|EDI|MCRD
|MCHK
)(-(VisaMC|Amex|Discover|Maestro|Tokenized))?$/
or die "illegal payby $payby";
my $payby_search = "$table.payby = '$1'";
or die "illegal payby $payby";
my $payby_search = "$table.payby = '$1'";
@@
-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');
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-:]+)$/ ) {
}
if ( $cgi->param('ccpay') =~ /^([\w-:]+)$/ ) {
@@
-436,7
+437,7
@@
if ( $cgi->param('magic') ) {
"$table.void_date <= $v_ending";
}
"$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';
$orderby = '_date';
@@
-538,6
+539,7
@@
if ( $cgi->param('magic') ) {
} else {
#hmm... is this still used?
} else {
#hmm... is this still used?
+ warn "undefined search magic";
$cgi->param('payinfo') =~ /^\s*(\d+)\s*$/ or die "illegal payinfo";
my $payinfo = $1;
$cgi->param('payinfo') =~ /^\s*(\d+)\s*$/ or die "illegal payinfo";
my $payinfo = $1;