projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git]
/
bin
/
artera.import
diff --git
a/bin/artera.import
b/bin/artera.import
index
f7def1b
..
716ddda
100644
(file)
--- a/
bin/artera.import
+++ b/
bin/artera.import
@@
-47,6
+47,9
@@
while (<>) {
# warn "can't find domain $domain\n";
}
# warn "can't find domain $domain\n";
}
+ my $exist = qsearchs('svc_external', { 'id' => $serial } );
+ next if $exist;
+
my $svc_external = new FS::svc_external {
'svcpart' => $svcpart,
'pkgnum' => ( $cust_svc ? $cust_svc->pkgnum : '' ),
my $svc_external = new FS::svc_external {
'svcpart' => $svcpart,
'pkgnum' => ( $cust_svc ? $cust_svc->pkgnum : '' ),
@@
-55,7
+58,12
@@
while (<>) {
};
#my $error = $svc_external->check;
my $error = $svc_external->insert;
};
#my $error = $svc_external->check;
my $error = $svc_external->insert;
- die $error if $error;
+ if ( $cust_svc && $error =~ /^Already/ ) {
+ warn $error;
+ $svc_external->pkgnum('');
+ $error = $svc_external->insert;
+ }
+ warn $error if $error;
$num++;
$linked++ if $cust_svc;
$num++;
$linked++ if $cust_svc;