From 8ac9bc78a7c0104813c69c88d6c107042b1930f5 Mon Sep 17 00:00:00 2001 From: Tb Fajri Date: Thu, 18 Jan 2024 11:24:25 +0700 Subject: [PATCH] update discharge date --- Modules/Internal/Http/Controllers/Api/RequestLogController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Modules/Internal/Http/Controllers/Api/RequestLogController.php b/Modules/Internal/Http/Controllers/Api/RequestLogController.php index d2a282c8..9f13e3e6 100644 --- a/Modules/Internal/Http/Controllers/Api/RequestLogController.php +++ b/Modules/Internal/Http/Controllers/Api/RequestLogController.php @@ -342,6 +342,9 @@ class RequestLogController extends Controller $requestLog->status_final_log = $status; $requestLog->approved_final_log_by = auth()->user()->id; $requestLog->approved_final_log_at = Carbon::now(); + if($requestLog->service_code != 'IP'){ + $requestLog->discharge_date = Carbon::now(); + } $requestLog->save();