From: ivan Date: Sat, 29 Mar 2003 02:19:44 +0000 (+0000) Subject: cust_svc and svc_x methods X-Git-Tag: freeside_1_5_0pre1~31 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=5ffebc5c151bd680cdae15e4720ba788ad51121b cust_svc and svc_x methods --- diff --git a/FS/FS/part_export.pm b/FS/FS/part_export.pm index b46d8439e..789e8450d 100644 --- a/FS/FS/part_export.pm +++ b/FS/FS/part_export.pm @@ -305,6 +305,30 @@ sub part_svc { #confess "FS::part_export::part_svc deprecated"; } +=item svc_x + +Returns a list of associate FS::svc_* records. + +=cut + +sub svc_x { + my $self = shift; + map { $_->svc_x } $self->cust_svc; +} + +=item cust_svc + +Returns a list of associated FS::cust_svc records. + +=cut + +sub cust_svc { + my $self = shift; + map { qsearch('cust_svc', { 'svcpart' => $_->svcpart } ) } + grep { qsearch('cust_svc', { 'svcpart' => $_->svcpart } ) } + $self->export_svc; +} + =item export_svc Returns a list of associated FS::export_svc records.