diff --git a/app/Filament/Resources/PanelBoxValidationResource.php b/app/Filament/Resources/PanelBoxValidationResource.php index d3be53ba..a0cb6340 100644 --- a/app/Filament/Resources/PanelBoxValidationResource.php +++ b/app/Filament/Resources/PanelBoxValidationResource.php @@ -441,18 +441,6 @@ class PanelBoxValidationResource extends Resource } } else{ - // $existInMasterProdOrder = ProductionOrder::where('production_order', $pOrder)->where('plant_id', $plantId)->first(); - - // if(!$existInMasterProdOrder && !$existInMasterPo){ - // Notification::make() - // ->title('Production Order Not Found') - // ->body("Production Order (Or) Doc No'{$pOrder}' not found against plant code '{$plaCode}' in both production order and Panel Gr master.") - // ->danger() - // ->send(); - // $set('item_id', null); - // $set('serial_exists', false); - // return; - // } $itemCode = $iCode; @@ -645,6 +633,8 @@ class PanelBoxValidationResource extends Resource return; } + $pOrder = $get('production_order'); + $supplier = $parts[0]; $panelBoxCode = $parts[1]; $panelBoxSerialNo = implode('/', array_slice($parts, 2)); @@ -669,17 +659,6 @@ class PanelBoxValidationResource extends Resource $existInMasterPo = PanelGrMaster::where('document_number', $pOrder)->where('plant_id', $plantId)->first(); - // if(!$existInMasterPo){ - // Notification::make() - // ->title('Panel GR Record') - // ->body("Production Order (Or) Doc No'{$pOrder}' not found against plant code '{$plaCode}' in Panel Gr master.") - // ->danger() - // ->send(); - // $set('item_id', null); - // $set('serial_exists', false); - // return; - // } - if($existInMasterPo){ $iId = Item::where('code', $itemCode)->where('plant_id', $plantId)->first();