Added inspection lot number in query of gr master validation logic #933

Merged
jothi merged 1 commits from ranjith-dev into master 2026-08-24 11:15:37 +00:00

View File

@@ -594,7 +594,7 @@ class PanelBoxValidationResource extends Resource
return;
}
$existInMaster = PanelGrMaster::where('document_number', $pOrder)->where('item_id', $iId->id)->where('plant_id', $plantId)->first();
$existInMaster = PanelGrMaster::where('document_number', $pOrder)->where('inspection_lot_number', $inspecLotNo)->where('item_id', $iId->id)->where('plant_id', $plantId)->first();
if(!$existInMaster){
Notification::make()
@@ -662,7 +662,7 @@ class PanelBoxValidationResource extends Resource
$set('item_id', null);
}
$existQuanInPanel = PanelBoxValidation::where('plant_id', $plantId)->where('production_order', $pOrder)->where('sticker_master_id', $sticker->id)->count();
$existQuanInPanel = PanelBoxValidation::where('plant_id', $plantId)->where('production_order', $pOrder)->where('inspection_lot_number', $inspecLotNo)->where('sticker_master_id', $sticker->id)->count();
if ($existQuanInPanel >= (int) $existInMaster->quantity) {
Notification::make()