X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fsvc_broadband.pm;h=ad7dedcdd62ddf5513f71159d291e56f256c54e8;hb=dafdfc24616b04a5ff594da31e2cdd03f58634b6;hp=2b794aa4b781f176f2c82d2a6042f283bf79f3bc;hpb=0fb307c305e4bc2c9c27dc25a3308beae3a4d33c;p=freeside.git diff --git a/FS/FS/svc_broadband.pm b/FS/FS/svc_broadband.pm index 2b794aa4b..ad7dedcdd 100755 --- a/FS/FS/svc_broadband.pm +++ b/FS/FS/svc_broadband.pm @@ -9,7 +9,7 @@ use FS::addr_block; use FS::part_svc_router; use NetAddr::IP; -@ISA = qw( FS::svc_Common ); +@ISA = qw( FS::svc_Radius_Mixin FS::svc_Common ); $FS::UID::callback{'FS::svc_broadband'} = sub { $conf = new FS::Conf; @@ -115,6 +115,15 @@ sub table_info { 'longitude' => 'Longitude', 'altitude' => 'Altitude', 'vlan_profile' => 'VLAN profile', + 'usergroup' => { + label => 'RADIUS groups', + type => 'select-radius_group.html', + #select_table => 'radius_group', + #select_key => 'groupnum', + #select_label => 'groupname', + disable_inventory => 1, + multiple => 1, + }, }, }; } @@ -168,7 +177,7 @@ sub search { #agentnum if ( $params->{'agentnum'} =~ /^(\d+)$/ and $1 ) { - push @where, "agentnum = $1"; + push @where, "cust_main.agentnum = $1"; } push @where, $FS::CurrentUser::CurrentUser->agentnums_sql( 'null_right' => 'View/link unlinked services', @@ -334,6 +343,10 @@ sub check { return $x unless ref($x); + my $nw_coords = $conf->exists('svc_broadband-require-nw-coordinates'); + my $lat_lower = $nw_coords ? 1 : -90; + my $lon_upper = $nw_coords ? -1 : 180; + my $error = $self->ut_numbern('svcnum') || $self->ut_numbern('blocknum') @@ -343,8 +356,8 @@ sub check { || $self->ut_ipn('ip_addr') || $self->ut_hexn('mac_addr') || $self->ut_hexn('auth_key') - || $self->ut_coordn('latitude', -90, 90) - || $self->ut_coordn('longitude', -180, 180) + || $self->ut_coordn('latitude', $lat_lower, 90) + || $self->ut_coordn('longitude', -180, $lon_upper) || $self->ut_sfloatn('altitude') || $self->ut_textn('vlan_profile') || $self->ut_textn('plan_id')