X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_svc.pm;h=552019acbf68f4b7abcc386e0c605ed8fa3b6233;hb=30e6bde6388096a66d12c8b19b6e9b2cdef35e6e;hp=7ef996f5f641de2ff1f647872815b7c29b0209ea;hpb=db81095a56b1e4504199c1983917a2e7a5e42a14;p=freeside.git diff --git a/FS/FS/part_svc.pm b/FS/FS/part_svc.pm index 7ef996f5f..552019acb 100644 --- a/FS/FS/part_svc.pm +++ b/FS/FS/part_svc.pm @@ -5,6 +5,7 @@ use vars qw( @ISA ); use FS::Record qw( qsearch qsearchs fields dbh ); use FS::part_svc_column; use FS::part_export; +use FS::export_svc; @ISA = qw(FS::Record); @@ -310,22 +311,23 @@ sub all_part_svc_column { qsearch('part_svc_column', { 'svcpart' => $self->svcpart } ); } -=item part_export +=item part_export [ EXPORTTYPE ] + +Returns all exports (see L) for this service, or, if an +export type is specified, only returns exports of the given type. =cut sub part_export { my $self = shift; - my %search = ( 'svcpart' => $self->svcpart ); - qsearch('part_export', \%search); + my %search; + $search{'exporttype'} = shift if @_; + map { qsearchs('part_export', { 'exportnum' => $_->exportnum, %search } ) } + qsearch('export_svc', { 'svcpart' => $self->svcpart } ); } =back -=head1 VERSION - -$Id: part_svc.pm,v 1.12 2002-03-26 13:58:29 ivan Exp $ - =head1 BUGS Delete is unimplemented. @@ -333,6 +335,8 @@ Delete is unimplemented. The list of svc_* tables is hardcoded. When svc_acct_pop is renamed, this should be fixed. +all_part_svc_column method should be documented + =head1 SEE ALSO L, L, L, L,