{{ $company['name'] ?? 'YOUR COMPANY NAME' }}
{{ $company['address'] ?? '' }}
@if(!empty($company['phone'])) Tel: {{ $company['phone'] ?? '' }}{{ !empty($company['secondary_phone']) ? ' / ' . $company['secondary_phone'] : '' }} @endif @if(!empty($company['email'])) | Email: {{ $company['email'] }} @endif
SALES RECEIPT
Receipt #: {{ $sale['receipt_number'] ?? 'SR-001' }}
Store: {{ $store['name'] ?? 'Admin' }} Date: {{ $sale['date'] ?? now()->format('d/m/Y H:i') }}
@if(!empty($customer['name'])) Customer: {{ $customer['name'] }} @endif Cashier: {{ $sale['cashier'] ?? 'Admin' }}
{{-- ✅ Added --}} @foreach($items as $item) @endforeach
ITEM QTY UOMAMOUNT
{{ $item['name'] }}
@ {{ number_format($item['price'], 2) }} @if(!empty($item['discount'])) | Disc: {{ number_format($item['discount'], 2) }} @endif
{{ $item['quantity'] }} {{ ucfirst(strtolower($item['unit_of_measure'])) ?? '-' }} {{ number_format($item['amount'], 2) }}
@if(!empty($totals['tax'])) @endif @if(!empty($totals['discount'])) @endif
Subtotal: {{ number_format($totals['subtotal'], 2) }}
Tax {{ isset($totals['tax_rate']) ? "({$totals['tax_rate']}%)" : '' }}: {{ number_format($totals['tax'], 2) }}
Discount: -{{ number_format($totals['discount'], 2) }}
TOTAL({{$currency[ 'code']}}): {{ number_format($totals['total'], 2) }}
@if(!empty($payment['change']) && $payment['change'] > 0) @endif {{-- ✅ NEW SECTION: Display balance if total > amount paid --}} @if(($totals['total'] ?? 0) > ($payment['amount_paid'] ?? 0)) @endif
Payment Method: {{ $payment['method'] ?? 'Cash' }}
Amount Paid ({{ $currency['code'] }}): {{ number_format($payment['amount_paid'] ?? $totals['total'], 2) }}
Change ({{ $currency['code'] }}): {{ number_format($payment['change'], 2) }}
Balance Due ({{ $currency['code'] }}): {{ number_format(($totals['total'] ?? 0) - ($payment['amount_paid'] ?? 0), 2) }}
{!! DNS1D::getBarcodeHTML($sale['receipt_number'] ?? 'SR001', 'C128', 2, 40) !!}
{{$configs['thankyou_message'] ?? ""}}!