[freeside-commits] freeside/FS/FS cust_main.pm,1.546,1.547

Ivan,,, ivan at wavetail.420.am
Fri Sep 17 20:49:10 PDT 2010


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

Modified Files:
	cust_main.pm 
Log Message:
ignore bad zip on otaker upgrade

Index: cust_main.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main.pm,v
retrieving revision 1.546
retrieving revision 1.547
diff -u -w -d -r1.546 -r1.547
--- cust_main.pm	17 Sep 2010 23:32:33 -0000	1.546
+++ cust_main.pm	18 Sep 2010 03:49:07 -0000	1.547
@@ -8,7 +8,7 @@
            );
 use vars qw( $DEBUG $me $conf
              @encrypted_fields
-             $import $ignore_expired_card
+             $import $ignore_expired_card $ignore_illegal_zip
              $skip_fuzzyfiles @fuzzyfields
              @paytypes
            );
@@ -75,6 +75,7 @@
 
 $import = 0;
 $ignore_expired_card = 0;
+$ignore_illegal_zip = 0;
 
 $skip_fuzzyfiles = 0;
 @fuzzyfields = ( 'first', 'last', 'company', 'address1' );
@@ -1800,10 +1801,14 @@
     $self->ut_phonen('daytime', $self->country)
     || $self->ut_phonen('night', $self->country)
     || $self->ut_phonen('fax', $self->country)
-    || $self->ut_zip('zip', $self->country)
   ;
   return $error if $error;
 
+  unless ( $ignore_illegal_zip ) {
+    $error = $self->ut_zip('zip', $self->country);
+    return $error if $error;
+  }
+
   if ( $conf->exists('cust_main-require_phone')
        && ! length($self->daytime) && ! length($self->night)
      ) {
@@ -1856,10 +1861,13 @@
       $self->ut_phonen('ship_daytime', $self->ship_country)
       || $self->ut_phonen('ship_night', $self->ship_country)
       || $self->ut_phonen('ship_fax', $self->ship_country)
-      || $self->ut_zip('ship_zip', $self->ship_country)
     ;
     return $error if $error;
 
+    unless ( $ignore_illegal_zip ) {
+      $error = $self->ut_zip('ship_zip', $self->ship_country);
+      return $error if $error;
+    }
     return "Unit # is required."
       if $self->ship_address2 =~ /^\s*$/
       && $conf->exists('cust_main-require_address2');
@@ -5537,6 +5545,7 @@
   $sth->execute or die $sth->errstr;
 
   local($ignore_expired_card) = 1;
+  local($ignore_illegal_zip) = 1;
   local($skip_fuzzyfiles) = 1;
   $class->_upgrade_otaker(%opts);
 



More information about the freeside-commits mailing list