[freeside-commits] freeside/FS/FS cust_main.pm,1.328,1.329
Ivan,,,
ivan at wavetail.420.am
Tue Dec 18 12:58:28 PST 2007
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail:/tmp/cvs-serv27491
Modified Files:
cust_main.pm
Log Message:
legacy agent_custid field should be as searchable as actual custnum, right? at least if it is a number...
Index: cust_main.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main.pm,v
retrieving revision 1.328
retrieving revision 1.329
diff -u -d -r1.328 -r1.329
--- cust_main.pm 17 Dec 2007 00:59:00 -0000 1.328
+++ cust_main.pm 18 Dec 2007 20:58:25 -0000 1.329
@@ -5289,6 +5289,9 @@
}
} elsif ( $search =~ /^\s*(\d+)\s*$/ ) { # customer # search
+ # (also try agent_custid)
+ # (regex needs tweaking if your
+ # legacy cust numbers have letters)
push @cust_main, qsearch( {
'table' => 'cust_main',
@@ -5296,6 +5299,12 @@
'extra_sql' => " AND $agentnums_sql", #agent virtualization
} );
+ push @cust_main, qsearch( {
+ 'table' => 'cust_main',
+ 'hashref' => { 'agent_custid' => $1, %options },
+ 'extra_sql' => " AND $agentnums_sql", #agent virtualization
+ } );
+
} elsif ( $search =~ /^\s*(\S.*\S)\s+\((.+), ([^,]+)\)\s*$/ ) {
my($company, $last, $first) = ( $1, $2, $3 );
More information about the freeside-commits
mailing list