@include('docs._printhead', ['title'=>'SALES ORDER','no'=>$o->order_no,'date'=>'Date: '.fdate($o->order_date)])
@include('docs._fxprint', ['doc'=>$o, 'grand'=>$o->grand_total])
<div class="doc-meta"><div><b>Customer:</b><br><b>{{ $o->customer->name }}</b><br>{{ $o->customer->address }}<br>{{ $o->customer->phone }}</div>
<div><b>Deliver to:</b> {{ $o->delivery_address ?? '—' }}<br><b>Required:</b> {{ fdate($o->required_date) }}<br><b>Status:</b> {{ ucfirst($o->status) }}</div></div>
<div class="twrap"><table class="tbl"><thead><tr><th>#</th><th>Product</th><th class="r">Ordered (t)</th><th class="r">Dispatched</th><th class="r">Rate</th><th class="r">Amount</th></tr></thead>
<tbody>@foreach($o->lines as $i=>$l)<tr><td>{{ $i+1 }}</td><td>{{ $l->product->display_name ?? '' }}</td><td class="r">{{ qty($l->qty_ordered) }}</td><td class="r">{{ qty($l->qty_dispatched) }}</td><td class="r">{{ money($l->rate) }}</td><td class="r">{{ money($l->amount) }}</td></tr>@endforeach</tbody></table></div>
<div class="totals"><div><span>Subtotal</span><b>{{ money($o->subtotal) }}</b></div>
<div><span>Tax (VAT + levies)</span><span>{{ money($o->tax_amount) }}</span></div>
<div class="gt"><span>GRAND TOTAL</span><b>{{ fxmoney($o->grand_total, $o) }}</b></div></div>
@include('docs._printfoot', [])
