CHange CNID to text
[contractdashboard.git] / admin / import.php
blob:a/admin/import.php -> blob:b/admin/import.php
--- a/admin/import.php
+++ b/admin/import.php
@@ -133,8 +133,6 @@
 					if (in_array(($datamapping0711[$headers[$c]]) , $contractNoticeFields)) {
 						if (($datamapping0711[$headers[$c]]) == "parentCN" || ($datamapping0711[$headers[$c]]) == "CNID") {
 							$data[$c] = substr($data[$c], 2); // take off the "CN" prefix
-							$data[$c] = str_replace("-A", "00", $data[$c]); // make amendments really big numbers
-							if (!is_numeric($data[$c]) && $data[$c] != "") die($data[$c] . " is not numeric");
 							if ($data[$c] > 0) {
 								$contractNoticeInsert[] = $data[$c];
 							}
@@ -231,6 +229,15 @@
 		$row++;
 	}
 	fclose($handle);
+        // run post import data processing
+// cn
+echo "link amend<br>";
+include ("linkAmendments.php");
+echo "update UNSPSC<br>";
+include ("updateUNSPSC.php");
+// agency
+//include ("setAgencyStatus.php");
+//include ("setAgencyURLABN.php");
 	return $success;
 }
 $path = 'data/';
@@ -259,12 +266,6 @@
 	echo "<br> $success records successfully created";
 	flush();
 }
-// run post import data processing
-// cn
-include ("linkAmendments.php");
-include ("updateUNSPSC.php");
-// agency
-//include ("setAgencyStatus.php");
-//include ("setAgencyURLABN.php");
+
 ?>