Fix supplier display by disabling graphs
Fix supplier display by disabling graphs

--- a/admin/linkAmendments.php
+++ b/admin/linkAmendments.php
@@ -1,6 +1,9 @@
 <?php
 include_once ("../lib/common.inc.php");
 $query = 'update contractnotice set "parentCN" = null where "parentCN" = \'0\'';
+$query = $conn->prepare($query);
+	$query->execute();
+        $query = 'update contractnotice set "supplierABN" = null where "supplierABN" = \'0\'';
 $query = $conn->prepare($query);
 	$query->execute();
 $query = 'SELECT c."CNID",c."parentCN",p."childCN" FROM contractnotice as c  LEFT OUTER JOIN contractnotice as p on c."parentCN" = p."CNID"

--- a/displaySupplier.php
+++ b/displaySupplier.php
@@ -5,9 +5,9 @@
 
     include_header("Supplier");
     $supplierS = htmlentities(strip_tags($_REQUEST['supplier']));
-    MethodCountGraph($supplierS);
-    CnCGraph($supplierS);
-    MethodValueGraph($supplierS);
+   // MethodCountGraph($supplierS);
+  //  CnCGraph($supplierS);
+   // MethodValueGraph($supplierS);
     /* lobbyist ties
 
       links to ABR/ASIC/Google News/ASX/Court records
@@ -27,12 +27,16 @@
     echo $query;
     $query = $conn->prepare($query);
 
-//$query->bindParam(":supplierName", $supplierName);
+
+  if ($supplierParts[0] > 0) {
     $query->bindParam(":supplierABN", $supplierABN);
+  } else {
+      $query->bindParam(":supplierName", $supplierName);
+  }
     $query->execute();
     databaseError($conn->errorInfo());
-    echo '<img src="graphs/displayMethodCountGraph.php?month=' . stripslashes($supplier) . '">';
-    echo '<img src="graphs/displayCnCGraph.php?month=' . stripslashes($supplier) . '">';
+   // echo '<img src="graphs/displayMethodCountGraph.php?month=' . stripslashes($supplier) . '">';
+   // echo '<img src="graphs/displayCnCGraph.php?month=' . stripslashes($supplier) . '">';
 
     echo "<table>  <thead>
     <tr>