Updated validation on import rework data
This commit is contained in:
@@ -213,8 +213,6 @@ class ReworkLocatorInvoiceValidationImporter extends Importer
|
|||||||
$warnMsg[] = "Invalid 'Scanned DateTime' format. Expected DD-MM-YYYY HH:MM:SS";
|
$warnMsg[] = "Invalid 'Scanned DateTime' format. Expected DD-MM-YYYY HH:MM:SS";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Str::length($updatedAt) > 0)
|
|
||||||
{
|
|
||||||
foreach ($formats as $format) {
|
foreach ($formats as $format) {
|
||||||
try {
|
try {
|
||||||
$uDateTime = Carbon::createFromFormat($format, $updatedAt);
|
$uDateTime = Carbon::createFromFormat($format, $updatedAt);
|
||||||
@@ -236,7 +234,6 @@ class ReworkLocatorInvoiceValidationImporter extends Importer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($formats as $format) {
|
foreach ($formats as $format) {
|
||||||
try {
|
try {
|
||||||
@@ -280,9 +277,9 @@ class ReworkLocatorInvoiceValidationImporter extends Importer
|
|||||||
'scanned_status' => $scannedStat,
|
'scanned_status' => $scannedStat,
|
||||||
'upload_status' => $uploadStat,
|
'upload_status' => $uploadStat,
|
||||||
'created_at' => $cDateTime->format('Y-m-d H:i:s'),
|
'created_at' => $cDateTime->format('Y-m-d H:i:s'),
|
||||||
'scanned_at' => (Str::length($scannedAt) > 0) ? $sDateTime->format('Y-m-d H:i:s') : null,
|
'scanned_at' => $sDateTime->format('Y-m-d H:i:s'),
|
||||||
'updated_at' => (Str::length($updatedAt) > 0) ? $uDateTime->format('Y-m-d H:i:s') : null,
|
'updated_at' => $uDateTime->format('Y-m-d H:i:s'),
|
||||||
'reworked_at' => (Str::length($reworkedAt) > 0) ? $rDateTime->format('Y-m-d H:i:s') : null,
|
'reworked_at' => $rDateTime->format('Y-m-d H:i:s'),
|
||||||
'created_by' => $createdBy,
|
'created_by' => $createdBy,
|
||||||
'scanned_by' => $scannedBy,
|
'scanned_by' => $scannedBy,
|
||||||
'updated_by' => $updatedBy,
|
'updated_by' => $updatedBy,
|
||||||
|
|||||||
Reference in New Issue
Block a user