[freeside-commits] freeside/FS/FS cust_main.pm, 1.586.2.2, 1.586.2.3 Schema.pm, 1.317.2.8, 1.317.2.9

Ivan,,, ivan at wavetail.420.am
Tue Sep 27 16:01:36 PDT 2011


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

Modified Files:
      Tag: FREESIDE_2_3_BRANCH
	cust_main.pm Schema.pm 
Log Message:
add cust_main.mobile and ship_mobile to support uniserve portal, RT#13656

Index: Schema.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Schema.pm,v
retrieving revision 1.317.2.8
retrieving revision 1.317.2.9
diff -u -w -d -r1.317.2.8 -r1.317.2.9
--- Schema.pm	22 Sep 2011 19:14:27 -0000	1.317.2.8
+++ Schema.pm	27 Sep 2011 23:01:33 -0000	1.317.2.9
@@ -839,6 +839,7 @@
         'daytime',  'varchar', 'NULL', 20, '', '', 
         'night',    'varchar', 'NULL', 20, '', '', 
         'fax',      'varchar', 'NULL', 12, '', '', 
+        'mobile',   'varchar', 'NULL', 12, '', '', 
         'ship_last',     'varchar', 'NULL', 2*$char_d, '', '', 
 #        'ship_middle',   'varchar', 'NULL', $char_d, '', '', 
         'ship_first',    'varchar', 'NULL', $char_d, '', '', 
@@ -853,6 +854,7 @@
         'ship_daytime',  'varchar', 'NULL', 20, '', '', 
         'ship_night',    'varchar', 'NULL', 20, '', '', 
         'ship_fax',      'varchar', 'NULL', 12, '', '', 
+        'ship_mobile',   'varchar', 'NULL', 12, '', '', 
         'payby',    'char', '',     4, '', '', 
         'payinfo',  'varchar', 'NULL', 512, '', '', 
         'paycvv',   'varchar', 'NULL', 512, '', '', 
@@ -899,12 +901,12 @@
                    [ 'last' ], [ 'company' ],
                    [ 'county' ], [ 'state' ], [ 'country' ],
                    [ 'zip' ],
-                   [ 'daytime' ], [ 'night' ], [ 'fax' ],
+                   [ 'daytime' ], [ 'night' ], [ 'fax' ], [ 'mobile' ],
                    #shipping
                    [ 'ship_last' ], [ 'ship_company' ],
                    [ 'ship_county' ], [ 'ship_state' ], [ 'ship_country' ],
                    [ 'ship_zip' ],
-                   [ 'ship_daytime' ], [ 'ship_night' ], [ 'ship_fax' ],
+                   [ 'ship_daytime' ], [ 'ship_night' ], [ 'ship_fax' ], [ 'ship_mobile' ]
                  ],
     },
 

Index: cust_main.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main.pm,v
retrieving revision 1.586.2.2
retrieving revision 1.586.2.3
diff -u -w -d -r1.586.2.2 -r1.586.2.3
--- cust_main.pm	16 Sep 2011 00:15:46 -0000	1.586.2.2
+++ cust_main.pm	27 Sep 2011 23:01:32 -0000	1.586.2.3
@@ -211,6 +211,10 @@
 
 phone (optional)
 
+=item mobile
+
+phone (optional)
+
 =item ship_first
 
 Shipping first name
@@ -257,6 +261,10 @@
 
 phone (optional)
 
+=item ship_mobile
+
+phone (optional)
+
 =item payby
 
 Payment Type (See L<FS::payinfo_Mixin> for valid payby values)
@@ -1750,6 +1758,7 @@
     $self->ut_phonen('daytime', $self->country)
     || $self->ut_phonen('night', $self->country)
     || $self->ut_phonen('fax', $self->country)
+    || $self->ut_phonen('mobile',  $self->country)
   ;
   return $error if $error;
 
@@ -1759,7 +1768,7 @@
   }
 
   if ( $conf->exists('cust_main-require_phone')
-       && ! length($self->daytime) && ! length($self->night)
+       && ! length($self->daytime) && ! length($self->night) && ! length($self->mobile)
      ) {
 
     my $daytime_label = FS::Msgcat::_gettext('daytime') =~ /^(daytime)?$/
@@ -1769,7 +1778,11 @@
                         ? 'Night Phone'
                         : FS::Msgcat::_gettext('night');
   
-    return "$daytime_label or $night_label is required"
+    my $mobile_label = FS::Msgcat::_gettext('mobile') =~ /^(mobile)?$/
+                        ? 'Mobile Phone'
+                        : FS::Msgcat::_gettext('mobile');
+
+    return "$daytime_label, $night_label or $mobile_label is required"
   
   }
 
@@ -1810,6 +1823,7 @@
       $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_phonen('ship_mobile',  $self->ship_country)
     ;
     return $error if $error;
 
@@ -2062,7 +2076,7 @@
 sub addr_fields {
   qw( last first company
       address1 address2 city county state zip country
-      daytime night fax
+      daytime night fax mobile
     );
 }
 



More information about the freeside-commits mailing list