@extends('layouts.app') @section('title', 'Vendors') @section('content') @php $pills = filter_pills([ 'status' => ['Status', ['active' => 'Active', 'inactive' => 'Inactive']], 'category' => ['Category'], 'country' => ['Country', fn ($c) => \App\Support\Countries::name($c)], 'balance' => ['Balance', ['owed' => 'We owe money']], ]); $chips = [[null, 'All', $counts['all']], ['active', 'Active', $counts['active']], ['inactive', 'Inactive', $counts['inactive']]]; $filtered = count($pills) > 0 || request()->filled('q'); @endphp @can('data.export') Export @endcan @can('vendors.create') Add vendor @endcan
@foreach ($chips as [$key, $label, $n]) {{ $label }} {{ $n }} @endforeach We owe money {{ $counts['owed'] }}
@forelse ($vendors as $v) @empty @endforelse
Contact Actions
{{ $v->name }} @unless ($v->is_active)Inactive@endunless @if ($v->location()){{ $v->location() }}@endif
@if ($v->category){{ $v->category }}@else — @endif {{ $v->contact_person ?: '—' }}{{ $v->phone }} {{ money($v->billed()) }} {{ money($v->paid()) }} {{ money($v->balance()) }}
  • View
  • @can('vendors.edit')
  • Edit
  • @endcan @can('vendor_bills.create')
  • Add bill
  • @endcan @can('payments.create')
  • Pay vendor
  • @endcan @can('vendors.delete')
  • @endcan
    @can('vendors.create') Add your first vendor @endcan
    @endsection