X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fpart_svc.pm;h=cd0577407849c594fed14893606c1e84ad284c6c;hp=aacc3ab48c3f7d451a45b609eef44433cf5eea34;hb=5a588517044ae46cbfc4e544e9306f0aee8f34c3;hpb=8cf1905a8e2473e5e03f2fdf9cfb017b14bbd0de diff --git a/FS/FS/part_svc.pm b/FS/FS/part_svc.pm index aacc3ab48..cd0577407 100644 --- a/FS/FS/part_svc.pm +++ b/FS/FS/part_svc.pm @@ -6,6 +6,7 @@ use FS::Record qw( qsearch qsearchs fields dbh ); use FS::part_svc_column; use FS::part_export; use FS::export_svc; +use FS::cust_svc; @ISA = qw(FS::Record); @@ -301,6 +302,28 @@ sub part_export { qsearch('export_svc', { 'svcpart' => $self->svcpart } ); } +=item cust_svc + +Returns a list of associated FS::cust_svc records. + +=cut + +sub cust_svc { + my $self = shift; + qsearch('cust_svc', { 'svcpart' => $self->svcpart } ); +} + +=item svc_x + +Returns a list of associated FS::svc_* records. + +=cut + +sub svc_x { + my $self = shift; + map { $_->svc_x } $self->cust_svc; +} + =back =head1 BUGS