summaryrefslogtreecommitdiff
path: root/FS/FS/svc_Common.pm
diff options
context:
space:
mode:
authorivan <ivan>2001-11-30 00:04:38 +0000
committerivan <ivan>2001-11-30 00:04:38 +0000
commit5c0eff524454c3e66a0fbe90250884d0a7578284 (patch)
treebd28fc1b4e0fcb0b23714a48d8b16b9ca1a1d859 /FS/FS/svc_Common.pm
parent09655ec6f1761d464a928f6aab88bb936999df25 (diff)
more link methods
Diffstat (limited to 'FS/FS/svc_Common.pm')
-rw-r--r--FS/FS/svc_Common.pm18
1 files changed, 15 insertions, 3 deletions
diff --git a/FS/FS/svc_Common.pm b/FS/FS/svc_Common.pm
index 7e21646..042c243 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