{{ $settings->shop_name ?? 'POS LINK (PVT) LTD' }}

{{ $settings->shop_address ?? '123 Business Avenue, Sri Lanka' }}

Tel: {{ $settings->shop_phone ?? '+94 11 234 5678' }} | Email: {{ $settings->shop_email ?? 'admin@poslink.lk' }}

Sale Invoice

Invoice: {{ $sale->invoice_no }}

Customer Information
{{ $sale->customer->name ?? 'Walk-in Customer' }}
@if($sale->customer)
{{ $sale->customer->address ?? '' }}
@if($sale->customer->phone)
Phone: {{ $sale->customer->phone }}
@endif @if($sale->customer->email)
Email: {{ $sale->customer->email }}
@endif @endif
Order Info
Date: {{ date('Y-M-d', strtotime($sale->created_at)) }}
Warehouse: {{ $sale->warehouse->name ?? 'N/A' }}
Payment: @if($sale->payment_status == 2) Paid @elseif($sale->payment_status == 1) Partial @else Pending @endif
Method: {{ $sale->payment_type == 1 ? 'Cash' : 'Credit' }}
@foreach($sale->items as $index => $item) @endforeach
# Item & Variation Qty Price Disc. Total
{{ $index + 1 }}
{{ $item->product->name ?? 'N/A' }}
@if($item->variation)
Variation: {{ $item->variation->variationType->name ?? $item->variation->name }}
@endif
{{ number_format($item->qty, 0) }} {{ number_format($item->net_unit_price, 2) }} {{ number_format($item->discount_amount, 2) }} {{ number_format($item->total, 2) }}
@if($sale->order_discount > 0) @endif @if($sale->order_tax > 0) @endif @if($sale->shipping_cost > 0) @endif @if($sale->paid_amount > 0) @endif
Sub Total: Rs {{ number_format($sale->sub_total, 2) }}
Order Discount: - Rs {{ number_format($sale->order_discount_type == 'percent' ? ($sale->sub_total * $sale->order_discount / 100) : $sale->order_discount, 2) }}
Order Tax: Rs {{ number_format($sale->order_tax, 2) }}
Shipping: Rs {{ number_format($sale->shipping_cost, 2) }}
Grand Total: Rs {{ number_format($sale->grand_total, 2) }}
Paid Amount: Rs {{ number_format($sale->paid_amount, 2) }}
Balance: Rs {{ number_format($sale->paid_amount - $sale->grand_total, 2) }}
@if($total_outstanding > 0)
Total Outstanding Balance (All Invoices)
Rs {{ number_format($total_outstanding, 2) }}
This includes the due amount of the current invoice and all previous unpaid bills.
@endif @if($sale->notes)
Notes
{{ $sale->notes }}
@endif
Customer Signature
Issued By: {{ $sale->creator->name ?? 'System' }}