From 42e926f9c2bfbbb20976dfe31581f7fe5bffa41f Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Tue, 7 Jul 2026 12:39:29 +0530 Subject: [PATCH] loaded pending pallet list against plant and customer po --- app/Filament/Resources/WireMasterPackingResource.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/Filament/Resources/WireMasterPackingResource.php b/app/Filament/Resources/WireMasterPackingResource.php index c9a8d30..d10cdf3 100644 --- a/app/Filament/Resources/WireMasterPackingResource.php +++ b/app/Filament/Resources/WireMasterPackingResource.php @@ -169,13 +169,19 @@ class WireMasterPackingResource extends Resource ->options(function ($get) { $plantId = $get('plant_id'); + $customerPo = $get('customer_po_master_id'); - if (! $plantId) { + if (!$plantId || !$customerPo) { return []; } + $customerPoIds = CustomerPoMaster::where('plant_id', $plantId) + ->where('customer_po', $customerPo) + ->pluck('id'); + return WireMasterPacking::query() ->where('plant_id', $plantId) + ->whereIn('customer_po_master_id', $customerPoIds) ->where(function ($query) { $query->whereNull('wire_packing_status') ->orWhere('wire_packing_status', '');