@php
$logoUrl = \App\Models\Setting::getLogoUrl('light');
$siteName = \App\Models\Setting::get('site_name', 'KIYOKART');
$siteAddress = \App\Models\Setting::get('site_address');
$sitePhone = \App\Models\Setting::get('site_phone');
$siteGstin = \App\Models\Setting::get('site_gstin');
$receiptItems = $order->items->filter(fn($item) => $item->product !== null)->values();
$totalQty = (int) $receiptItems->sum(fn($item) => (float) ($item->qty ?? 0));
@endphp
@if($siteName)
{{ ucwords($siteName ?? '')}}
@endif
@if($siteAddress)
{{ ucwords($siteAddress ?? '') }}
@endif
@if($sitePhone)
Phone : {{ $sitePhone}}
@endif
@if($siteGstin)
GSTIN : {{ $siteGstin }}
@endif
|
Order ID: #{{ $order->id }}
|
Date: {{ optional($order->created_at)->format('d M Y') }} |
@if($order->isSplitPayment())
Payment: Split Payment
Cash: ₹{{ number_format($order->cash_amount, 2) }} | Card/UPI: ₹{{ number_format($order->card_amount, 2) }}
@else
Payment method: {{ $order->getPaymentTypeLabel() }}
@if($order->cash_amount)
Cash: ₹{{ number_format($order->cash_amount, 2) }}
@elseif($order->card_amount)
Card/UPI: ₹{{ number_format($order->card_amount, 2) }}
@endif
@endif
|
Time : {{ optional($order->created_at)->format('h:ia') }} |
@if($order->staff)
|
Salesman: {{ ucfirst($order->staff->name) }}
|
@endif
@if($order->source === 'pos' && !empty($order->delivery_type))
|
Delivery Type: {{ $order->delivery_type === 'courier' ? 'Courier' : 'Store Pickup' }}
|
@endif
@if($order->address_snapshot)
@php $addr = $order->address_snapshot; @endphp
@if($addr)
| Name: {{ $addr['name'] ?? '' }} |
@if(!empty($addr['line1']) || !empty($addr['line2']) || !empty($addr['city']) || !empty($addr['state']) || !empty($addr['pin']))
|
Address: {{ $addr['line1'] ?? '' }}, @if(!empty($addr['line2'])) {{ $addr['line2'] }}, @endif
{{ $addr['city'] ?? '' }}, @if(isset($addr['state'])) {{ $addr['state'] }} , @endif {{ $addr['pin'] ?? '' }} |
@endif
| Phone: {{ $addr['mobile'] ?? '' }} |
@endif
@endif
@if($order->source === 'pos' && !empty($order->user->customer_type))
| Customer Type: {{ ucfirst($order->user->customer_type) }} |
@endif
| Product Name |
Qty |
Unit Price |
Total |
@foreach ($receiptItems as $orderDetail)
{{ $orderDetail->name }}
@if($orderDetail->variation != null) ({{ $orderDetail->variation }}) @endif
{{ $orderDetail->product->barcode ?? '' }}
|
{{ $orderDetail->qty }} |
₹{{ number_format($orderDetail->price, 2) }} |
₹{{ number_format($orderDetail->line_total, 2) }} |
@endforeach
| Total Qty |
{{ $totalQty }} |
| Sub Total |
₹{{ number_format($order->subtotal, 2) }} |
| Shipping Cost |
₹{{ number_format($order->shipping_total ?? 0, 2) }} |
@if($order->customization_charges > 0)
| Customization Charges |
₹{{ number_format($order->customization_charges ?? 0, 2) }} |
@endif
| Discount |
-₹{{ number_format($order->discount_total ?? 0, 2) }} |
| Grand Total |
₹{{ number_format($order->total_payable, 2) }} |
@if($order->source === 'pos' && ($order->cash_amount || $order->card_amount))
@if($order->cash_amount)
| Cash Paid |
₹{{ number_format($order->cash_amount, 2) }} |
@endif
@if($order->card_amount)
| Card/UPI Paid |
₹{{ number_format($order->card_amount, 2) }} |
@endif
@if($order->change_amount && $order->change_amount > 0)
| Change |
₹{{ number_format($order->change_amount, 2) }} |
@endif
@endif
@if($order->tax_total > 0)
Tax Charged on This Order:
₹{{ number_format($order->tax_total, 2) }}
@endif
Thank you for shopping with us!
No Exchange & No Refund
This is a computer-generated receipt
@if(!empty($autoPrint))
@endif