Added string length check logic in panel box inspection #1039
@@ -310,6 +310,22 @@ class PanelBoxInspectionStock extends Page
|
||||
$itemCode = $panelBoxCode;
|
||||
$serialNumber = $panelBoxSerialNo;
|
||||
|
||||
if (strlen($serialNumber) > 28) {
|
||||
Notification::make()
|
||||
->title('Invalid Serial Number')
|
||||
->body("Serial number cannot be greater than 28 characters. Current length: " . strlen($panelBoxSerialNo))
|
||||
->danger()
|
||||
->send();
|
||||
|
||||
$this->form->fill([
|
||||
'plant_id' => $plantId,
|
||||
'line_id' => $lineId,
|
||||
'item_id' => null,
|
||||
]);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$iId = Item::where('code', $itemCode)->where('plant_id', $plantId)->first();
|
||||
|
||||
if(!$iId){
|
||||
|
||||
Reference in New Issue
Block a user