@php
$primaryColor = '#808080'; // default grey
$textColor = '#000000'; // default black
if (
$quotation->user &&
$quotation->user->branch &&
!empty($quotation->user->branch->colour_scheme)
) {
$primaryColor = $quotation->user->branch->colour_scheme;
// Apply secondary text colour only if primary colour is present
if (!empty($quotation->user->branch->text_colour_scheme)) {
$textColor = $quotation->user->branch->text_colour_scheme;
}
}
@endphp
@php
$logoSrc = null;
if ($quotation->user && $quotation->user->branch && $quotation->user->branch->logo) {
$logoPath = storage_path('app/public/' . $quotation->user->branch->logo);
if (file_exists($logoPath)) {
$imageData = base64_encode(file_get_contents($logoPath));
$imageType = pathinfo($logoPath, PATHINFO_EXTENSION);
$logoSrc = 'data:image/' . $imageType . ';base64,' . $imageData;
}
}
@endphp
Customer Name:
{{ $quotation->enquiry->cx_name ?? '' }}
Number of Passengers:
@php
// Get passenger data from enquiry
$passengerData = $quotation->enquiry->passenger ?? [];
if (is_array($passengerData)) {
$adults = $passengerData['adults'] ?? 0;
$children = $passengerData['children'] ?? 0;
$infants = $passengerData['infants'] ?? 0;
$youth = $passengerData['youth'] ?? 0;
$total = $passengerData['total'] ?? ($adults + $children + $infants + $youth);
echo $total;
if ($adults > 0 || $children > 0 || $infants > 0 || $youth > 0) {
echo " (Adult: {$adults}, children: {$children}, Infants: {$infants}, Youth: {$youth})";
}
} else {
echo 'N/A';
}
@endphp
Quotation Date:
{{ $quotation->quotation_date ? $quotation->quotation_date->format('d/m/Y') : '' }}
Registered Email Address:
Origin Airport:
{{ $quotation->enquiry->departure ?? '' }}
Destination Airport:
{{ $quotation->enquiry->destination ?? '' }}
Travel Date:
{{ $quotation->travel_date ? $quotation->travel_date->format('d/m/Y') : '' }}
@if(!empty($quotation->itinerary) && count($quotation->itinerary) > 0)
| Date |
Airline |
Flight# |
Depart |
From |
Arrive |
At |
baggage |
@foreach($quotation->itinerary as $flight)
| {{ $flight['date'] ?? '' }} |
{{ $flight['airline'] ?? '' }} |
{{ $flight['flight_no'] ?? '' }} |
{{ $flight['depart_time'] ?? '' }} |
{{ $flight['from'] ?? '' }} |
{{ $flight['arrive_time'] ?? '' }} |
{{ $flight['at'] ?? '' }} |
{{ $flight['baggage'] ?? '' }} |
@endforeach
@endif
@if(!empty($quotation->hotel_details) && count($quotation->hotel_details) > 0)
| Lead Guest |
Hotel |
Check In |
Check Out |
Room Type |
@foreach($quotation->hotel_details as $hotel)
| {{ $hotel['lead_guest'] ?? '' }} |
{{ $hotel['hotel'] ?? '' }} |
{{ $hotel['check_in'] ?? '' }} |
{{ $hotel['check_out'] ?? '' }} |
{{ $hotel['room_type'] ?? '' }} |
@endforeach
@endif
@if(!empty($quotation->transport) && count($quotation->transport) > 0)
| From |
To |
Vehicle Type |
@foreach($quotation->transport as $transport)
| {{ $transport['from'] ?? '' }} |
{{ $transport['to'] ?? '' }} |
{{ $transport['vehicle_type'] ?? '' }} |
@endforeach
@endif
@if(!empty($quotation->visa) && count($quotation->visa) > 0)
| Remarks |
Visa Type |
@foreach($quotation->visa as $visa)
| {{ $visa['remarks'] ?? $visa['name'] ?? '' }} |
{{ $visa['visa_type'] ?? '' }} |
@endforeach
@endif
@if(!empty($quotation->other_details) && count($quotation->other_details) > 0)
| Narrations |
Remarks |
@foreach($quotation->other_details as $detail)
| {{ $detail['narrations'] ?? '' }} |
{{ $detail['remarks'] ?? '' }} |
@endforeach
@endif
@if(!empty($quotation->price))
@php
$price = is_array($quotation->price) ? $quotation->price : [];
@endphp
@if(isset($price['adult']) && $price['adult'] > 0)
Price Per Adult
£{{ number_format($price['adult'], 2) }}
@endif
@if(isset($price['youth']) && $price['youth'] > 0)
Price Per Youth
£{{ number_format($price['youth'], 2) }}
@endif
@if(isset($price['child']) && $price['child'] > 0)
Price Per Child
£{{ number_format($price['child'], 2) }}
@endif
@if(isset($price['infant']) && $price['infant'] > 0)
Price Per Infant
£{{ number_format($price['infant'], 2) }}
@endif
@if(isset($price['total']) && $price['total'] > 0)
Total Package
£{{ number_format($price['total'], 2) }}
@endif
@endif
@if($quotation->note)
Terms and Conditions
{!! $quotation->note !!}
@endif
@php
$productService = $quotation->enquiry->product_service ?? '';
$branchName = $quotation->user->branch->name ?? 'our branch';
$message = '';
if (in_array($productService, ['Hajj Package', 'Umrah Package'])) {
$message = "Thank you for your business with {$branchName}. We wish you a blessed Umrah. Remember us in your prayers.";
} elseif ($productService === 'Flights') {
$message = "Thank you for your business with {$branchName}. We wish you a safe journey.";
} elseif ($productService === 'Hotels') {
$message = "Thank you for your business with {$branchName}. We wish you a safe stay.";
}
@endphp
@if($message)
{{ $message }}
@endif