267 lines
9.3 KiB
PHP
267 lines
9.3 KiB
PHP
@extends('layout')
|
|
|
|
@section('content')
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<div class="ui ordered steps">
|
|
<div class="completed step">
|
|
<div class="content">
|
|
<div class="title">Sitzplatz wählen</div>
|
|
<div class="description">Sitzplatz und Rabatt wählen</div>
|
|
</div>
|
|
</div>
|
|
<div class="completed step">
|
|
<div class="content">
|
|
<div class="title">Dateneingabe</div>
|
|
<div class="description">Login oder Registrierung</div>
|
|
</div>
|
|
</div>
|
|
<div class="active step">
|
|
<div class="content">
|
|
<div class="title">Reservierungsbestätigung</div>
|
|
<div class="description">Ansehen und Reservierung aufgeben!</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h1>Reservierungsübersicht</h1>
|
|
|
|
<?php
|
|
use App\Concession;
|
|
use App\Event;
|
|
use App\Seat;
|
|
use App\User;
|
|
use App\SingleSeat;
|
|
use App\Http\Controllers\BookController;
|
|
|
|
|
|
$amountSeats = isset($book["seat"]) ? sizeof($book["seat"]) : 0;
|
|
if(isset($book["amountSeatsToBook"])){
|
|
$amountSeats += $book["amountSeatsToBook"];
|
|
}
|
|
if(isset($book["amountBuffett"])){
|
|
$amountSeats += $book["amountBuffett"];
|
|
}
|
|
$event = Event::find($book["event_id"]);
|
|
$seat = Seat::find($book["seat_id"]);
|
|
$eventName = $event->title;
|
|
$eventDate = date("d. m. Y", strtotime($seat->date));
|
|
$eventTime = $event->starttime;
|
|
if($eventDate == '15. 03. 2026'){
|
|
$eventTime = '18:00';
|
|
}
|
|
$sumPrice = 0;
|
|
|
|
$my_user = Auth::user();
|
|
if(isset($book["user"])){
|
|
$my_user = User::find($book["user"]);
|
|
}
|
|
?>
|
|
|
|
<div class="ui statistic">
|
|
<div class="value">
|
|
{{$amountSeats}}
|
|
</div>
|
|
<div class="label">
|
|
Karte<?php if($amountSeats>1) echo "n"; ?>
|
|
</div>
|
|
</div>
|
|
|
|
für <h2 style="display: inline">{{$eventName}}</h2> am
|
|
<div class="ui big label">
|
|
<i class="calendar alternate icon"></i> {{$eventDate}}
|
|
</div>
|
|
um
|
|
<div class="ui big label">
|
|
<i class="clock outline icon"></i> {{substr($eventTime,0,5)}}
|
|
</div>
|
|
reservieren
|
|
<table class="ui celled table">
|
|
<thead>
|
|
<tr><th>Sitzplatz</th>
|
|
<th>Ermäßigung</th>
|
|
<th>Preis</th>
|
|
</tr></thead>
|
|
<tbody>
|
|
@inject('CulturecardTrait', 'App\Http\Controllers\BookController')
|
|
<?php
|
|
$atLeastOneTicketCultureCard = false;
|
|
$amountBookSeatCulturecards = 0;
|
|
?>
|
|
@if(isset($book["seat"]))
|
|
@foreach($book["seat"] as $s)
|
|
<tr>
|
|
<?php
|
|
$splitted = explode("_", $s);
|
|
$singleSeat = SingleSeat::where('seat_id',$seat->id)->where('x', $splitted[0])->where('y', $splitted[1])->first();
|
|
$seatName = $singleSeat->calcSeatName();
|
|
?>
|
|
<td>{{$seatName}}</td>
|
|
|
|
|
|
<?php
|
|
$conc = Concession::find($book["concession"][$loop->index]);
|
|
$concName = $conc->name;
|
|
?>
|
|
<td>{{$concName}}</td>
|
|
|
|
|
|
<?php
|
|
$priceAfterConcession = $priceAfterConc[$loop->index];
|
|
|
|
$payTicketWithCulturecard = isset($book["payWithCultureCard"]) && $book["payWithCultureCard"] == "1" && $CulturecardTrait->verifyCultureCard($event, $my_user, $loop->index+1);
|
|
if($payTicketWithCulturecard){
|
|
$amountBookSeatCulturecards += 1;
|
|
$priceAfterConcession = 0;
|
|
}
|
|
$sumPrice += $priceAfterConcession;
|
|
?>
|
|
<td> € {{number_format($priceAfterConcession/100, 2)}}
|
|
@if($payTicketWithCulturecard)
|
|
(wird von Kulturkarte abgezogen)
|
|
<?php
|
|
$atLeastOneTicketCultureCard = true;
|
|
?>
|
|
@endif
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
@endif
|
|
@if(isset($book["amountBuffett"]))
|
|
@for($i=0; $i < $book["amountBuffett"]; $i++)
|
|
<tr>
|
|
<td>
|
|
Sitzplatz bei Tisch mit Buffett
|
|
</td>
|
|
<td></td>
|
|
<?php
|
|
$priceAfterConcession = 8000;
|
|
$sumPrice += $priceAfterConcession;
|
|
?>
|
|
<td>
|
|
€ {{ number_format($priceAfterConcession/100, 2) }}
|
|
</td>
|
|
</tr>
|
|
@endfor
|
|
|
|
{{-- <li>{{$order->amountBuffett}} x Sitzplatz bei Tisch mit Buffett EUR {{ number_format($order->amountBuffett*8000/100, 2) }}</li>--}}
|
|
@endif
|
|
@if(isset($book["amountSeatsToBook"]))
|
|
@for ($i = 0; $i < $book["amountSeatsToBook"]; $i++)
|
|
<tr>
|
|
<td>Freie Platzwahl</td>
|
|
|
|
|
|
<?php
|
|
$conc = Concession::find($book["concession"][$i]);
|
|
$concName = $conc->name;
|
|
?>
|
|
<td>{{$concName}}</td>
|
|
|
|
<?php
|
|
$priceAfterConcession = $priceAfterConc[$i];
|
|
$payTicketWithCulturecard = isset($book["payWithCultureCard"]) && $book["payWithCultureCard"] == "1" && $CulturecardTrait->verifyCultureCard($event, $my_user, $i+1);
|
|
if($payTicketWithCulturecard){
|
|
$priceAfterConcession = 0;
|
|
}
|
|
$sumPrice += $priceAfterConcession;
|
|
?>
|
|
<td> € {{number_format($priceAfterConcession/100, 2)}}
|
|
@if($payTicketWithCulturecard)
|
|
(wird von Kulturkarte abgezogen)
|
|
<?php
|
|
$atLeastOneTicketCultureCard = true;
|
|
?>
|
|
@endif
|
|
</td>
|
|
</tr>
|
|
@endfor
|
|
@endif
|
|
<tr>
|
|
<td></td>
|
|
<td></td>
|
|
<td>
|
|
<?php
|
|
$eventDate = strtotime($seat->date);
|
|
$porto = 1;
|
|
if (($eventDate - time()) / (60 * 60 * 24) <= 3) {
|
|
$porto = 0;
|
|
}
|
|
if($atLeastOneTicketCultureCard){
|
|
$porto = 0;
|
|
}
|
|
?>
|
|
@if($porto == 1)
|
|
<b>€ {{number_format(($sumPrice+150)/100, 2)}}</b> (inkl. € 1.50 Versand)
|
|
@else
|
|
<b>€ {{number_format(($sumPrice)/100, 2)}}</b>
|
|
@endif
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
@if(($eventDate - time()) / (60 * 60 * 24) > 3)
|
|
<div class="ui icon message">
|
|
<i class="envelope outline icon"></i>
|
|
<div class="content">
|
|
<div class="header">
|
|
<?php //Bis 2. September befinden wir uns in der Sommerpause. Die Karten werden Ihnen per Post zugestellt, bitte jedoch um etwas Geduld. ?>
|
|
Die Tickets werden innerhalb von vier Werktagen per Post an folgende Adresse zugestellt:
|
|
</div>
|
|
<p>
|
|
{{Auth::user()->firstname}} {{Auth::user()->lastname}} <br/>
|
|
{{Auth::user()->street}}<br />
|
|
{{Auth::user()->location}}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
@else
|
|
<div class="ui icon message">
|
|
<i class="home icon"></i>
|
|
<div class="content">
|
|
<div class="header">
|
|
Die Tickets werden für Sie an der <b>Abendkassa</b> hinterlegt.
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
|
|
<br />
|
|
<br />
|
|
|
|
{!! Form::open(['url' => 'book']) !!}
|
|
|
|
<?php
|
|
foreach($book as $key => $b){
|
|
if($key != '_token')
|
|
echo '<input type="hidden" name="'.$key.'" value=\''.serialize($b).'\' />';
|
|
}
|
|
echo '<input type="hidden" name="bookingConfirmed" value=\'1\' />';
|
|
?>
|
|
|
|
|
|
<?php
|
|
$stepsToGoBack = isset($book["usedLogin"]) == true ? -2 : -1;
|
|
?>
|
|
<div class="row">
|
|
<div class="col-sm-4">
|
|
<span class="btn btn-secondary" onclick="window.history.go({{$stepsToGoBack}})" >Zurück (Bestellung ändern)</span>
|
|
</div>
|
|
<div class="col-sm-8">
|
|
{!! Form::submit('Kostenpflichtig reservieren', ['class' => 'btn btn-primary form-control', 'id' => 'submit']) !!}
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
{!! Form::close() !!}
|
|
|
|
@endsection
|