{{ __('Stock In / Out') }}

{{ __('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 ============================= --}}
@csrf
{{-- Part combobox --}}

{{ __('Selected') }}:

{{-- Supplier --}}
{{-- Inline "+ New Part" / "+ New Supplier" mini-forms — deliberately OUTSIDE the form above. Nesting a
inside another is invalid HTML; browsers "repair" it unpredictably (commonly by folding the inner form's fields into the outer one), which is what broke both this button and "Record Stock In". --}}
@csrf

{{ __('Barcode is generated automatically — no need to enter one here.') }}

@csrf

{{ __('Recent Stock In') }}

@if ($stockIn->isEmpty())
{{ __('No stock-in entries yet.') }}
@else
@foreach ($stockIn as $movement) @endforeach
{{ __('Date') }} {{ __('Part') }} {{ __('Supplier') }} {{ __('Qty') }} {{ __('Cost') }}
{{ $movement->date->format('M j, Y') }} {{ $movement->part->name }} {{ $movement->supplier?->name ?: '—' }} {{ $movement->magnitude() }} {{ number_format((float) $movement->unit_cost, 2) }}
@endif
{{-- ============================= STOCK OUT ============================= --}}
@csrf

{{ __('Available') }}:

{{ __('Exceeds available stock.') }}

{{ __('Recent Stock Out') }}

@if ($stockOut->isEmpty())
{{ __('No stock-out entries yet.') }}
@else
@foreach ($stockOut as $movement) @endforeach
{{ __('Date') }} {{ __('Part') }} {{ __('Vehicle') }} {{ __('Mechanic') }} {{ __('Qty') }}
{{ $movement->date->format('M j, Y') }} {{ $movement->part->name }} {{ $movement->vehicle?->plate ?: '—' }} {{ $movement->mechanic?->name ?: '—' }} {{ $movement->magnitude() }}
@endif
{{-- ============================= MAINTENANCE ============================= --}}
@csrf

{{ __('Parts cost is added once parts are issued on the job\'s detail page.') }}

{{ __('Recent Maintenance Jobs') }}

{{ __('View All') }}
@if ($maintenanceJobs->isEmpty())
{{ __('No maintenance jobs yet.') }}
@else
@foreach ($maintenanceJobs as $job) @endforeach
{{ __('Date') }} {{ __('Vehicle') }} {{ __('Workshop') }} {{ __('Total Cost') }} {{ __('Status') }}
{{ $job->date_in->format('M j, Y') }} {{ $job->vehicle->plate }} {{ $job->workshopLabel() }} {{ number_format((float) $job->total_cost, 2) }} {{ $job->status->label() }}
@endif
@can('audit-log.view') @endcan