X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fsvc_alarm.pm;h=0624f18a8ffb233f217f6f016592ac44d5ca21eb;hb=672c4452d590bc853f21f016b291496651156c8b;hp=4a355c7c168e0bc3bef9134bf194098b7206dd90;hpb=63d22d5cf01cb22b92ef7393388ea175d675b13e;p=freeside.git diff --git a/FS/FS/svc_alarm.pm b/FS/FS/svc_alarm.pm index 4a355c7c1..0624f18a8 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 Receiver #'}, + 'cs_phonenum' => { label => 'CS Phone #' }, + 'serialnum' => { label => 'Alarm Serial #' }, 'alarmsystemnum' => { label => 'Alarm System Vendor', type => 'select-alarm_system', disable_inventory => 1, @@ -195,11 +198,16 @@ sub check { my $x = $self->setfixed; return $x unless ref $x; - my $error = + 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', $iso3166) + || $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')