{{ __('Stock In / Out') }}
{{ __('Record deliveries, issue parts, and log maintenance jobs.') }}
@if (session('status'))
{{ session('status') }}
@if (session('createdJob'))
{{ __('Add parts / view details') }}
@endif
@endif
@if ($errors->any())
@foreach ($errors->all() as $error)
- {{ $error }}
@endforeach
@endif
{{-- Tab nav --}}
{{-- ============================= STOCK IN ============================= --}}
{{-- Inline "+ New Part" / "+ New Supplier" mini-forms — deliberately OUTSIDE the
form above. Nesting a
{{ __('Recent Stock In') }}
@if ($stockIn->isEmpty())
{{ __('No stock-in entries yet.') }}
@else
| {{ __('Date') }} |
{{ __('Part') }} |
{{ __('Supplier') }} |
{{ __('Qty') }} |
{{ __('Cost') }} |
@foreach ($stockIn as $movement)
| {{ $movement->date->format('M j, Y') }} |
{{ $movement->part->name }}
|
{{ $movement->supplier?->name ?: '—' }} |
{{ $movement->magnitude() }} |
{{ number_format((float) $movement->unit_cost, 2) }} |
@endforeach
@endif
{{-- ============================= STOCK OUT ============================= --}}
{{ __('Recent Stock Out') }}
@if ($stockOut->isEmpty())
{{ __('No stock-out entries yet.') }}
@else
| {{ __('Date') }} |
{{ __('Part') }} |
{{ __('Vehicle') }} |
{{ __('Mechanic') }} |
{{ __('Qty') }} |
@foreach ($stockOut as $movement)
| {{ $movement->date->format('M j, Y') }} |
{{ $movement->part->name }}
|
{{ $movement->vehicle?->plate ?: '—' }} |
{{ $movement->mechanic?->name ?: '—' }} |
{{ $movement->magnitude() }} |
@endforeach
@endif
{{-- ============================= MAINTENANCE ============================= --}}
@if ($maintenanceJobs->isEmpty())
{{ __('No maintenance jobs yet.') }}
@else
| {{ __('Date') }} |
{{ __('Vehicle') }} |
{{ __('Workshop') }} |
{{ __('Total Cost') }} |
{{ __('Status') }} |
@foreach ($maintenanceJobs as $job)
|
{{ $job->date_in->format('M j, Y') }}
|
{{ $job->vehicle->plate }} |
{{ $job->workshopLabel() }} |
{{ number_format((float) $job->total_cost, 2) }} |
{{ $job->status->label() }}
|
@endforeach
@endif
@can('audit-log.view')
@endcan