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

@if ($flashMessage)
{{ $flashMessage }}
@endif
@forelse ($rows as $ret) @empty @endforelse
{{ __('material_returns.no') }} {{ __('common.date') }} {{ __('common.project') }} {{ __('common.warehouse') }} {{ __('material_returns.issue_no') }} {{ __('common.status') }} {{ __('common.remarks') }} {{ __('material_returns.items') }} {{ __('common.actions') }}
{{ $ret->return_no }} {{ $ret->return_date ? substr((string) $ret->return_date, 0, 10) : '—' }} {{ $ret->project_name ?: 'N/A' }} {{ $ret->warehouse_name ?: 'N/A' }} {{ $ret->issue_no ?: '—' }} {{ $ret->status }} {{ $ret->remarks ?: '—' }}
{{ __('common.no_records') }}
@if ($showModal)

{{ $editingId ? __('material_returns.edit_return') : __('material_returns.new_return') }}

{{ __('material_returns.items') }}

@foreach ($items as $idx => $line)
@endforeach
@endif @if ($showItems)

Items for {{ $viewTitle }}

@if (count($viewLines) === 0)

{{ __('common.no_records') }}

@else @foreach ($viewLines as $line) @endforeach
{{ __('common.item') }} {{ __('common.unit') }} {{ __('common.quantity') }} {{ __('material_returns.unit_cost') }} {{ __('common.total') }} {{ __('common.remarks') }}
{{ $line['item_name'] ?: 'N/A' }} {{ $line['unit_name'] ?: 'N/A' }} {{ $line['quantity'] }} {{ number_format((float) $line['unit_cost'], 2) }} {{ number_format((float) $line['total_cost'], 2) }} {{ $line['remarks'] ?: '—' }}
@endif
@endif