@extends('Admin.layouts') @section('content') @php $serviceRows = collect($bill->common_services ?? []) ->map( fn($service) => [ 'description' => $service['name'] ?? 'Service', 'amount' => (float) ($service['amount'] ?? 0), ], ) ->concat( collect($bill->services ?? [])->map( fn($service) => [ 'description' => $service['name'] ?? 'Service', 'amount' => (float) ($service['amount'] ?? 0), ], ), ) ->values(); $productRows = collect($bill->products ?? []) ->map( fn($product) => [ 'description' => $product['name'] ?? 'Product', 'quantity' => (float) ($product['quantity'] ?? 0), 'rate' => (float) ($product['rate'] ?? 0), ], ) ->values(); $discountAmount = round(((float) $bill->subtotal * (float) $bill->discount) / 100, 2); $imagePaths = collect($bill->image_paths ?? []); @endphp {{-- PAGE HEADER --}}
{{ $bill->remarks ?: '-' }}
No vehicle images were uploaded for this bill.
@endif| SNO | DESCRIPTION | AMOUNT (₹) |
|---|---|---|
| Total Amount | ₹{{ number_format($serviceRows->sum('amount'), 2) }} | |
| DESCRIPTION | QUANTITY | RATE (₹) | AMOUNT (₹) |
|---|---|---|---|
| Total Amount: | ₹0.00 | ||
{{ $bill->remarks ?: '-' }}