@extends('layouts.app') @section('title', $batch->name) @section('content')

{{ $batch->name }}

{{ $batch->batch_number }} · {{ $batch->plan?->name }} · {{ $batch->location?->name }}

Export CSV
@include('components.kpi', ['label' => 'Total vouchers', 'value' => $batch->quantity, 'variant' => 'info', 'href' => '#']) @include('components.kpi', ['label' => 'Available', 'value' => $batch->vouchers()->where('status', 'available')->count(), 'variant' => 'good', 'href' => '#']) @include('components.kpi', ['label' => 'Sold', 'value' => $batch->vouchers()->where('status', 'sold')->count(), 'href' => '#']) @include('components.kpi', ['label' => 'Used', 'value' => $batch->vouchers()->where('status', 'used')->count(), 'href' => '#']) @include('components.kpi', ['label' => 'Revenue', 'value' => money($batch->vouchers()->where('status', '!=', 'available')->sum('price')), 'variant' => 'good', 'href' => '#']) @include('components.kpi', ['label' => 'Valid until', 'value' => $batch->valid_until?->format('d M Y') ?? '—', 'href' => '#'])

Vouchers in this batch

{{ $batch->vouchers()->count() }} code(s)
@foreach ($batch->vouchers as $voucher)
{{ $voucher->code }}
{{ money($voucher->price) }} · {{ $voucher->status }}
@endforeach
@endsection