validasi tanggal
This commit is contained in:
@@ -106,7 +106,11 @@ class RequestLogService
|
|||||||
if ($date_from_row instanceof DateTime) {
|
if ($date_from_row instanceof DateTime) {
|
||||||
return $date_from_row->format('Y-m-d');
|
return $date_from_row->format('Y-m-d');
|
||||||
} else if ($date_from_row != null) {
|
} 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 {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -138,6 +142,12 @@ class RequestLogService
|
|||||||
'member_id' => $row['member_id'],
|
'member_id' => $row['member_id'],
|
||||||
]), 0, null, $row);
|
]), 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
|
// Membuat singkatan dari nama rumah sakit
|
||||||
$singkatan = "";
|
$singkatan = "";
|
||||||
$words = explode(' ', $row['organization_id']);
|
$words = explode(' ', $row['organization_id']);
|
||||||
|
|||||||
Reference in New Issue
Block a user