Commented batch id mismatch warning validation
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
This commit is contained in:
@@ -728,6 +728,7 @@ class ProcessOrderResource extends Resource
|
|||||||
if ($uploaded instanceof TemporaryUploadedFile) {
|
if ($uploaded instanceof TemporaryUploadedFile) {
|
||||||
$originalName = $uploaded->getClientOriginalName();
|
$originalName = $uploaded->getClientOriginalName();
|
||||||
$path = 'uploads/ProcessOrder/'.$originalName;
|
$path = 'uploads/ProcessOrder/'.$originalName;
|
||||||
|
$processOrder = trim($get('process_order'));
|
||||||
|
|
||||||
// Check if file already exists
|
// Check if file already exists
|
||||||
if (Storage::disk('local')->exists($path)) {
|
if (Storage::disk('local')->exists($path)) {
|
||||||
@@ -765,34 +766,34 @@ class ProcessOrderResource extends Resource
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get the value of process_order field
|
// Get the value of process_order field
|
||||||
$processOrder = trim($get('process_order'));
|
|
||||||
|
|
||||||
if ($batchId != $processOrder) {
|
|
||||||
Notification::make()
|
|
||||||
->title('Mismatch')
|
|
||||||
->body("Batch ID ($batchId) does not match Process Order ($processOrder)")
|
|
||||||
->danger()
|
|
||||||
->send();
|
|
||||||
|
|
||||||
return;
|
// if ($batchId != $processOrder) {
|
||||||
}
|
// Notification::make()
|
||||||
|
// ->title('Mismatch')
|
||||||
|
// ->body("Batch ID ($batchId) does not match Process Order ($processOrder)")
|
||||||
|
// ->danger()
|
||||||
|
// ->send();
|
||||||
|
|
||||||
if ($batchId == $processOrder) {
|
// return;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ($batchId == $processOrder) {
|
||||||
// If batch matches, store the PDF permanently
|
// If batch matches, store the PDF permanently
|
||||||
$storedPath = $uploaded->storeAs(
|
$storedPath = $uploaded->storeAs(
|
||||||
'uploads/ProcessOrder',
|
'uploads/ProcessOrder',
|
||||||
$originalName,
|
$processOrder,
|
||||||
'local'
|
'local'
|
||||||
);
|
);
|
||||||
|
|
||||||
Notification::make()
|
Notification::make()
|
||||||
->title('Success')
|
->title('Success')
|
||||||
->body("Batch ID matches Process Order: $batchId. PDF uploaded successfully.")
|
->body("Process Order: $processOrder. PDF uploaded successfully.")
|
||||||
->success()
|
->success()
|
||||||
->send();
|
->send();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Notification::make()
|
Notification::make()
|
||||||
|
|||||||
Reference in New Issue
Block a user