@php function formatIndianCurrency($amount) { $amount = (float) $amount; $decimal = number_format($amount, 2, '.', ''); $exploded = explode('.', $decimal); $last3 = substr($exploded[0], -3); $restUnits = substr($exploded[0], 0, -3); if ($restUnits != '') { $restUnits = preg_replace("/\B(?=(\d{2})+(?!\d))/", ",", $restUnits); } return '₹' . $restUnits . $last3 . '.' . $exploded[1]; } @endphp @extends('layouts.sales.sales') @section('title', 'Quotes') @section('content')
All Quotes
Quotes
@foreach($active as $a) @endforeach
Quote Id Client Name Project Name Location Quote Date Status Estimated Quote Action
#{{ $a->id }} {{ $a->name}} {{ $a->title ?? 'N/A' }} {{ $a->location }} {{ \Carbon\Carbon::parse($a->created_at)->format('d/m/Y') }} {{ $a->status == 'converted' ? 'Active' : ucfirst($a->status) }} @if(!empty($a->estimate_cost)) {{ formatIndianCurrency($a->estimate_cost) }} @else N/A @endif View
@foreach($pending as $pd) @endforeach
Quote Id Client Name Project Name Location Quote Date Status Estimated Quote Action
#{{ $pd->id }} {{ $pd->name }} {{ $pd->title }} {{ $pd->location }} {{ \Carbon\Carbon::parse($pd->created_at)->format('d/m/Y') }} Pending @if(!empty($pd->estimate_cost)) {{ formatIndianCurrency($pd->estimate_cost) }} @else N/A @endif View
@foreach($inProgress as $project) @endforeach
Quotation Id Client Name Location Start Date Designer Name Status Action
#{{ $project->quotation_id}} {{ $project->client_name }} {{ $project->location }} {{ \Carbon\Carbon::parse($project->start_date)->format('d/m/Y') }} {{ $project->staff->name ?? ''}} In Progress
@foreach($delivered as $d) @endforeach
Project Id Client Name Project Name Location Start Date End Date Status Team Assigned Payment Status
#{{ $d->project_id }} {{ $d->client_name }} {{ $d->project_name }} {{ $d->location }} {{ \Carbon\Carbon::parse($d->start_date)->format('d/m/Y') }} {{ \Carbon\Carbon::parse($d->end_date)->format('d/m/Y') }} Completed {{ $d->team_assigned }} {{ $d->payment_status }}
@foreach($lostDeals as $lost) @endforeach
Quote Id Client Name Location Quote Date Status Reason
#{{ $lost->id }} {{ $lost->name }} {{ $lost->location }} {{ \Carbon\Carbon::parse($lost->quote_date)->format('d/m/Y') }} Lost {{ $lost->rejection_reason }}
Rows per page: {{ $active->perPage() }}    {{ $active->firstItem() }}–{{ $active->lastItem() }} of {{ $active->total() }}
{{ $active->links('pagination::bootstrap-5') }}
@endsection