<!doctype html><html><head><meta charset="utf-8"><style>@page{margin:30px}body{font-family:"DejaVu Sans",sans-serif;color:#152337;font-size:12px}.head{display:table;width:100%;border-bottom:2px solid #155eef;padding-bottom:15px}.left,.right{display:table-cell;width:50%;vertical-align:top}.right{text-align:right}.items{width:100%;border-collapse:collapse;margin-top:20px}.items th{background:#155eef;color:#fff;padding:8px;text-align:left}.items td{padding:8px;border-bottom:1px solid #ddd}.num{text-align:right}.totals{width:42%;margin-left:auto;margin-top:15px;border-collapse:collapse}.totals td{padding:6px;border-bottom:1px solid #ddd}.grand{font-size:15px;font-weight:bold}</style></head><body><div class="head"><div class="left"><strong style="font-size:16px">{{ $bill->company->legal_name }}</strong><br>{{ $bill->company->address }}<br>TRN: {{ $bill->company->trn }}</div><div class="right"><h1>VENDOR BILL</h1><strong>{{ $bill->bill_number }}</strong><br>Vendor Invoice: {{ $bill->vendor_invoice_number }}<br>Date: {{ $bill->invoice_date->format('d M Y') }}</div></div><p><strong>Vendor:</strong> {{ $bill->party->legal_name }}<br><strong>Vendor TRN:</strong> {{ $bill->party->trn ?: 'N/A' }}<br><strong>Due Date:</strong> {{ optional($bill->due_date)->format('d M Y') }}</p><table class="items"><thead><tr><th>#</th><th>Description</th><th class="num">Qty</th><th class="num">Rate</th><th class="num">Taxable</th><th class="num">Input VAT</th><th class="num">Total</th></tr></thead><tbody>@foreach($bill->items as $item)<tr><td>{{ $item->line_number }}</td><td>{{ $item->description }}</td><td class="num">{{ number_format((float)$item->quantity,2) }}</td><td class="num">{{ number_format((float)$item->unit_rate,2) }}</td><td class="num">{{ number_format((float)$item->taxable_amount,2) }}</td><td class="num">{{ number_format((float)$item->recoverable_vat_amount,2) }}</td><td class="num">{{ number_format((float)$item->line_total,2) }}</td></tr>@endforeach</tbody></table><table class="totals"><tr><td>Taxable</td><td class="num">{{ number_format((float)$bill->taxable_total,2) }}</td></tr><tr><td>Recoverable VAT</td><td class="num">{{ number_format((float)$bill->recoverable_vat_total,2) }}</td></tr><tr><td>Non-Recoverable VAT</td><td class="num">{{ number_format((float)$bill->nonrecoverable_vat_total,2) }}</td></tr><tr class="grand"><td>Total</td><td class="num">{{ $bill->currency_code }} {{ number_format((float)$bill->grand_total,2) }}</td></tr></table><p><strong>Notes:</strong> {{ $bill->notes }}</p></body></html>
