use strict;
use vars qw( @ISA $noexport_hack $DEBUG $me );
use Carp qw( cluck carp croak ); #specify cluck have to specify them all..
use strict;
use vars qw( @ISA $noexport_hack $DEBUG $me );
use Carp qw( cluck carp croak ); #specify cluck have to specify them all..
=cut
sub search_sql_field {
my( $class, $field, $string ) = @_;
my $table = $class->table;
my $q_string = dbh->quote($string);
=cut
sub search_sql_field {
my( $class, $field, $string ) = @_;
my $table = $class->table;
my $q_string = dbh->quote($string);
my $objects = $options{'child_objects'} || [];
my $depend_jobnums = $options{'depend_jobnum'} || [];
$depend_jobnums = [ $depend_jobnums ] unless ref($depend_jobnums);
my $objects = $options{'child_objects'} || [];
my $depend_jobnums = $options{'depend_jobnum'} || [];
$depend_jobnums = [ $depend_jobnums ] unless ref($depend_jobnums);
my $svcnum = $self->svcnum;
my $cust_svc = $svcnum ? qsearchs('cust_svc',{'svcnum'=>$self->svcnum}) : '';
#unless ( $svcnum ) {
my $svcnum = $self->svcnum;
my $cust_svc = $svcnum ? qsearchs('cust_svc',{'svcnum'=>$self->svcnum}) : '';
#unless ( $svcnum ) {
'pkgnum' => $self->pkgnum,
'svcpart' => $self->svcpart,
} );
'pkgnum' => $self->pkgnum,
'svcpart' => $self->svcpart,
} );
- $error = $self->set_auto_inventory;
- if ( $error ) {
- $dbh->rollback if $oldAutoCommit;
- return $error;
- }
-
- $error = $self->SUPER::insert;
+ my $error = $self->set_auto_inventory
+ || $self->check
+ || $self->SUPER::insert;
#not quite false laziness, but same pattern as FS::svc_acct::replace and
#FS::part_export::sqlradius::_export_replace. List::Compare or something
#not quite false laziness, but same pattern as FS::svc_acct::replace and
#FS::part_export::sqlradius::_export_replace. List::Compare or something
=item export HOOK [ EXPORT_ARGS ]
Runs the provided export hook (i.e. "suspend", "unsuspend") for this service.
=item export HOOK [ EXPORT_ARGS ]
Runs the provided export hook (i.e. "suspend", "unsuspend") for this service.