added validation for to show unique plant codes in error response in invoice out validation
This commit is contained in:
@@ -231,6 +231,7 @@ class InvoiceOutValidationResource extends Resource
|
||||
}
|
||||
|
||||
if (!empty($invalidPlantCode)) {
|
||||
$invalidPlantCode = array_unique($invalidPlantCode);
|
||||
Notification::make()
|
||||
->title('Invalid Plant Codes')
|
||||
->body('The following plant codes should contain minimum 4 digits:<br>' . implode(', ', $invalidPlantCode))
|
||||
@@ -242,6 +243,7 @@ class InvoiceOutValidationResource extends Resource
|
||||
return;
|
||||
}
|
||||
if (!empty($invalidPlaCoFound)) {
|
||||
$invalidPlaCoFound = array_unique($invalidPlaCoFound);
|
||||
Notification::make()
|
||||
->title('Invalid Plant Codes')
|
||||
->body('The following plant codes not found in plants:<br>' . implode(', ', $invalidPlaCoFound))
|
||||
@@ -253,6 +255,7 @@ class InvoiceOutValidationResource extends Resource
|
||||
return;
|
||||
}
|
||||
if (!empty($userNotFound)) {
|
||||
$userNotFound = array_unique($userNotFound);
|
||||
Notification::make()
|
||||
->title('Invalid User')
|
||||
->body('The following user not found:<br>' . implode(', ', $userNotFound))
|
||||
|
||||
Reference in New Issue
Block a user