From a0fe7505ec0df116ab1570ecd41e00354c4e6c6d Mon Sep 17 00:00:00 2001 From: mikael-zakaria Date: Mon, 20 Jan 2025 10:57:53 +0700 Subject: [PATCH] Perbaikan perbaikan null print result dan Create order sesuaikan berdasarkan lokasi user pada bagian Visir# dan Location --- app/Controllers/PrintResult.php | 7 +++++-- app/Views/orders_edit.php | 19 ++++++++++++++++--- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/app/Controllers/PrintResult.php b/app/Controllers/PrintResult.php index 46015a2..6e2675a 100644 --- a/app/Controllers/PrintResult.php +++ b/app/Controllers/PrintResult.php @@ -19,7 +19,10 @@ class PrintResult extends BaseController { $signature = ""; // Digunakan untuk mengetahui user yang melakukan Validasi khusus analis surabaya - $uservalidator = $resultData[0]['validator']; + foreach($resultData as $result) { + $uservalidator = $result['validator']; + break; + } if ($uservalidator == "MG") { $analyst = "Mrs. Mega Rahayu Ningsih"; } else if ($uservalidator == "ACP") { @@ -33,7 +36,7 @@ class PrintResult extends BaseController { $noreg = " "; } - if($data[0] != null) { + if ($data[0] != null) { $accessnumber = $data[0]['SP_ACCESSNUMBER']; diff --git a/app/Views/orders_edit.php b/app/Views/orders_edit.php index 560a893..de99cb8 100644 --- a/app/Views/orders_edit.php +++ b/app/Views/orders_edit.php @@ -4,6 +4,20 @@ get('usercityid'); +if ($usercityid == 1) { + $placeholdervisitnumber = "placeholder='BV........'"; + $locationdropdown = " + + + "; +} else if ($usercityid == 2){ + $placeholdervisitnumber = "placeholder='SV........'"; + $locationdropdown = " + + + "; +} ?>