freeside/bin artera.import,1.1,1.2

ivan ivan at pouncequick.420.am
Wed Oct 20 01:14:13 PDT 2004


Update of /home/cvs/cvsroot/freeside/bin
In directory pouncequick:/tmp/cvs-serv20118

Modified Files:
	artera.import 
Log Message:
adding artera import

Index: artera.import
===================================================================
RCS file: /home/cvs/cvsroot/freeside/bin/artera.import,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- artera.import	20 Oct 2004 08:08:41 -0000	1.1
+++ artera.import	20 Oct 2004 08:14:11 -0000	1.2
@@ -47,6 +47,9 @@
   #  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 : '' ),
@@ -55,6 +58,10 @@
   };
   #my $error = $svc_external->check;
   my $error = $svc_external->insert;
+  if ( $cust_svc && $error =~ /^Already/ ) {
+    $svc_external->pkgnum('');
+    $error = $svc_external->insert;
+  }
   die $error if $error;
 
   $num++;




More information about the freeside-commits mailing list