'uncancel_svcnum' => $svc_x->get('_h_svc_x')->svcnum,
};
$svc_x->pkgnum($self->pkgnum); # provisioning services on a canceled package, will be rolled back
- if ($opt{'no_test_reprovision'} or $svc_x->insert) {
+ my $insert_error;
+ unless ($opt{'no_test_reprovision'}) {
+ # avoid possibly fatal errors from missing linked records
+ eval { $insert_error = $svc_x->insert };
+ $insert_error ||= $@;
+ }
+ if ($opt{'no_test_reprovision'} or $insert_error) {
# avoid possibly fatal errors from missing linked records
eval { $out->{'label'} = $svc_x->label };
eval { $out->{'label'} = $svc_x->get('_h_svc_x')->label } unless defined($out->{'label'});
sub svc_domain {
my $self = shift;
local($FS::Record::qsearch_qualify_columns) = 0;
+ $_[0] ||= $self->history_date;
qsearchs( 'h_svc_domain',
{ 'svcnum' => $self->domsvc },
FS::h_svc_domain->sql_h_searchs(@_),
local($FS::Record::qsearch_qualify_columns) = 0;
+ $_[0] ||= $self->history_date;
my $h_svc_acct = qsearchs(
'h_svc_acct',
{ 'svcnum' => $self->srcsvc },
local($FS::Record::qsearch_qualify_columns) = 0;
+ $_[0] ||= $self->history_date;
my $h_svc_acct = qsearchs(
'h_svc_acct',
{ 'svcnum' => $self->dstsvc },
carp 'Called FS::h_svc_www->domain_record on svcnum ' . $self->svcnum if $DEBUG;
local($FS::Record::qsearch_qualify_columns) = 0;
+ $_[0] ||= $self->history_date;
my $domain_record = qsearchs(
'h_domain_record',
{ 'recnum' => $self->recnum },