X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fpart_device.pm;h=49635841e453fbcfc64237621697821e314b4a63;hp=79a534ae7a5bc0dbf1e6840521040417a331d68a;hb=d0221fabd4656b3a04251ca6168cc45f54d23574;hpb=942c8b05b17b119a3dad84d7035c76b481dc5b99 diff --git a/FS/FS/part_device.pm b/FS/FS/part_device.pm index 79a534ae7..49635841e 100644 --- a/FS/FS/part_device.pm +++ b/FS/FS/part_device.pm @@ -1,8 +1,10 @@ package FS::part_device; use strict; -use base qw( FS::Record ); -use FS::Record; # qw( qsearch qsearchs ); +use base qw( FS::Record FS::m2m_Common ); +use FS::Record qw( qsearch qsearchs ); +use FS::part_export; +use FS::export_device; =head1 NAME @@ -107,6 +109,18 @@ sub check { $self->SUPER::check; } +=item part_export + +Returns a list of all exports (see L) for this device. + +=cut + +sub part_export { + my $self = shift; + map { qsearchs( 'part_export', { 'exportnum' => $_->exportnum } ) } + qsearch( 'export_device', { 'devicepart' => $self->devicepart } ); +} + sub process_batch_import { my $job = shift;