Return Note
@if($invoice->customer) @endif
Invoice {{ $invoice->invoice_number }}
Date {{ now()->format('Y-m-d h:i A') }}
Customer {{ $invoice->customer->name }}
@php $total = 0; @endphp {{-- Narrow (thermal) layout --}}
@foreach($returns as $ret) @php $amount = ($ret->qty ?? 0) * ($ret->price ?? 0); $total += $amount; @endphp @if(!empty($ret->product->barcode)) @endif @if(!empty($ret->reason)) @endif @endforeach
Item Qty Amount
{{ $ret->product->name ?? 'Item' }}
{{ $ret->product->barcode }}
Price: {{ number_format((float)($ret->price ?? 0), 2) }} {{ number_format((float)($ret->qty ?? 0), 2) }} {{ number_format((float)$amount, 2) }}
Reason: {{ $ret->reason }}
Total {{ number_format((float)$total, 2) }}
{{-- Wide layout --}}
@php $i=1; $wideTotal=0; @endphp @foreach($returns as $ret) @php $amount = ($ret->qty ?? 0) * ($ret->price ?? 0); $wideTotal += $amount; @endphp @endforeach
# Item Barcode Qty Price Amount Reason
{{ $i++ }} {{ $ret->product->name ?? 'Item' }} {{ $ret->product->barcode ?? '' }} {{ number_format((float)($ret->qty ?? 0),2) }} {{ number_format((float)($ret->price ?? 0),2) }} {{ number_format((float)$amount,2) }} {{ $ret->reason }}
Total {{ number_format((float)$wideTotal,2) }}