Work Order Report

@foreach($woVouchers as $wo) @endforeach @foreach($doVouchers as $do) @endforeach @php $totalSO = $totalWO = $totalDO = $totalPendingWO = $totalPendingDO = 0; @endphp @foreach($reportData as $r) @php $totalSO += $r['so_qty']; $totalWO += $r['total_wo']; $totalDO += $r['total_do']; $totalPendingWO += $r['pending_wo']; $totalPendingDO += $r['pending_do']; $woClass = ($r['total_wo'] > $r['so_qty']) ? 'red-text' : ''; $doClass = ($r['total_do'] > $r['so_qty']) ? 'red-text' : ''; $pendingWOClass = ($r['pending_wo'] < 0) ? 'red-text' : ''; $pendingDOClass = ($r['pending_do'] < 0) ? 'red-text' : ''; @endphp {{-- WO Columns --}} @foreach($woVouchers as $wo) @endforeach {{-- DO Columns --}} @foreach($doVouchers as $do) @endforeach @endforeach {{-- Final Totals --}} @foreach($woVouchers as $wo) @endforeach @foreach($doVouchers as $do) @endforeach
Item Code Item Name SO Qty{{ $wo }} (WO Qty)Total WO Qty{{ $do }} (DO Qty)Total DO Qty Pending WO Pending DO
{{ $r['item_code'] }} {{ $r['item_name'] }} {{ number_format($r['so_qty'], 2) }}{{ number_format($r['wo_details'][$wo] ?? 0, 2) }}{{ number_format($r['total_wo'], 2) }}{{ number_format($r['do_details'][$do] ?? 0, 2) }}{{ number_format($r['total_do'], 2) }} {{ number_format($r['pending_wo'], 2) }} {{ number_format($r['pending_do'], 2) }}
Total {{ number_format($totalSO, 2) }}{{ number_format($totalWO, 2) }}{{ number_format($totalDO, 2) }} {{ number_format($totalPendingWO, 2) }} {{ number_format($totalPendingDO, 2) }}
{{-- Buttons --}}