From b79a33b9dc33646b2c8bde450361463373d1acc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CVeLiTi=E2=80=9D?= <“info@veliti.nl”> Date: Wed, 3 Apr 2024 11:27:09 +0200 Subject: [PATCH] CIM61 - Allow productrowid to be sent via API --- api/v0/post/application.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/v0/post/application.php b/api/v0/post/application.php index fd1a9e0..6052da7 100644 --- a/api/v0/post/application.php +++ b/api/v0/post/application.php @@ -63,7 +63,7 @@ if (!empty($post_content['sn']) && !empty($post_content['testdetails'])) { $input_type = $post_content['type']; $testdetails = json_encode($post_content['testdetails']); $serial = $post_content['sn']; - $productrowid = 0; //default product for equipment create + $productrowid = (isset($post_content['testdetails']['logdetails']['PN']) && (!empty($post_content['testdetails']['logdetails']['PN']) || $post_content['testdetails']['logdetails']['PN'] != ''))? $post_content['testdetails']['logdetails']['PN'] : 0; //default product for equipment create $sn_service = $post_content['testdetails']['external_device_sn'] ?? ''; // +++++++++++++++++++++++++++++++++++++++++++++++++++++++