@extends('layouts.app') @section('title', 'Inventory Settings') @section('content') @php $tabs = [ 'numbering' => 'Document Numbering', 'stores' => 'Stores', 'departments' => 'Departments', ]; @endphp

Inventory Settings

Configure document numbering, stores and departments

@include('partials.flashes')
@foreach ($tabs as $key => $label) {{ $label }} @endforeach
@if ($tab === 'numbering')

Document Numbering

Prefixes and the next number to allocate for each document type

@csrf @foreach ([ ['prefix' => 'po_prefix', 'number' => 'next_po', 'label' => 'Purchase Orders', 'preview' => $settings->poPreview()], ['prefix' => 'grn_prefix', 'number' => 'next_grn', 'label' => 'Goods Received Notes', 'preview' => $settings->grnPreview()], ['prefix' => 'invoice_prefix', 'number' => 'next_invoice', 'label' => 'Invoices', 'preview' => $settings->invoicePreview()], ] as $group)

{{ $group['label'] }}

Next document: {{ $group['preview'] }}

@endforeach
@elseif ($tab === 'stores')

Stores & Warehouses

{{ $warehouses->count() }} stores · {{ $warehouses->sum(fn ($w) => $w->stockItems->count()) }} stock items assigned

@forelse ($filteredWarehouses as $w) @empty @endforelse
Name Type Location Manager Items Status Actions
{{ $w->name }} {{ $w->type }} {{ $w->location ?: '—' }} {{ $w->manager }} {{ $w->stockItems->count() }} {{ $w->active ? 'Active' : 'Inactive' }}
@csrf @method('DELETE')
No stores match your search.
Add store
@include('inventory.partials.warehouse-form', [ 'action' => route('inventory.warehouses.store'), 'method' => 'POST', 'prefix' => 'wh-new', 'row' => null, 'staff' => $staff, ])
@else

Departments

{{ $departments->count() }} departments · {{ $departments->sum(fn ($d) => $d->stockItems->count()) }} stock items assigned

@forelse ($filteredDepartments as $d) @empty @endforelse
Department Head Description Items Status Actions
{{ $d->name }} {{ $d->head }} {{ $d->description ?: '—' }} {{ $d->stockItems->count() }} {{ $d->active ? 'Active' : 'Inactive' }}
@csrf @method('DELETE')
No departments match your search.
Add department
@include('inventory.partials.department-form', [ 'action' => route('inventory.departments.store'), 'method' => 'POST', 'prefix' => 'dept-new', 'row' => null, 'staff' => $staff, ])
@endif
@endsection