X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fsvc_broadband.pm;h=d05ae72d08748afc82ed9eb57052f82605140e47;hp=078df559ab087bb420af8bb8c9eb9de0cebdfc8f;hb=HEAD;hpb=4facec5414f411b97c9b19772c13f125a0b748cb diff --git a/FS/FS/svc_broadband.pm b/FS/FS/svc_broadband.pm index 078df559a..d05ae72d0 100755 --- a/FS/FS/svc_broadband.pm +++ b/FS/FS/svc_broadband.pm @@ -96,6 +96,8 @@ points to. You can ask the object for a copy with the I method. =cut sub table_info { + my $conf = new FS::Conf; + my $ip_addr_required = $conf->exists('svc_broadband-allow_null_ip_addr') ? '' : '1'; { 'name' => 'Wireless broadband', 'name_plural' => 'Wireless broadband services', @@ -107,9 +109,20 @@ sub table_info { 'fields' => { 'svcnum' => 'Service', 'description' => 'Descriptive label', - 'speed_down' => 'Download speed (Kbps)', - 'speed_up' => 'Upload speed (Kbps)', - 'ip_addr' => 'IP address', + 'speed_up' => { + 'label' => 'Upload speed (Kbps)', + 'type' => 'fcc_477_speed', + 'def_info' => 'both upload and download speed must be set to FCC 477 information if using that modifier', + }, + 'speed_down' => { + 'label' => 'Download speed (Kbps)', + 'type' => 'fcc_477_speed', + 'def_info' => 'both upload and download speed must be set to FCC 477 information if using that modifier', + }, + 'ip_addr' => { + 'label' => 'IP address', + 'required' => $ip_addr_required, + }, 'blocknum' => { 'label' => 'Address block', 'type' => 'select', @@ -134,6 +147,7 @@ sub table_info { #select_table => 'radius_group', #select_key => 'groupnum', #select_label => 'groupname', + disable_select => 1, disable_inventory => 1, multiple => 1, }, @@ -147,6 +161,9 @@ sub table_info { disable_inventory => 1, }, 'serviceid' => 'Torrus serviceid', #but is should be hidden + 'speed_test_up' => { 'label' => 'Speed test upload (Kbps)' }, + 'speed_test_down' => { 'label' => 'Speed test download (Kbps)' }, + 'speed_test_latency' => 'Speed test latency (ms)', }, }; } @@ -352,6 +369,8 @@ sub check { || $self->ut_textn('description') || $self->ut_numbern('speed_up') || $self->ut_numbern('speed_down') + || $self->ut_numbern('speed_test_up') + || $self->ut_numbern('speed_test_down') || $self->ut_ipn('ip_addr') || $self->ut_hexn('mac_addr') || $self->ut_hexn('auth_key') @@ -501,6 +520,11 @@ sub _upgrade_data { #next SVC; } + require FS::Misc::FixIPFormat; + FS::Misc::FixIPFormat::fix_bad_addresses_in_table( + 'svc_broadband', 'svcnum', 'ip_addr', + ); + ''; } @@ -523,4 +547,3 @@ FS::part_svc, schema.html from the base documentation. =cut 1; -