use strict;
use vars qw( @ISA $DEBUG );
use FS::Record qw( qsearch qsearchs fields dbh );
+use FS::Schema qw( dbdef );
use FS::part_svc_column;
use FS::part_export;
use FS::export_svc;
=item part_export [ EXPORTTYPE ]
-Returns all exports (see L<FS::part_export>) for this service, or, if an
-export type is specified, only returns exports of the given type.
+Returns a list of all exports (see L<FS::part_export>) for this service, or,
+if an export type is specified, only returns exports of the given type.
=cut
qsearch('export_svc', { 'svcpart' => $self->svcpart } );
}
+=item part_export_usage
+
+Returns a list of any exports (see L<FS::part_export>) for this service that
+are capable of reporting usage information.
+
+=cut
+
+sub part_export_usage {
+ my $self = shift;
+ grep $_->can('usage_sessions'), $self->part_export;
+}
+
=item cust_svc
Returns a list of associated FS::cust_svc records.
my @fields = fields($svcdb);
push @fields, 'usergroup' if $svcdb eq 'svc_acct'; #kludge
map { ( $svcdb.'__'.$_, $svcdb.'__'.$_.'_flag' ) } @fields;
- } grep defined( $FS::Record::dbdef->table($_) ),
+ } grep defined( dbdef->table($_) ),
qw( svc_acct svc_domain svc_forward svc_www svc_broadband )
)
} );