@extends('layouts.admin') @section('title', $ticketType->name . ' - Ticket Type Details') @section('content')

{{ $ticketType->name }}

@if($ticketType->category) {{ $ticketType->category->name }} @endif {{ $ticketType->is_active ? 'Active' : 'Inactive' }} @if($ticketType->requires_approval) Requires Approval @endif
@if(session('success')) @endif @if($ticketType->available_quantity == 0) @endif

${{ number_format($ticketType->base_price, 2) }}

Base Price

{{ number_format($ticketType->total_quantity) }}

Total Quantity

{{ number_format($ticketType->available_quantity) }}

Available
@php $soldQuantity = $ticketType->total_quantity - $ticketType->available_quantity; @endphp

{{ number_format($soldQuantity) }}

Sold
Sales Performance
Pricing Rules
Add Rule
@if(optional($ticketType->pricingRules)->count() > 0)
@foreach($ticketType->pricingRules as $rule) @endforeach
Name Type Price Valid Period Usage Status Actions
{{ $rule->name }} {{ ucwords(str_replace('_', ' ', $rule->type)) }} ${{ number_format($rule->price, 2) }} @if($rule->price < $ticketType->base_price) (-${{ number_format($ticketType->base_price - $rule->price, 2) }}) @endif @if($rule->start_date && $rule->end_date) {{ $rule->start_date->format('M j') }} - {{ $rule->end_date->format('M j, Y') }} @elseif($rule->start_date) From {{ $rule->start_date->format('M j, Y') }} @elseif($rule->end_date) Until {{ $rule->end_date->format('M j, Y') }} @else Always @endif @if($rule->usage_limit) {{ $rule->usage_count }}/{{ $rule->usage_limit }} @php $usagePercent = ($rule->usage_count / $rule->usage_limit) * 100; @endphp
@else {{ $rule->usage_count }} uses @endif
{{ $rule->is_active ? 'Active' : 'Inactive' }}
@csrf @method('PATCH')
@else

No pricing rules configured.

Create First Pricing Rule
@endif
Recent Inventory Changes
View All Logs
@if($ticketType->inventoryLogs->count() > 0)
@foreach($ticketType->inventoryLogs->take(5) as $log)
{{ ucfirst($log->action) }} by {{ $log->quantity }} {{ $log->created_at->diffForHumans() }}

{{ $log->previous_quantity }} → {{ $log->new_quantity }} @if($log->reason)
{{ $log->reason }} @endif

@if($log->user) by {{ $log->user->name }} @endif
@endforeach
@else

No inventory changes recorded.

@endif
Quick Stats
@php $sellThroughRate = $ticketType->total_quantity > 0 ? (($soldQuantity / $ticketType->total_quantity) * 100) : 0; $stockLevel = $ticketType->total_quantity > 0 ? (($ticketType->available_quantity / $ticketType->total_quantity) * 100) : 0; @endphp
Sell-through Rate {{ round($sellThroughRate) }}%
Stock Level {{ round($stockLevel) }}%

{{ $ticketType->min_quantity_per_order }}

Min Order

{{ $ticketType->max_quantity_per_order ?? '∞' }}

Max Order
Ticket Details
Event:
{{ $ticketType->event->name }}
SKU:
{{ $ticketType->slug }}
@if($ticketType->description)
Description:
{{ $ticketType->description }}
@endif
Created:
{{ $ticketType->created_at->format('M j, Y g:i A') }}
Last Updated:
{{ $ticketType->updated_at->format('M j, Y g:i A') }}
Sale Period
@if($ticketType->sale_start_date || $ticketType->sale_end_date)
@if($ticketType->sale_start_date)
Start:
{{ $ticketType->sale_start_date->format('M j, Y g:i A') }} @if($ticketType->sale_start_date->isFuture()) (Future) @elseif($ticketType->sale_start_date->isPast()) (Active) @endif
@endif @if($ticketType->sale_end_date)
End:
{{ $ticketType->sale_end_date->format('M j, Y g:i A') }} @if($ticketType->sale_end_date->isFuture()) ({{ $ticketType->sale_end_date->diffForHumans() }}) @elseif($ticketType->sale_end_date->isPast()) (Expired) @endif
@endif
@else

Always available for sale

@endif
Access Permissions
@if($ticketType->access_permissions && count($ticketType->access_permissions) > 0)
@foreach($ticketType->access_permissions as $permission)
{{ ucwords(str_replace('_', ' ', $permission)) }}
@endforeach
@else

Everyone (Public)

@endif
Quick Actions
Add Pricing Rule @if($ticketType->is_active)
@csrf @method('PUT')
@else
@csrf @method('PUT')
@endif
@endsection @push('styles') @endpush @push('scripts') @endpush