@php
$cms = $cms ?? \App\Models\CmsSetting::instance();
@endphp
Customer Receipt
@include('print.partials.branding-header')
| Item |
Qty |
Price |
Total |
@foreach ($order->items as $item)
| {{ $item->product->name }} |
{{ $item->quantity }} |
{{ number_format($item->price) }} |
{{ number_format($item->total) }} |
@endforeach
@php
$itemsTotal = $order->items->sum('total');
$discountAmount = 0;
if ($order->discount_percentage > 0) {
$discountAmount = round($itemsTotal * $order->discount_percentage / 100, 2);
} elseif ($order->manual_discount > 0) {
$discountAmount = $order->manual_discount;
}
$grandTotal = $itemsTotal - $discountAmount + $order->service_charges + $order->delivery_charges + ($order->gst_tax ?? 0) + ($order->pra_tax ?? 0);
@endphp
| Subtotal |
Rs {{ number_format($itemsTotal) }} |
@if ($order->discount_percentage > 0)
| Discount ({{ (int) $order->discount_percentage }}%) |
-Rs {{ number_format($discountAmount) }} |
@elseif ($order->manual_discount > 0)
| Discount (Manual) |
-Rs {{ number_format($discountAmount) }} |
@endif
@if ($order->service_charges > 0)
| Service Charges (7%) |
Rs {{ number_format($order->service_charges) }} |
@endif
@if (!empty($order->pra_tax) && $order->pra_tax > 0)
| PRA TAX (8%) |
Rs {{ number_format($order->pra_tax) }} |
@endif
@if (!empty($order->gst_tax) && $order->gst_tax > 0)
| GST Tax |
Rs {{ number_format($order->gst_tax) }} |
@endif
@if ($order->delivery_charges > 0)
| Delivery Charges |
Rs {{ number_format($order->delivery_charges) }} |
@endif
| Grand Total |
Rs {{ number_format($grandTotal) }} |
@include('print.partials.social-icons')
@include('print.partials.frame-print-script', ['action' => 'receipt'])