{{ __('material_return_report.title') }}

@if (session('status'))
{{ session('status') }}
@endif
@if (count($returns) === 0)
{{ __('common.no_records') }}
@else @foreach ($returns as $ret) @foreach ($ret['items'] ?? [] as $idx => $item) @if ($idx === 0) @endif @endforeach @endforeach
{{ __('material_return_report.return_no') }} {{ __('common.date') }} {{ __('common.project') }} {{ __('common.warehouse') }} {{ __('common.status') }} {{ __('material_return_report.item_code') }} {{ __('common.item') }} {{ __('common.type') }} {{ __('common.unit') }} {{ __('material_return_report.qty') }} {{ __('material_return_report.unit_cost') }} {{ __('common.total') }} {{ __('material_return_report.batch') }} {{ __('material_return_report.serial') }} {{ __('common.remarks') }}
{{ $ret['return_no'] }} {{ !empty($ret['return_date']) ? substr((string)$ret['return_date'], 0, 10) : '-' }} {{ $ret['project_name'] }} {{ $ret['warehouse_name'] }} @php $st = $ret['status'] ?? 'draft'; @endphp {{ $st }} {{ $item['item_code'] ?: '—' }} {{ $item['item_name'] }} {{ $item['item_type'] ?: '—' }} {{ $item['unit_name'] }} {{ $item['quantity'] }} {{ number_format((float)($item['unit_cost'] ?? 0), 2) }} {{ number_format((float)($item['total_cost'] ?? 0), 2) }} {{ $item['batch_no'] ?: '—' }} {{ $item['serial_no'] ?: '—' }} {{ $item['remarks'] ?: '—' }}
@endif