@php
$fmt = fn ($v) => number_format((float) $v, 2) . ' ' . $shop->currency;
$reasons = ['changed_mind' => 'Changed mind', 'defective' => 'Defective', 'wrong_item' => 'Wrong item', 'damaged_in_transit' => 'Damaged in transit', 'other' => 'Other'];
@endphp
{{ $ret->return_no }}
@if ($logo)
@endif
{{ $shop->name }}
@if ($shop->address){{ $shop->address }}
@endif
@if ($shop->phone)Tel: {{ $shop->phone }}
@endif
@if ($taxNumber)Tax no: {{ $taxNumber }}@endif
{{ (float) $ret->credited_amount > 0 ? 'CREDIT NOTE' : 'REFUND RECEIPT' }}
| Return no. | {{ $ret->return_no }} |
| Date | {{ $ret->returned_at->timezone($shop->timezone)->format('Y-m-d H:i') }} |
| Original invoice | {{ $ret->sale?->invoice_no }} |
| Customer | {{ $ret->customer?->name ?? 'Walk-in' }} |
@if ($ret->user)| Processed by | {{ $ret->user->name }} |
@endif
@if ($ret->reason)| Reason | {{ $reasons[$ret->reason] ?? $ret->reason }} |
@endif
| Returned item | Qty | Amount |
@foreach ($ret->items as $i)
| {{ $i->saleItem?->product_name }} |
{{ rtrim(rtrim(number_format((float) $i->quantity, 3, '.', ''), '0'), '.') }} |
{{ number_format((float) $i->total, 2) }} |
@endforeach
| Subtotal | {{ $fmt($ret->subtotal) }} |
@if ((float) $ret->tax > 0)| Tax | {{ $fmt($ret->tax) }} |
@endif
| TOTAL RETURNED | {{ $fmt($ret->total) }} |
@if ((float) $ret->refunded_amount > 0)
| Refunded ({{ $ret->refund_method }}) | {{ $fmt($ret->refunded_amount) }} |
@endif
@if ((float) $ret->credited_amount > 0)
| Credited to account | {{ $fmt($ret->credited_amount) }} |
@if ($ret->customer)| Account balance now | {{ $fmt($ret->customer->balance) }} |
@endif
@endif
@if ($ret->notes)
{{ $ret->notes }}
@endif
@if ($footer)
{{ $footer }}
@endif
@if (! $pdf)
@if ($autoPrint)@endif
@endif