[freeside-commits] branch FREESIDE_3_BRANCH updated. 5cd5119f23df408cb235a855d8d99c6a53b880cf

Carl J. Adams-Collier cjac at 420.am
Thu Sep 18 20:38:39 PDT 2014


The branch, FREESIDE_3_BRANCH has been updated
       via  5cd5119f23df408cb235a855d8d99c6a53b880cf (commit)
       via  0dd51846f6279fcdf3b4a7749b70d3b2fad8b0a5 (commit)
       via  11813b5607aeb793535aa2e893466480923b8d05 (commit)
      from  679da47bf6d8d38ab1993026393eb03118512dcc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5cd5119f23df408cb235a855d8d99c6a53b880cf
Author: C.J. Adams-Collier <cjac at colliertech.org>
Date:   Thu Sep 18 16:42:50 2014 -0700

    fixed typo of Receiver

diff --git a/FS/FS/svc_alarm.pm b/FS/FS/svc_alarm.pm
index bfdb6bd..0624f18 100644
--- a/FS/FS/svc_alarm.pm
+++ b/FS/FS/svc_alarm.pm
@@ -75,7 +75,7 @@ sub table_info {
     'acctnum'         => { label => 'Account #', %opts },
     '_password'       => { label => 'Password' , %opts },
     'location'        => { label => 'Location',  %opts },
-    'cs_receiver'     => { label => 'CS Reciever #'},
+    'cs_receiver'     => { label => 'CS Receiver #'},
     'cs_phonenum'     => { label => 'CS Phone #' },
     'serialnum'       => { label => 'Alarm Serial #' },
     'alarmsystemnum'  => { label => 'Alarm System Vendor',

commit 0dd51846f6279fcdf3b4a7749b70d3b2fad8b0a5
Author: C.J. Adams-Collier <cjac at colliertech.org>
Date:   Thu Sep 18 11:56:02 2014 -0700

    FS RT #30831 - passing the ISO 3166-1 alpha-2 country code to ut_phonen

diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm
index 3e50b11..6e4f973 100644
--- a/FS/FS/Record.pm
+++ b/FS/FS/Record.pm
@@ -2487,8 +2487,8 @@ sub ut_alpha_lower {
 Check/untaint phone numbers.  May be null.  If there is an error, returns
 the error, otherwise returns false.
 
-Takes an optional two-letter ISO country code; without it or with unsupported
-countries, ut_phonen simply calls ut_alphan.
+Takes an optional two-letter ISO 3166-1 alpha-2 country code; without
+it or with unsupported countries, ut_phonen simply calls ut_alphan.
 
 =cut
 
diff --git a/FS/FS/svc_alarm.pm b/FS/FS/svc_alarm.pm
index bb9338c..bfdb6bd 100644
--- a/FS/FS/svc_alarm.pm
+++ b/FS/FS/svc_alarm.pm
@@ -198,13 +198,15 @@ sub check {
   my $x = $self->setfixed;
   return $x unless ref $x;
 
+  my $iso3166 = $self->cust_main->ship_location->country();
+
   my $error =
     $self->ut_numbern('svcnum')
     || $self->ut_text('acctnum')
     || $self->ut_alphan('_password')
     || $self->ut_textn('location')
     || $self->ut_numbern('cs_receiver')
-    || $self->ut_phonen('cs_phonenum')
+    || $self->ut_phonen('cs_phonenum', $iso3166)
     || $self->ut_alphan('serialnum')
     || $self->ut_foreign_key('alarmsystemnum',  'alarm_system',  'systemnum')
     || $self->ut_foreign_key('alarmtypenum',    'alarm_type',    'typenum')

commit 11813b5607aeb793535aa2e893466480923b8d05
Author: C.J. Adams-Collier <cjac at colliertech.org>
Date:   Wed Sep 17 11:47:23 2014 -0700

    FS RT#3083 - added fields/labels to svc_alarm as spec'd by customer ; verified that input validation is correct

diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm
index 3c12f0f..54f84e0 100644
--- a/FS/FS/Schema.pm
+++ b/FS/FS/Schema.pm
@@ -4429,13 +4429,17 @@ sub tables_hashref {
 
     'svc_alarm' => {
       'columns' => [
-        'svcnum',          'int',      '',      '', '', '', 
-        'alarmsystemnum',  'int',      '',      '', '', '',
-        'alarmtypenum',    'int',      '',      '', '', '',
-        'alarmstationnum', 'int',      '',      '', '', '',
-        'acctnum',      'varchar',     '', $char_d, '', '',
-        '_password',    'varchar',     '', $char_d, '', '',
-        'location',     'varchar', 'NULL', $char_d, '', '',
+#       name               type        null   length   default local
+        'svcnum',          'int',      '',    '',      '',     '', 
+        'alarmsystemnum',  'int',      '',    '',      '',     '',
+        'alarmtypenum',    'int',      '',    '',      '',     '',
+        'alarmstationnum', 'int',      '',    '',      '',     '',
+        'acctnum',         'varchar',  '',    $char_d, '',     '',
+        '_password',       'varchar',  '',    $char_d, '',     '',
+        'location',        'varchar', 'NULL', $char_d, '',     '',
+        'cs_receiver',     'int',     'NULL', '',      '',     '',
+        'cs_phonenum',     'varchar', 'NULL', $char_d, '',     '',
+        'serialnum',       'varchar', 'NULL', $char_d, '',     '',
         #installer (rep)
       ],
       'primary_key' => 'svcnum',
diff --git a/FS/FS/svc_alarm.pm b/FS/FS/svc_alarm.pm
index 4a355c7..bb9338c 100644
--- a/FS/FS/svc_alarm.pm
+++ b/FS/FS/svc_alarm.pm
@@ -75,6 +75,9 @@ sub table_info {
     'acctnum'         => { label => 'Account #', %opts },
     '_password'       => { label => 'Password' , %opts },
     'location'        => { label => 'Location',  %opts },
+    'cs_receiver'     => { label => 'CS Reciever #'},
+    'cs_phonenum'     => { label => 'CS Phone #' },
+    'serialnum'       => { label => 'Alarm Serial #' },
     'alarmsystemnum'  => { label => 'Alarm System Vendor',
                            type  => 'select-alarm_system',
                            disable_inventory => 1,
@@ -195,11 +198,14 @@ sub check {
   my $x = $self->setfixed;
   return $x unless ref $x;
 
-  my $error = 
+  my $error =
     $self->ut_numbern('svcnum')
     || $self->ut_text('acctnum')
     || $self->ut_alphan('_password')
     || $self->ut_textn('location')
+    || $self->ut_numbern('cs_receiver')
+    || $self->ut_phonen('cs_phonenum')
+    || $self->ut_alphan('serialnum')
     || $self->ut_foreign_key('alarmsystemnum',  'alarm_system',  'systemnum')
     || $self->ut_foreign_key('alarmtypenum',    'alarm_type',    'typenum')
     || $self->ut_foreign_key('alarmstationnum', 'alarm_station', 'stationnum')

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/Record.pm    |    4 ++--
 FS/FS/Schema.pm    |   18 +++++++++++-------
 FS/FS/svc_alarm.pm |   10 +++++++++-
 3 files changed, 22 insertions(+), 10 deletions(-)




More information about the freeside-commits mailing list