loaded pending pallet list against plant and customer po
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 19s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 20s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 16s
Laravel Pint / pint (pull_request) Successful in 2m38s
Laravel Larastan / larastan (pull_request) Failing after 5m8s
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 19s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 20s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 16s
Laravel Pint / pint (pull_request) Successful in 2m38s
Laravel Larastan / larastan (pull_request) Failing after 5m8s
This commit is contained in:
@@ -169,13 +169,19 @@ class WireMasterPackingResource extends Resource
|
|||||||
->options(function ($get) {
|
->options(function ($get) {
|
||||||
|
|
||||||
$plantId = $get('plant_id');
|
$plantId = $get('plant_id');
|
||||||
|
$customerPo = $get('customer_po_master_id');
|
||||||
|
|
||||||
if (! $plantId) {
|
if (!$plantId || !$customerPo) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$customerPoIds = CustomerPoMaster::where('plant_id', $plantId)
|
||||||
|
->where('customer_po', $customerPo)
|
||||||
|
->pluck('id');
|
||||||
|
|
||||||
return WireMasterPacking::query()
|
return WireMasterPacking::query()
|
||||||
->where('plant_id', $plantId)
|
->where('plant_id', $plantId)
|
||||||
|
->whereIn('customer_po_master_id', $customerPoIds)
|
||||||
->where(function ($query) {
|
->where(function ($query) {
|
||||||
$query->whereNull('wire_packing_status')
|
$query->whereNull('wire_packing_status')
|
||||||
->orWhere('wire_packing_status', '');
|
->orWhere('wire_packing_status', '');
|
||||||
|
|||||||
Reference in New Issue
Block a user