diff --git a/scitems.php b/scitems.php index 977498f..6434b68 100644 --- a/scitems.php +++ b/scitems.php @@ -64,9 +64,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { $uuid = $item['reference'] ?? ($item['stdItem']['UUID'] ?? ''); if (!$uuid) continue; - $name = $item['stdItem']['Name'] ?? ''; - $type = $item['type'] ?? ''; - $subtype = $item['subType'] ?? ''; + $name = $item['Name'] ?? ($item['stdItem']['Name'] ?? ''); + $classification = $item['classification'] ?? ''; $parts = explode('.', $classification); $type = $parts[1] ?? ($item['type'] ?? ''); + $subtype = $parts[2] ?? ($item['subType'] ?? ''); $stmt_check->execute(['uuid' => $uuid]); if ($stmt_check->fetch()) {