mein-sterntours/resources/views/pdf/components/booking_drafs_oldblade.php
Kevin Adametz 881fc84207 08 2024
2024-08-05 11:58:09 +02:00

174 lines
No EOL
8.8 KiB
PHP

<table border="0" cellspacing="0" cellpadding="0" width="100%" class="booking-table">
<tr>
<th width="10%">Art</th>
<th width="35%">Leistungen</th>
<th width="10%" align="center">Von</th>
<th width="10%" align="center">Bis</th>
<th width="15%" align="center">Teilnehmer</th>
<th width="15%" align="center">Preis in EUR</th>
</tr>
@if($booking->new_drafts)
foreach($booking->booking_draft_items as $booking_draft_item)
@if($booking_draft_item->in_pdf)
@if(in_array($booking_draft_item->draft_type_id, array('26', '30', '31', '32', '33', '34', '35', '36', '37', '41', '42')))
{{-- /*
//Rundreise
@if($form["draft_type_id"]->getValue() == 24)
@endif
//Preisinfo
@if($form["draft_type_id"]->getValue() == 26)
@endif
//Preis info Hotel
@if($form["draft_type_id"]->getValue() == 30)
@endif
//Preis info Leistungen
@if($form["draft_type_id"]->getValue() == 31)
pro Person:
$set_price_info_field = ['data-pi_field' => 'service'];
@endif
//Preis info Kategorie
@if($form["draft_type_id"]->getValue() == 32)
@endif */
--}}
<tr>
<td width="10%" ><strong>{{ $booking_draft_item->draft_type->name }}</strong></td>
<td width="35%">{{ $booking_draft_item->service }}</td>
<td width="10%" align="center">{{ _format_date($booking_draft_item->start_date) }}</td>
<td width="10%" align="center">{{ _format_date($booking_draft_item->end_date) }}</td>
<td width="15%" align="right" >
@if(in_array($booking_draft_item->draft_type_id, array('30', '36', '37')))
@if($booking_draft_item->adult > 0)
{{ ($booking_draft_item->adult == 1 ? $booking_draft_item->adult.' Erwachsener' : $booking_draft_item->adult.' Erwachsene') }}
@endif
@if($booking_draft_item->children > 0)
<br>
{{ ($booking_draft_item->children == 1 ? $booking_draft_item->children.' Kind' : $booking_draft_item->children.' Kinder') }}
@endif
@else
@if($booking_draft_item->adult > 0)
{{ ($booking_draft_item->adult == 1 ? $booking_draft_item->adult.' Person' : $booking_draft_item->adult.' Personen') }}
@endif
@endif
@if($booking_draft_item->adult > 0 || $booking_draft_item->children > 0)
<br>
@if($booking_draft_item->draft_type_id == 36 || $booking_draft_item->draft_type_id == 37)
<strong>Gesamt {{ $booking_draft_item->days_duration }} {{ ($booking_draft_item->days_duration == 1 ? 'Tag' : 'Tage') }} </strong>
@else
<strong>Gesamt:</strong>
@endif
@endif
</td>
<td width="15%" align="right">
@if($booking_draft_item->adult > 0)
{{ $booking_draft_item->price_adult }}
@endif
@if($booking_draft_item->children > 0)
<br>
{{ $booking_draft_item->price_children }}
@endif
@if($booking_draft_item->adult > 0 || $booking_draft_item->children > 0)
<br>
<strong> $booking_draft_item->getItemPrice('total') </strong>
@endif
</td>
</tr>
@elseif($booking_draft_item->draft_type_id == 27)
<tr>
<td width="10%" ></td>
<td width="35%"> {{ $booking_draft_item->service }}</td>
<td width="10%" align="center"> {{ _format_date($booking_draft_item->start_date) }}</td>
<td width="10%" align="center"> {{ _format_date($booking_draft_item->end_date) }}</td>
<td width="15%" align="center"> {{ $booking->getPax()}}</td>
<td width="15%" align="right"></td>
</tr>
@else
<tr>
<td width="10%" ><strong> {{ $booking_draft_item->getDraftType()->getName() }}</td>
<td width="35%"> {{ $booking_draft_item->service }}</td>
<td width="10%" align="center"> {{ _format_date($booking_draft_item->start_date) }}</td>
<td width="10%" align="center"> {{ _format_date($booking_draft_item->end_date) }}</td>
<td width="15%" align="center"> {{ $booking->getPax()}}</td>
<td width="15%" align="right"></td>
</tr>
@endif
@endif
@endforeach
@else
@foreach($booking->getArrangement() as $arrangement)
@if($arrangement->getInPdf())
$data = $arrangement->getDataAsMap() }}
}}
@if($arrangement->getArrangementType()->getName() == 'Preisinformation')
<tr>
<td width="10%"><strong>Preis</strong></td>
<td width="35%"> {{ $data['Name'] }}</td>
<td width="10%" align="center"></td>
<td width="10%" align="center"></td>
<td width="15%" align="center"> {{ $data['Teilnehmer'] }}</td>
<td width="15%" align="right"> {{ $data['Preis'], '€') }}</td>
</tr>
<tr>
<td width="10%"><strong>Preis</strong></td>
<td width="35%">Für {{ $data['Teilnehmer'] }} {{ $data['Teilnehmer'] > 1 ? 'Personen' : 'Person' }}</td>
<td width="10%" align="center"></td>
<td width="10%" align="center"></td>
<td width="15%" align="center"></td>
<td width="15%" align="right"><strong> {{ $data['Preis'] * (float)$data['Teilnehmer'], '€') }}</strong></td>
</tr>
@elseif($arrangement->getArrangementType()->getName() == 'Text')
<tr>
<td width="10%"></td>
<td width="35%"> {{ $arrangement->getDataS() }}</td>
<td width="10%" align="center"> {{ _format_date($arrangement->getBegin()) }}</td>
<td width="10%" align="center"> {{ _format_date($arrangement->getEnd()) }}</td>
<td width="15%" align="center"> {{ array_key_exists('Teilnehmer', $data) ? $data['Teilnehmer'] : '' }}</td>
<td width="15%" align="right"></td>
</tr>
@else
<tr>
<td width="10%"> {{ $arrangement->getArrangementType()->getName() }}</td>
<td width="35%"> {{ $arrangement->getDataS() }}</td>
<td width="10%" align="center"> {{ _format_date($arrangement->getBegin()) }}</td>
<td width="10%" align="center"> {{ _format_date($arrangement->getEnd()) }}</td>
<td width="15%" align="center"> {{ array_key_exists('Teilnehmer', $data) ? $data['Teilnehmer'] : $booking->getPax() }}</td>
<td width="15%" align="right"></td>
</tr>
@endif
@endif
@endforeach
@endif
<tr>
<td width="10%"><strong>Gesamtpreis</strong></td>
<td width="35%"></td>
<td width="10%"></td>
<td width="10%"></td>
<td width="15%"></td>
<td width="15%" align="right"><u><strong> {{ format_currency($booking->getPrice(), '€') }}</strong></u></td>
</tr>
<tr>
<td width="10%">&nbsp;</td>
<td width="35%">&nbsp;</td>
<td width="10%">&nbsp;</td>
<td width="10%">&nbsp;</td>
<td width="15%">&nbsp;</td>
<td width="15%">&nbsp;</td>
</tr>
@foreach($booking->getBookingServiceItems() as $serviceItem)
@if($serviceItem->getTravelCompany()->getName() == 'ELVIA')
<tr>
<td width="10%">Reiseversicherung</td>
<td width="35%"> {{ $serviceItem->getName() }}</td>
<td width="10%" align="center"></td>
<td width="10%" align="center"></td>
<td width="15%" align="center"></td>
<td width="15%" align="right"><strong> {{ format_currency($serviceItem->getServicePrice(), '€') }}</strong></td>
</tr>
@endif
@endforeach
</table>
<br />