@extends('layouts.app') @section('title', 'ID formats') @section('content')
@foreach ($formats as $format) @php $nextNumber = $format->reset_policy === 'yearly' && $format->last_reset_year !== $year ? 1 : $format->next_number; @endphp @endforeach
IDCounterPatternNext IDResets
{{ \App\Models\IdFormat::label($format->entity) }} {{ $format->branch?->name ?? 'Whole school' }} {{ $format->pattern }} prefix {{ $format->prefix }}{{ $format->render($nextNumber, $year, $format->branch?->code ?? 'MAIN') }} {{ $format->reset_policy === 'yearly' ? 'every academic year' : 'never' }} Edit @if ($format->branch_id)
@csrf @method('DELETE')
@endif
@if ($branches->isNotEmpty())
@csrf

Separate counter for a branch

By default all branches share one counter. A branch counter starts at 1 and usually includes {BRANCH}.

@endif @endsection