@include('docs._printhead', ['title'=>'MAINTENANCE WORK ORDER','no'=>$w->wo_no,'date'=>'Reported: '.fdate($w->reported_date).' · Priority: '.ucfirst($w->priority)])
<div class="doc-meta"><div><b>Equipment:</b> {{ $w->equipment->display_name }}<br><b>Reg:</b> {{ $w->equipment->registration_no ?? '—' }}<br><b>Type:</b> {{ $w->maintenance_type }}</div>
<div><b>Reported by:</b> {{ $w->reported_by }}<br><b>Technician:</b> {{ $w->assigned_technician ?? '—' }}<br><b>Status:</b> {{ ucfirst($w->status) }}</div></div>
<p><b>Problem:</b> {{ $w->problem_description }}</p>
<p><b>Work done:</b> {{ $w->work_done ?? '—' }}</p>
<div class="twrap"><table class="tbl"><thead><tr><th>#</th><th>Part</th><th class="r">Qty</th><th class="r">Rate</th><th class="r">Amount</th></tr></thead>
<tbody>@foreach($w->parts as $i=>$p)<tr><td>{{ $i+1 }}</td><td>{{ $p->item->display_name ?? '' }}</td><td class="r">{{ qty($p->qty) }}</td><td class="r">{{ money($p->rate) }}</td><td class="r">{{ money($p->amount) }}</td></tr>@endforeach</tbody></table></div>
<div class="totals"><div><span>Parts</span><span>{{ money($w->parts_cost) }}</span></div><div><span>Labour</span><span>{{ money($w->labour_cost) }}</span></div>
<div class="gt"><span>TOTAL</span><b>{{ cmoney($w->total_cost) }}</b></div></div>
@include('docs._printfoot', [])
