Merge remote-tracking branch 'origin/staging' into origin/production

This commit is contained in:
Linksehat Staging Server
2024-01-19 08:49:56 +07:00
2 changed files with 9 additions and 3 deletions

View File

@@ -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();

View File

@@ -341,11 +341,14 @@ class MemberEnrollmentService
if ($date_from_row instanceof DateTime) {
return $date_from_row->format('Y-m-d');
} else if ($date_from_row != null) {
return date('Y-m-d', strtotime($date_from_row));
if (strtotime($date_from_row)){
return date('Y-m-d', strtotime($date_from_row));
} else {
throw new ImportRowException(__('Format Date Invalid'), 0, null, $row);
}
} else {
return null;
throw new ImportRowException(__('Format Date Invalid'), 0, null, $row);
}
}
public function validateDate($dateString, $dateFormat = 'Ymd'){