[freeside-commits] freeside/FS/FS cust_main.pm, 1.271.2.39, 1.271.2.40

Ivan,,, ivan at wavetail.420.am
Fri Jan 11 15:10:57 PST 2008


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

Modified Files:
      Tag: FREESIDE_1_7_BRANCH
	cust_main.pm 
Log Message:
add option to enable searching of cust_main.agent_custid with one or two letter prefix before the numeric part

Index: cust_main.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main.pm,v
retrieving revision 1.271.2.39
retrieving revision 1.271.2.40
diff -u -d -r1.271.2.39 -r1.271.2.40
--- cust_main.pm	11 Jan 2008 22:54:09 -0000	1.271.2.39
+++ cust_main.pm	11 Jan 2008 23:10:55 -0000	1.271.2.40
@@ -4756,10 +4756,14 @@
 
     }
 
-  } elsif ( $search =~ /^\s*(\d+)\s*$/ ) { # customer # search
-                                           # (also try agent_custid)
-                                           # (regex needs tweaking if your
-                                           #  legacy cust numbers have letters)
+  # custnum search (also try agent_custid), with some tweaking options if your
+  # legacy cust "numbers" have letters
+  } elsif ( $search =~ /^\s*(\d+)\s*$/
+            || ( $conf->config('cust_main-agent_custid-format') eq 'ww?d+'
+                 && $search =~ /^\s*(\w\w?\d+)\s*$/
+               )
+          )
+  {
 
     push @cust_main, qsearch( {
       'table'     => 'cust_main',



More information about the freeside-commits mailing list