@if(!empty($printHead)) {!! str_replace('description) !!} @endif
@if(isset($purchase->warehouse))
{{ $purchase->warehouse->name }}
@if(!empty($purchase->warehouse->address))

Address: {{ $purchase->warehouse->address }}

@endif @if(!empty($purchase->warehouse->mobile))

Mobile: {{ $purchase->warehouse->mobile }}

@endif @if(!empty($purchase->warehouse->email))

Email: {{ $purchase->warehouse->email }}

@endif @endif

BIN: 1646561651

INVOICE
Invoice : {{ $purchase->invoice_code }}
Name: {{ $purchase->customer->name ?? 'Walk-in Customer' }}
Mobile: {{ $purchase->customer->mobile ?? 'N/A' }}
Date : {{ date('d/m/Y', strtotime($purchase->date)) }}
Time: {{ date('h:i A', strtotime($purchase->created_at)) }}
Sales By: {{ $purchase->createdBy->full_name ?? 'Admin' }}
@php $sl = 1; $subtotal = 0; @endphp @if(isset($purchase->saleDetails)) @foreach($purchase->saleDetails as $details) @php $subtotal += $details->total_item_price; @endphp @endforeach @endif
# Product Qty U.Price Amount
{{ $sl++ }} {{ $details->product->name ?? 'N/A' }} {{ $details->quantity }} {{ $details->product_price + 0 }} {{ $details->total_item_price + 0 }}
@php $grandTotal = ($subtotal + $purchase->shipping_cost + $purchase->tax) - $purchase->discount; $payment_amount = isset($purchase->payment) ? $purchase->payment->sum('payment_amount') : 0; $due = $grandTotal - $payment_amount; $paymentMethod = (isset($purchase->payment) && $purchase->payment->count() > 0) ? $purchase->payment->first()->paying_by : 'Cash'; @endphp

Payment Type: {{ $paymentMethod }}

Product Sold Will Not Be Exchanged Without Invoice
Sub-Total: {{ $subtotal + 0 }}
VAT: {{ $purchase->tax + 0 }}
Discount: {{ $purchase->discount + 0 }}
Shipping charge: {{ $purchase->shipping_cost + 0 }}
Total Amount: {{ $grandTotal + 0 }}
Paid: {{ $payment_amount + 0 }}
Change Amt/Due: {{ $due + 0 }}
QR Code