{{-- Header Section --}} @if(empty($receipt_details->letter_head)) {{-- Logo --}} @if(!empty($receipt_details->logo))
Logo
@endif {{-- Business Information --}}

SALES INVOICE

@if(!empty($receipt_details->display_name))
{{$receipt_details->display_name}}
@endif @if(!empty($receipt_details->address))
{!! $receipt_details->address !!}
@endif
@if(!empty($receipt_details->contact))
{!! $receipt_details->contact !!}
@endif @if(!empty($receipt_details->website))
{{ $receipt_details->website }}
@endif
@if(!empty($receipt_details->tax_info1) || !empty($receipt_details->tax_info2))
@if(!empty($receipt_details->tax_info1))
{{ $receipt_details->tax_label1 }}: {{ $receipt_details->tax_info1 }}
@endif @if(!empty($receipt_details->tax_info2))
{{ $receipt_details->tax_label2 }}: {{ $receipt_details->tax_info2 }}
@endif
@endif
@else
Letterhead
@endif {{-- Invoice Details Card --}}
@php $invoice_datetime = $receipt_details->invoice_date ?? ''; $date_only = $invoice_datetime; $time_part = ''; // Extract time if format is like "22/12/2025 02:26 AM" if (preg_match('/(\d{1,2}:\d{2}\s?(AM|PM|am|pm))/', $invoice_datetime, $time_matches)) { $time_part = trim($time_matches[0]); // Remove time from date to show date only $date_only = trim(preg_replace('/\d{1,2}:\d{2}\s?(AM|PM|am|pm)/', '', $invoice_datetime)); } @endphp
{!! $receipt_details->invoice_no_prefix !!}: {{$receipt_details->invoice_no}}
{!! $receipt_details->date_label !!}: {{$date_only}}
@if(!empty($time_part))
Time: {{$time_part}}
@endif @if(!empty($receipt_details->service_staff))
Sold By: {{$receipt_details->service_staff}}
@endif
{{-- Customer Section --}}
{{$receipt_details->customer_label ?? 'Customer'}}: {{ $receipt_details->customer_name }}
{{-- Products Section --}}
@if(empty($receipt_details->hide_price)) @endif @forelse($receipt_details->lines as $line) @if($line['not_for_selling'] != 1) @if(empty($receipt_details->hide_price)) @endif {{-- Modifiers --}} @if(!empty($line['modifiers'])) @foreach($line['modifiers'] as $modifier) @if(empty($receipt_details->hide_price)) @endif @endforeach @endif @endif @empty @endforelse
# {{$receipt_details->table_product_label}} {{$receipt_details->table_qty_label}}{{$receipt_details->table_unit_price_label}} {{$receipt_details->table_subtotal_label}}
{{$loop->iteration}}
{{$line['name']}} {{$line['product_variation']}} {{$line['variation']}}
@if(!empty($line['sub_sku']) || !empty($line['brand']) || !empty($line['cat_code']))
@if(!empty($line['sub_sku']))SKU: {{$line['sub_sku']}}@endif @if(!empty($line['brand'])) | {{$line['brand']}}@endif @if(!empty($line['cat_code'])) | {{$line['cat_code']}}@endif
@endif @if(!empty($line['product_custom_fields']))
{{$line['product_custom_fields']}}
@endif @if(!empty($line['product_description']))
{!!$line['product_description']!!}
@endif @if(!empty($line['sell_line_note']))
{!!$line['sell_line_note']!!}
@endif @if(!empty($line['lot_number']))
{{$line['lot_number_label']}}: {{$line['lot_number']}}
@endif @if(!empty($line['product_expiry']))
Exp: {{$line['product_expiry']}}
@endif
@if ($receipt_details->show_only_sold_unit) {{$line['sell_unit_quantity']}} @else {{$line['quantity']}} @endif @if ($receipt_details->show_only_sold_unit) {{$line['sell_unit_price_before_discount']}} @else {{$line['unit_price_before_discount']}} @endif {{$line['line_total']}}
+ {{$modifier['name']}} {{$modifier['variation']}} @if(!empty($modifier['sub_sku'])), {{$modifier['sub_sku']}}@endif @if(!empty($modifier['cat_code'])), {{$modifier['cat_code']}}@endif @if(!empty($modifier['sell_line_note'])) ({!!$modifier['sell_line_note']!!})@endif
{{$modifier['quantity']}} {{$modifier['units']}}{{$modifier['unit_price_inc_tax']}} {{$modifier['line_total']}}
No items found
{{-- Summary Section --}} @if(empty($receipt_details->hide_price))
ORDER SUMMARY
@if (!empty($receipt_details->total_items_label))
{!! $receipt_details->total_items_label !!} {{$receipt_details->total_items}}
@endif @if(!empty($receipt_details->total_line_discount))
Item Discount (-) {{$receipt_details->total_line_discount}}
@endif @if(!empty($receipt_details->subtotal))
Subtotal {{$receipt_details->subtotal}}
@endif @if(!empty($receipt_details->discount))
Bill Discount (-) {{$receipt_details->discount}}
@endif @if(!empty($receipt_details->tax))
{!! $receipt_details->tax_label !!} (+) {{$receipt_details->tax}}
@endif
{{-- Total Section --}} @if(!empty($receipt_details->total))
TOTAL AMOUNT {{$receipt_details->total}}
@endif @if(!empty($receipt_details->total_in_words))
{{$receipt_details->total_in_words}}
@endif {{-- Payment Details --}}
PAYMENT DETAILS
@if(!empty($receipt_details->total_paid)) @endif @if(!empty($receipt_details->total_due))
Balance Due {{$receipt_details->total_due}}
@endif
@if(!empty($receipt_details->payments))
@foreach($receipt_details->payments as $payment)
{{$payment['method']}} {{$payment['amount']}}
@endforeach
@endif
@endif {{-- Additional Notes --}} @if(!empty($receipt_details->additional_notes))
NOTES
{!! nl2br($receipt_details->additional_notes) !!}
@endif {{-- Barcode --}} @if($receipt_details->show_barcode)
Barcode
@endif {{-- QR Code --}} @if($receipt_details->show_qr_code && !empty($receipt_details->qr_code_text))
QR Code
Scan to view details
@endif {{-- Footer Text --}} @if(!empty($receipt_details->footer_text)) @endif {{-- Thank You Section --}}
THANK YOU!
Please Visit Again
{{-- Powered By Section --}}
Powered by APKHUB(PVT)LTD