@extends('layouts.app') @section('title', 'Quotations') @section('content') @php $f = $filters ?? []; $qParams = array_filter([ 'q' => $f['q'] ?? '', 'status' => ($f['status'] ?? '') !== '' && ($f['status'] ?? '') !== 'all' ? ($f['status'] ?? '') : null, 'client_id' => $f['client_id'] ?? '', 'date_from' => $f['date_from'] ?? '', 'date_to' => $f['date_to'] ?? '', 'sort' => $f['sort'] ?? '', 'direction' => $f['direction'] ?? '', ]); @endphp

Quotations

Click any quotation to view details and line items

Total

{{ number_format($total_count ?? 0) }}

Pending

{{ number_format($pending_count ?? 0) }}

Approved

{{ number_format($approved_count ?? 0) }}

Total value

{{ \App\Support\Format::mwkDecimal($total_value ?? 0) }}

Pending + approved + converted

@if($errors->any())
{{ $errors->first() }}
@endif
Clear
@if($quotations->count() === 0)

No quotations found

Create your first quotation or adjust your filters.

@else @foreach($quotations as $q) @php $ds = $q->displayStatus(); $badge = match ($ds) { 'Approved' => 'g', 'Rejected' => 'r', 'Converted' => 'b', 'Expired' => 's', default => 'a', }; @endphp @endforeach
Ref # Client Description Date Valid until Value Status
{{ $q->reference_number }} {{ $q->client?->company_name ?? '—' }} {{ \Illuminate\Support\Str::limit($q->description, 56) }} {{ $q->issue_date?->format('M j, Y') }} {{ $q->valid_until?->format('M j, Y') }} {{ \App\Support\Format::mwkDecimal($q->total_value) }} {{ $ds }} View
{{ $quotations->withQueryString()->links() }}
@endif
@endsection @push('scripts') @include('quotations.partials.quotation-form-script') @endpush