X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fpart_svc.pm;h=20b80c684b0ad8bc9af6b51c611fcb90d2a474f2;hp=c1554082de4906a4844ad96a2c961c1c624e9c0a;hb=8d7cd4b2bd99cc1a711d81b55a1652d31eda4df5;hpb=0bfdd767de9c8758c5997beb72bfd8c22db25ab4 diff --git a/FS/FS/part_svc.pm b/FS/FS/part_svc.pm index c1554082d..20b80c684 100644 --- a/FS/FS/part_svc.pm +++ b/FS/FS/part_svc.pm @@ -9,6 +9,7 @@ use FS::part_svc_column; use FS::part_export; use FS::export_svc; use FS::cust_svc; +use FS::part_svc_class; @ISA = qw(FS::Record); @@ -51,6 +52,8 @@ FS::Record. The following fields are currently supported: =item svcdb - table used for this service. See L, L, and L, among others. +=item classnum - Optional service class (see L) + =item disabled - Disabled flag, empty or `Y' =item preserve - Preserve after cancellation, empty or 'Y' @@ -387,6 +390,7 @@ sub check { || $self->ut_enum('disabled', [ '', 'Y' ] ) || $self->ut_enum('preserve', [ '', 'Y' ] ) || $self->ut_enum('selfservice_access', [ '', 'hidden', 'readonly' ] ) + || $self->ut_foreign_keyn('classnum', 'part_svc_class', 'classnum' ) ; return $error if $error; @@ -712,7 +716,7 @@ sub process { my $job = shift; my $param = thaw(decode_base64(shift)); - warn Dumper($param) if $DEBUG; + warn Dumper($param);# if $DEBUG; my $old = qsearchs('part_svc', { 'svcpart' => $param->{'svcpart'} }) if $param->{'svcpart'}; @@ -864,7 +868,8 @@ sub _upgrade_data { #class method 'description' => $groupname, }; $error = $g->insert; - die $error if $error; + die "Error inserting new radius_group for service definition group \"$groupname\": $error" + if $error; } push @groupnums, $g->groupnum; }