Merge pull request 'changed logic of total box count in wire master print' (#803) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 24s
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 24s
Reviewed-on: #803
This commit was merged in pull request #803.
This commit is contained in:
@@ -201,10 +201,20 @@ class PalletPrintController extends Controller
|
|||||||
// ->distinct('wire_packing_number')
|
// ->distinct('wire_packing_number')
|
||||||
// ->count('wire_packing_number');
|
// ->count('wire_packing_number');
|
||||||
|
|
||||||
|
// $totalBoxes = WireMasterPacking::where('plant_id', $plant)
|
||||||
|
// ->whereIn('customer_po_master_id', $customerPoIds)
|
||||||
|
// ->distinct('wire_packing_number')
|
||||||
|
// ->count('wire_packing_number');
|
||||||
|
|
||||||
$totalBoxes = WireMasterPacking::where('plant_id', $plant)
|
$totalBoxes = WireMasterPacking::where('plant_id', $plant)
|
||||||
->whereIn('customer_po_master_id', $customerPoIds)
|
->whereIn('customer_po_master_id', $customerPoIds)
|
||||||
->distinct('wire_packing_number')
|
->select('wire_packing_number')
|
||||||
->count('wire_packing_number');
|
->groupBy('wire_packing_number')
|
||||||
|
->havingRaw(
|
||||||
|
'COUNT(*) = COUNT(CASE WHEN wire_packing_status = ? THEN 1 END)',
|
||||||
|
['Completed']
|
||||||
|
)
|
||||||
|
->count();
|
||||||
|
|
||||||
// $completedPallets = WireMasterPacking::where('plant_id', $plant)
|
// $completedPallets = WireMasterPacking::where('plant_id', $plant)
|
||||||
// ->where('customer_po_master_id', $customerId)
|
// ->where('customer_po_master_id', $customerId)
|
||||||
|
|||||||
Reference in New Issue
Block a user