@extends('layouts.app') @section('title', 'Quotations') @section('breadcrumb') @endsection @section('content') {{-- Filters --}}
{{-- Table --}}
@if($quotations->isEmpty())

No quotations found.

@else
@foreach($quotations as $q) @endforeach
Quot. No Customer Date Valid Until Amount Status Created By Actions
{{ $q->quotation_no }} {{ $q->customer?->name ?? '—' }} {{ $q->quotation_date?->format('d M Y') }} @if($q->valid_until) {{ $q->valid_until->format('d M Y') }} @else — @endif ৳{{ number_format($q->total_amount, 2) }} @php $badge = match($q->status) { 'draft' => 'secondary', 'sent' => 'info', 'accepted' => 'success', 'converted' => 'primary', 'expired' => 'warning', 'cancelled' => 'danger', default => 'secondary', }; @endphp {{ ucfirst($q->status) }} {{ $q->creator?->name ?? '—' }} @can_permission('quotations.edit') @if(!in_array($q->status, ['converted','cancelled'])) @endif @endcan_permission @can_permission('quotations.convert') @if($q->status === 'accepted')
@csrf
@endif @endcan_permission @can_permission('quotations.delete') @if($q->status !== 'converted')
@csrf @method('DELETE')
@endif @endcan_permission
{{ $quotations->links() }}
@endif
@endsection