@extends('backend.layout') @section('content')
{{ __('Tickets') }}
@if (session()->has('course_status_warning'))

{{ session()->get('course_status_warning') }}

@endif @if (count($information['tickets']) == 0)

{{ __('NO TICKET FOUND ') . '!' }}

@else
@foreach ($information['tickets'] as $ticket) @endforeach
{{ __('Title') }} {{ __('Tickets Available') }} {{ __('Price') }} {{ __('Actions') }}
@php $ticket_content = App\Models\Event\TicketContent::where([['language_id', $information['language']['id']], ['ticket_id', $ticket->id]])->first(); if (empty($ticket_content)) { $ticket_content = App\Models\Event\TicketContent::where('ticket_id', $ticket->id)->first(); } @endphp {{ @$ticket_content->title }} @if ($ticket->pricing_type == 'variation') @php $variation = json_decode($ticket->variations, true); @endphp @foreach ($variation as $v) @if ($v['ticket_available_type'] == 'unlimited') {{ __('Unlimited') }} @else {{ $v['ticket_available'] }} @endif @if (!$loop->last) , @endif @endforeach @else @if ($ticket->ticket_available_type == 'unlimited') {{ $ticket->ticket_available_type }} @else {{ $ticket->ticket_available }} @endif @endif @if ($ticket->pricing_type == 'normal') @if ($ticket->early_bird_discount == 'enable') @php $discount_date = Carbon\Carbon::parse($ticket->early_bird_discount_date . $ticket->early_bird_discount_time); @endphp @if ($ticket->early_bird_discount_type == 'fixed' && !$discount_date->isPast()) @php $calculate_price = $ticket->price - $ticket->early_bird_discount_amount; @endphp {{ symbolPrice($calculate_price) }} {{ symbolPrice($ticket->price) }} @elseif ($ticket->early_bird_discount_type == 'percentage' && !$discount_date->isPast()) @php $c_price = ($ticket->price * $ticket->early_bird_discount_amount) / 100; $calculate_price = $ticket->price - $c_price; @endphp {{ symbolPrice($calculate_price) }} {{ symbolPrice($ticket->price) }} @else @php $calculate_price = $ticket->price; @endphp {{ symbolPrice($calculate_price) }} @endif @else {{ symbolPrice($ticket->price) }} @endif @elseif ($ticket->pricing_type == 'variation') @php $variation = json_decode($ticket->variations, true); @endphp @foreach ($variation as $v) @if ($ticket->early_bird_discount == 'enable') @php $discount_date = Carbon\Carbon::parse($ticket->early_bird_discount_date . $ticket->early_bird_discount_time); @endphp @if ($ticket->early_bird_discount_type == 'fixed' && !$discount_date->isPast()) @php $calculate_price = $v['price'] - $ticket->early_bird_discount_amount; @endphp {{ symbolPrice($calculate_price) }} {{ symbolPrice($v['price']) }} @elseif ($ticket->early_bird_discount_type == 'percentage' && !$discount_date->isPast()) @php $c_price = ($v['price'] * $ticket->early_bird_discount_amount) / 100; $calculate_price = $v['price'] - $c_price; @endphp {{ symbolPrice($calculate_price) }} {{ symbolPrice($v['price']) }} @else @php $calculate_price = $v['price']; @endphp {{ symbolPrice($calculate_price) }} @endif @if (!$loop->last) , @endif @else {{ symbolPrice($v['price']) }} @if (!$loop->last) , @endif @endif @endforeach @elseif ($ticket->pricing_type == 'free') {{ __('Free') }} @endif
@endif
@endsection