diff options
author | ivan <ivan> | 2001-11-30 00:04:38 +0000 |
---|---|---|
committer | ivan <ivan> | 2001-11-30 00:04:38 +0000 |
commit | 5c0eff524454c3e66a0fbe90250884d0a7578284 (patch) | |
tree | bd28fc1b4e0fcb0b23714a48d8b16b9ca1a1d859 /FS | |
parent | 09655ec6f1761d464a928f6aab88bb936999df25 (diff) |
more link methods
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/cust_pkg.pm | 4 | ||||
-rw-r--r-- | FS/FS/cust_svc.pm | 14 | ||||
-rw-r--r-- | FS/FS/svc_Common.pm | 18 |
3 files changed, 30 insertions, 6 deletions
diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm index 19e1da356..c6fabe5cb 100644 --- a/FS/FS/cust_pkg.pm +++ b/FS/FS/cust_pkg.pm @@ -99,7 +99,7 @@ inherits from FS::Record. The following fields are currently supported: =item otaker - order taker (assigned automatically if null, see L<FS::UID>) =item manual_flag - If this field is set to 1, disables the automatic -unsuspensiond of this package when using the B<unsuspendauto> config file. +unsuspension of this package when using the B<unsuspendauto> config file. =back @@ -629,7 +629,7 @@ sub order { =head1 VERSION -$Id: cust_pkg.pm,v 1.13 2001-11-03 17:49:52 ivan Exp $ +$Id: cust_pkg.pm,v 1.14 2001-11-30 00:04:38 ivan Exp $ =head1 BUGS diff --git a/FS/FS/cust_svc.pm b/FS/FS/cust_svc.pm index c398e5ecd..9bc563f40 100644 --- a/FS/FS/cust_svc.pm +++ b/FS/FS/cust_svc.pm @@ -134,6 +134,18 @@ sub part_svc { : qsearchs( 'part_svc', { 'svcpart' => $self->svcpart } ); } +=item cust_pkg + +Returns the definition for this service, as a FS::part_svc object (see +L<FS::part_svc>). + +=cut + +sub cust_pkg { + my $self = shift; + qsearchs( 'cust_pkg', { 'pkgnum' => $self->pkgnum } ); +} + =item label Returns a list consisting of: @@ -183,7 +195,7 @@ sub label { =head1 VERSION -$Id: cust_svc.pm,v 1.6 2001-11-03 17:49:52 ivan Exp $ +$Id: cust_svc.pm,v 1.7 2001-11-30 00:04:38 ivan Exp $ =head1 BUGS diff --git a/FS/FS/svc_Common.pm b/FS/FS/svc_Common.pm index 7e216461f..042c243fd 100644 --- a/FS/FS/svc_Common.pm +++ b/FS/FS/svc_Common.pm @@ -107,7 +107,7 @@ sub delete { $error = $self->SUPER::delete; return $error if $error; - my $cust_svc = qsearchs( 'cust_svc' , { 'svcnum' => $svcnum } ); + my $cust_svc = $self->cust_svc; $error = $cust_svc->delete; return $error if $error; @@ -154,7 +154,7 @@ sub setx { #get part_svc my $svcpart; if ( $self->svcnum ) { - my $cust_svc = qsearchs( 'cust_svc', { 'svcnum' => $self->svcnum } ); + my $cust_svc = $self->cust_svc; return "Unknown svcnum" unless $cust_svc; $svcpart = $cust_svc->svcpart; } else { @@ -176,6 +176,18 @@ sub setx { } +=item cust_svc + +Returns the cust_svc record associated with this svc_ record, as a FS::cust_svc +object (see L<FS::cust_svc>). + +=cut + +sub cust_svc { + my $self = shift; + qsearchs('cust_svc', { 'svcnum' => $self->svcnum } ); +} + =item suspend =item unsuspend @@ -195,7 +207,7 @@ sub cancel { ''; } =head1 VERSION -$Id: svc_Common.pm,v 1.6 2001-09-11 22:20:28 ivan Exp $ +$Id: svc_Common.pm,v 1.7 2001-11-30 00:04:38 ivan Exp $ =head1 BUGS |