@extends('admin.layouts.app') @section('title', get_setting('site_name').' | '.__('Movement Report')) @section('content')
{{ __('Movement Report') }}
{{ __('Choose a report type, then fill the filters shown for that type.') }}
@if($ranReport)
{{ $reportTitle }}
@php $formatMovementDateTime = function ($date, $time) { if (!$date && !$time) { return '—'; } $datePart = $date ? \Illuminate\Support\Carbon::parse($date)->format('Y-m-d') : ''; $timePart = $time ? substr((string) $time, 0, 5) : ''; return trim($datePart . ($timePart !== '' ? ' ' . $timePart : '')) ?: '—'; }; @endphp
@forelse($visits as $index => $visit) @empty @endforelse
# {{ __('Staff') }} {{ __('Department') }} {{ __('Branch') }} {{ __('Application date') }} {{ __('Movement date/time') }} {{ __('Duration') }} {{ __('Location') }} {{ __('Purpose') }} {{ __('Remark') }}
{{ __('Start date Time') }} {{ __('End date Time') }} {{ __('Actual Closed Date Time') }}
{{ $index + 1 }} @if($visit->staff?->user) {{ $visit->staff->user->name }}({{ $visit->staff->user_id ?? $visit->staff->user->id }}) @else — @endif {{ $visit->staff?->department?->name ?? '—' }} {{ $visit->staff?->warehouse?->name ?? '—' }} {{ $visit->application_date ? \Illuminate\Support\Carbon::parse($visit->application_date)->format('Y-m-d') : '—' }} {{ $formatMovementDateTime($visit->start_date ?: $visit->movement_date, $visit->start_time_out) }} {{ $formatMovementDateTime($visit->end_date, $visit->end_time_in ?: $visit->approx_end_time_in) }} {{ $visit->closed_at ? $visit->closed_at->format('Y-m-d H:i') : '—' }} {{ $visit->duration ?? '—' }} {{ $visit->location ?? '—' }} {{ $visit->purpose ?? '—' }} {{ $visit->remarks ?? '—' }}
{{ __('No movement records found for the selected filters.') }}
@endif @endsection @section('script') @endsection