validasi tanggal
This commit is contained in:
@@ -106,7 +106,11 @@ class RequestLogService
|
||||
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 {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
@@ -138,6 +142,12 @@ class RequestLogService
|
||||
'member_id' => $row['member_id'],
|
||||
]), 0, null, $row);
|
||||
}
|
||||
|
||||
$dateSubmission = $this->dateParser($row['submission_date']);
|
||||
if (!$dateSubmission){
|
||||
throw new ImportRowException(__('Format Date Invalid'), 0, null, $row);
|
||||
}
|
||||
|
||||
// Membuat singkatan dari nama rumah sakit
|
||||
$singkatan = "";
|
||||
$words = explode(' ', $row['organization_id']);
|
||||
|
||||
Reference in New Issue
Block a user