Files
api-extranetwork/resources/views/pdf/priceComparison.blade.php
ExtraNetwork e5c4b6aa13 first commit
2026-05-12 17:04:54 +03:00

93 lines
6.8 KiB
PHP

<html>
<head>
<title>Property</title>
<meta charset="UTF-8">
@if(empty($userDetail))
<style>
body { font-family: 'Calibri'; font-size: 12px; }
table { width: 100%; border-collapse: collapse; margin-top: 20px; font-size: 12px; }
th, td { border: 1px solid #ddd; padding: 8px; }
.mainContainer {width: 800px; margin: 0 auto;}
</style>
@else
<style>
body { font-family: 'Gilroy'; font-size: 12px; }
table { width: 100%; border-collapse: collapse; margin-top: 20px; }
th, td { border: 1px solid #ddd; padding: 8px; }
</style>
@endif
</head>
<body>
<div class="mainContainer">
<table>
<tr>
<td style="border: none; border-bottom: 1px solid #DDD;"><h3>Property Comparison</h3></td>
<td style="border: none; text-align: right; border-bottom: 1px solid #DDD;">
@if(!empty($userDetail))
<strong>{{$userDetail['nameSurname']}}</strong> <br>
@endif
{{ \Carbon\Carbon::parse(reset($propertyPriceComparison)['date'])->format('d.m.Y') }}
</td>
</tr>
</table>
<table>
<thead>
<tr>
<th style="text-align: left;">Property</th>
<th style="text-align: left;">Channel</th>
<th>+1 Day</th>
<th>+15 Day</th>
<th>+45 Day</th>
<th>+90 Day</th>
</tr>
</thead>
<tbody>
<?php //$propertyPriceComparison = collect($propertyPriceComparison)->where('property_id',696)->toArray(); ?>
@foreach($propertyPriceComparison as $property)
<tr>
<td rowspan="4" style="font-weight: bold;">{{$property['property_detail']['name']}}</td>
<td><strong>Extranetwork</strong></td>
<td style="text-align: center; font-weight: bold; @if($property['dataArray']['BookingEngine'][1]['bestPrice']) background-color: #149E45; color: #FFF; @endif">@if(!empty($property['dataArray']['BookingEngine'][1]['amount'])) {{$property['dataArray']['BookingEngine'][1]['amount']}} EUR @else - @endif</td>
<td style="text-align: center; font-weight: bold; @if($property['dataArray']['BookingEngine'][15]['bestPrice']) background-color: #149E45; color: #FFF; @endif">@if(!empty($property['dataArray']['BookingEngine'][15]['amount'])) {{$property['dataArray']['BookingEngine'][15]['amount']}} EUR @else - @endif</td>
<td style="text-align: center; font-weight: bold; @if($property['dataArray']['BookingEngine'][45]['bestPrice']) background-color: #149E45; color: #FFF; @endif">@if(!empty($property['dataArray']['BookingEngine'][45]['amount'])) {{$property['dataArray']['BookingEngine'][45]['amount']}} EUR @else - @endif</td>
<td style="text-align: center; font-weight: bold; @if($property['dataArray']['BookingEngine'][90]['bestPrice']) background-color: #149E45; color: #FFF; @endif">@if(!empty($property['dataArray']['BookingEngine'][90]['amount'])) {{$property['dataArray']['BookingEngine'][90]['amount']}} EUR @else - @endif</td>
</tr>
<tr>
<td>Agoda.com</td>
<td style="text-align: center; font-weight: bold; @if($property['dataArray']['Agoda.com'][1]['bestPrice']) background-color: #CC0918; color: #FFF; @endif">@if(!empty($property['dataArray']['Agoda.com'][1]['amount'])) {{$property['dataArray']['Agoda.com'][1]['amount']}} EUR @else - @endif</td>
<td style="text-align: center; font-weight: bold; @if($property['dataArray']['Agoda.com'][15]['bestPrice']) background-color: #CC0918; color: #FFF; @endif">@if(!empty($property['dataArray']['Agoda.com'][15]['amount'])) {{$property['dataArray']['Agoda.com'][15]['amount']}} EUR @else - @endif</td>
<td style="text-align: center; font-weight: bold; @if($property['dataArray']['Agoda.com'][45]['bestPrice']) background-color: #CC0918; color: #FFF; @endif">@if(!empty($property['dataArray']['Agoda.com'][45]['amount'])) {{$property['dataArray']['Agoda.com'][45]['amount']}} EUR @else - @endif</td>
<td style="text-align: center; font-weight: bold; @if($property['dataArray']['Agoda.com'][90]['bestPrice']) background-color: #CC0918; color: #FFF; @endif">@if(!empty($property['dataArray']['Agoda.com'][90]['amount'])) {{$property['dataArray']['Agoda.com'][90]['amount']}} EUR @else - @endif</td>
</tr>
<tr>
<td>etstur.com</td>
<td style="text-align: center; font-weight: bold; @if($property['dataArray']['etstur.com'][1]['bestPrice']) background-color: #CC0918; color: #FFF; @endif">@if(!empty($property['dataArray']['etstur.com'][1]['amount'])) {{$property['dataArray']['etstur.com'][1]['amount']}} EUR @else - @endif</td>
<td style="text-align: center; font-weight: bold; @if($property['dataArray']['etstur.com'][15]['bestPrice']) background-color: #CC0918; color: #FFF; @endif">@if(!empty($property['dataArray']['etstur.com'][15]['amount'])) {{$property['dataArray']['etstur.com'][15]['amount']}} EUR @else - @endif</td>
<td style="text-align: center; font-weight: bold; @if($property['dataArray']['etstur.com'][45]['bestPrice']) background-color: #CC0918; color: #FFF; @endif">@if(!empty($property['dataArray']['etstur.com'][45]['amount'])) {{$property['dataArray']['etstur.com'][45]['amount']}} EUR @else - @endif</td>
<td style="text-align: center; font-weight: bold; @if($property['dataArray']['etstur.com'][90]['bestPrice']) background-color: #CC0918; color: #FFF; @endif">@if(!empty($property['dataArray']['etstur.com'][90]['amount'])) {{$property['dataArray']['etstur.com'][90]['amount']}} EUR @else - @endif</td>
</tr>
<tr>
<td>Booking.com</td>
<td style="text-align: center; font-weight: bold; @if($property['dataArray']['Booking.com'][1]['bestPrice']) background-color: #CC0918; color: #FFF; @endif">@if(!empty($property['dataArray']['Booking.com'][1]['amount'])) {{$property['dataArray']['Booking.com'][1]['amount']}} EUR @else - @endif</td>
<td style="text-align: center; font-weight: bold; @if($property['dataArray']['Booking.com'][15]['bestPrice']) background-color: #CC0918; color: #FFF; @endif">@if(!empty($property['dataArray']['Booking.com'][15]['amount'])) {{$property['dataArray']['Booking.com'][15]['amount']}} EUR @else - @endif</td>
<td style="text-align: center; font-weight: bold; @if($property['dataArray']['Booking.com'][45]['bestPrice']) background-color: #CC0918; color: #FFF; @endif">@if(!empty($property['dataArray']['Booking.com'][45]['amount'])) {{$property['dataArray']['Booking.com'][45]['amount']}} EUR @else - @endif</td>
<td style="text-align: center; font-weight: bold; @if($property['dataArray']['Booking.com'][90]['bestPrice']) background-color: #CC0918; color: #FFF; @endif">@if(!empty($property['dataArray']['Booking.com'][90]['amount'])) {{$property['dataArray']['Booking.com'][90]['amount']}} EUR @else - @endif</td>
</tr>
<tr><td colspan="6" style="height: 3px; border-right: none; border-left: none; border-bottom: none;"></td></tr>
@endforeach
</tbody>
</table>
</div>
</body>
</html>