summaryrefslogtreecommitdiff
path: root/FS/FS/svc_Common.pm
diff options
context:
space:
mode:
authorivan <ivan>2002-03-18 16:05:35 +0000
committerivan <ivan>2002-03-18 16:05:35 +0000
commitdd12d8bcbb33acb0ffa087a70c566e8328fbe9c3 (patch)
tree0d825809628e4a6dbe38759bee8c96ed553f4398 /FS/FS/svc_Common.pm
parent14d6b3092a296ada5a0252752fd15a0087c63374 (diff)
handle inserting cust_svc and svc_acct records separately also, to handle
imports preserving svcnum
Diffstat (limited to 'FS/FS/svc_Common.pm')
-rw-r--r--FS/FS/svc_Common.pm10
1 files changed, 9 insertions, 1 deletions
diff --git a/FS/FS/svc_Common.pm b/FS/FS/svc_Common.pm
index 042c243fd..ee190fb8d 100644
--- a/FS/FS/svc_Common.pm
+++ b/FS/FS/svc_Common.pm
@@ -69,6 +69,14 @@ sub insert {
return $error;
}
$svcnum = $self->svcnum($cust_svc->svcnum);
+ } else {
+ $cust_svc = qsearchs('cust_svc',{'svcnum'=>$self->svcnum});
+ unless ( $cust_svc ) {
+ $dbh->rollback if $oldAutoCommit;
+ return "no cust_svc record found for svcnum ". $self->svcnum;
+ }
+ $self->pkgnum($cust_svc->pkgnum);
+ $self->svcpart($cust_svc->svcpart);
}
$error = $self->SUPER::insert;
@@ -207,7 +215,7 @@ sub cancel { ''; }
=head1 VERSION
-$Id: svc_Common.pm,v 1.7 2001-11-30 00:04:38 ivan Exp $
+$Id: svc_Common.pm,v 1.8 2002-03-18 16:05:35 ivan Exp $
=head1 BUGS