@extends('layouts.admin') @section('title', 'Create CA') @section('content')

Create Chartered Accountant

@csrf {{-- Basic Info --}}

{{-- Access Section --}}

Select Access (Company → Year → Category → Months)

@foreach($structure as $comp)

@foreach($comp->years as $yr)

{{-- ✅ Expiry per year --}}
@foreach($yr->categories as $cat)
📂 {{ $cat->category->name }} @php $is_purchase = $cat->category->companySubFolders->isNotEmpty(); $is_expenses = $cat->category->subcategories->isNotEmpty(); @endphp @if($is_purchase) {{-- Purchase Months --}}
@foreach($cat->months as $m)
@endforeach
{{-- Parties grouped by month --}} @foreach($cat->months as $m) @if(isset($cat->month_parties[$m->id]) && count($cat->month_parties[$m->id]) > 0) @endif @endforeach @elseif($is_expenses) {{-- Expense Months --}}
@foreach($cat->months as $m)
@endforeach
{{-- Expense Subcategories --}} @foreach($cat->months as $m) @endforeach @else {{-- Default Category Months --}}
@foreach($cat->months as $m)
@endforeach
@endif
@endforeach
@endforeach
@endforeach
{{-- Submit --}}
{{-- SweetAlert2 --}} @endsection