@extends('garage.layouts.app') @section('title', 'Estimates') @section('content') @php $hasMeterColumn = \Illuminate\Support\Facades\Schema::hasColumn('garage_estimates', 'meter_reading'); @endphp
@if($status || $fromDate || $toDate || $search) Clear @endif
@if($hasMeterColumn)@endif @forelse($estimates as $estimate) @if($hasMeterColumn)@include('garage.partials.index-meter-reading-cell', ['meter' => $estimate->meter_reading ?? null])@endif @empty @endforelse
Estimate No Date Customer VehicleMeter (km)Amount Status Actions
{{ $estimate->estimate_number }} {{ \Carbon\Carbon::parse($estimate->estimate_date)->format('M d, Y') }}
{{ $estimate->customer_name ?? '-' }}
{{ $estimate->vehicle_registration ?? '-' }} PKR {{ number_format($estimate->total_amount, 2) }} @php $statusColors = [ 'draft' => 'secondary', 'sent' => 'info', 'accepted' => 'success', 'rejected' => 'danger', 'expired' => 'warning', 'converted' => 'primary' ]; $statusColor = $statusColors[$estimate->status] ?? 'secondary'; @endphp {{ ucfirst($estimate->status) }}
@if($estimate->status === 'draft') @endif @if($estimate->status !== 'converted')
@csrf @method('DELETE')
@endif
No estimates found
@if($estimates->hasPages())
{{ $estimates->links() }}
@endif
@endsection