[freeside-commits] freeside/FS/FS cust_main.pm,1.476,1.477
Ivan,,,
ivan at wavetail.420.am
Tue Nov 17 14:06:53 PST 2009
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv15022/FS/FS
Modified Files:
cust_main.pm
Log Message:
do a case-insensive search on browser-remembered results, so starting to use USPS verification (which UPPERCASES everything) doesn't invalidate everything your browser remembered in quick payment entry
Index: cust_main.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main.pm,v
retrieving revision 1.476
retrieving revision 1.477
diff -u -d -r1.476 -r1.477
--- cust_main.pm 16 Nov 2009 03:55:18 -0000 1.476
+++ cust_main.pm 17 Nov 2009 22:06:51 -0000 1.477
@@ -8810,17 +8810,21 @@
# "Company (Last, First)"
#this is probably something a browser remembered,
- #so just do an exact (but case-insensitive) search
+ #so just do an exact search (but case-insensitive, so USPS standardization
+ #doesn't throw a wrench in the works)
foreach my $prefix ( '', 'ship_' ) {
push @cust_main, qsearch( {
'table' => 'cust_main',
- 'hashref' => { $prefix.'first' => $first,
- $prefix.'last' => $last,
- $prefix.'company' => $company,
- %options,
- },
- 'extra_sql' => " AND $agentnums_sql",
+ 'hashref' => { %options },
+ 'extra_sql' =>
+ ( keys(%options) ? ' AND ' : ' WHERE ' ).
+ join(' AND ',
+ " LOWER(${prefix}first) = ". dbh->quote(lc($first)),
+ " LOWER(${prefix}last) = ". dbh->quote(lc($last)),
+ " LOWER(${prefix}company) = ". dbh->quote(lc($company)),
+ $agentnums_sql,
+ ),
} );
}
More information about the freeside-commits
mailing list