Added serila number length check validation in panel box validation page #1040
@@ -38,7 +38,7 @@ class PanelBoxValidationResource extends Resource
|
|||||||
{
|
{
|
||||||
protected static ?string $model = PanelBoxValidation::class;
|
protected static ?string $model = PanelBoxValidation::class;
|
||||||
|
|
||||||
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
|
protected static ?string $navigationIcon = 'heroicon-o-clipboard-document-check';
|
||||||
|
|
||||||
protected static ?string $navigationGroup = 'Panel Box';
|
protected static ?string $navigationGroup = 'Panel Box';
|
||||||
|
|
||||||
@@ -581,6 +581,19 @@ class PanelBoxValidationResource extends Resource
|
|||||||
$itemCode = $panelBoxCode;
|
$itemCode = $panelBoxCode;
|
||||||
$serialNumber = $panelBoxSerialNo;
|
$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();
|
||||||
|
|
||||||
|
$set('item_id', null);
|
||||||
|
$set('serial_exists', false);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$existInMasterPo = PanelGrMaster::where('document_number', $pOrder)->where('plant_id', $plantId)->first();
|
$existInMasterPo = PanelGrMaster::where('document_number', $pOrder)->where('plant_id', $plantId)->first();
|
||||||
|
|
||||||
if(!$existInMasterPo){
|
if(!$existInMasterPo){
|
||||||
|
|||||||
Reference in New Issue
Block a user