[freeside-commits] freeside/FS/FS phone_avail.pm,1.17,1.17.2.1

Ivan,,, ivan at wavetail.420.am
Fri Aug 12 13:07:59 PDT 2011


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv31232

Modified Files:
      Tag: FREESIDE_2_3_BRANCH
	phone_avail.pm 
Log Message:
fix bulk format import when a state needs to be specified, RT#13721

Index: phone_avail.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/phone_avail.pm,v
retrieving revision 1.17
retrieving revision 1.17.2.1
diff -u -w -d -r1.17 -r1.17.2.1
--- phone_avail.pm	7 Jul 2011 01:43:48 -0000	1.17
+++ phone_avail.pm	12 Aug 2011 20:07:57 -0000	1.17.2.1
@@ -203,6 +203,11 @@
 sub msa2msanum {
     my $self = shift;
     my $msa = shift;
+
+    if ( $msa =~ /(.+[^,])\s+(\w{2}(-\w{2})*)$/ ) {
+      $msa = "$1, $2";
+    }
+
     my @msas = qsearch('msa', { 'description' => { 'op' => 'ILIKE',
                                                    'value' => "%$msa%", }
                               });
@@ -215,6 +220,12 @@
 sub msatest {
     my $self = shift;
     my ($their,$our) = (shift,shift);
+
+    $their =~ s/^\s+//;
+    $their =~ s/\s+$//;
+    $their =~ s/\s+/ /g;
+    return 1 if $our eq $their;
+
     my $a = $our;
     $a =~ s/,.*?$//;
     return 1 if $a eq $their;



More information about the freeside-commits mailing list