Added inspection lot number in query of gr master validation logic #933
@@ -594,7 +594,7 @@ class PanelBoxValidationResource extends Resource
|
|||||||
return;
|
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){
|
if(!$existInMaster){
|
||||||
Notification::make()
|
Notification::make()
|
||||||
@@ -662,7 +662,7 @@ class PanelBoxValidationResource extends Resource
|
|||||||
$set('item_id', null);
|
$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) {
|
if ($existQuanInPanel >= (int) $existInMaster->quantity) {
|
||||||
Notification::make()
|
Notification::make()
|
||||||
|
|||||||
Reference in New Issue
Block a user