@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.admin') @section('title', 'Active Orders') @section('pages', 'Active Orders') @section('content')
| Quote Id | Client Name | Project Name | Location | Quote Date | Status | Estimated Quote | Final Quote | |
|---|---|---|---|---|---|---|---|---|
| #{{ $order->id }} | {{ $order->client_name }} | {{ $order->title ?? 'N/A' }} | {{ $order->location }} | {{ \Carbon\Carbon::parse($order->created_at)->format('d/m/Y') }} | {{ ucfirst($order->status) }} | @if(!empty($order->quotation->estimate_cost)) {{ formatIndianCurrency($order->quotation->estimate_cost) }} @else N/A @endif | @if(!empty($order->project_cost)) {{ formatIndianCurrency($order->project_cost) }} @else N/A @endif | |
| No active orders found. | ||||||||