[freeside-commits] freeside/FS/FS cust_main.pm, 1.271.2.34, 1.271.2.35

Ivan,,, ivan at wavetail.420.am
Tue Dec 18 12:58:32 PST 2007


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail:/tmp/cvs-serv27496

Modified Files:
      Tag: FREESIDE_1_7_BRANCH
	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.271.2.34
retrieving revision 1.271.2.35
diff -u -d -r1.271.2.34 -r1.271.2.35
--- cust_main.pm	17 Dec 2007 00:59:40 -0000	1.271.2.34
+++ cust_main.pm	18 Dec 2007 20:58:26 -0000	1.271.2.35
@@ -4629,6 +4629,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',
@@ -4636,6 +4639,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