@extends('layouts.app') @section('style') @endsection @section('content')

Total Suppliers

{{ $stats['total'] ?? 0 }}

Active Suppliers

{{ $stats['with_purchases'] ?? 0 }}

New This Month

{{ $stats['active_this_month'] ?? 0 }}

@if(session('success'))
Success
{{ session('success') }}
@endif @if(session('error'))
Error
{{ session('error') }}
@endif @if($errors->any())
Validation Errors
    @foreach($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif @if($suppliers->count() > 0)
@foreach($suppliers as $supplier) @endforeach
ID Name Contact Phone Purchases Status Actions
purchases_count > 0) disabled @endif>
#{{ str_pad($supplier->id, 5, '0', STR_PAD_LEFT) }}
{{ $supplier->name }}

{{ $supplier->email ?? 'No email' }}

{{ $supplier->contact_person ?? 'N/A' }} {{ $supplier->phone ?? 'N/A' }} {{ $supplier->purchases_count ?? 0 }} orders @if($supplier->is_active) Active @else Inactive @endif
@if(route('purchases.create')) @endif
@csrf @method('DELETE')
Showing {{ $suppliers->firstItem() }} to {{ $suppliers->lastItem() }} of {{ $suppliers->total() }} entries
{{ $suppliers->links() }}
@else
No suppliers found

@if(request()->has('search') || request()->has('filter')) Try changing your search criteria @else Get started by adding your first supplier @endif

Add New Supplier
@endif
@endsection @section('script') @endsection