@extends('layouts.app') @section('title', 'Category Details - Cash Book') @section('content')

Category Details

Back to List
Name
{{ $category->name }}
Type
{{ ucfirst($category->type) }}
Business
{{ $category->business->name }}
Level
{{ $category->level === 0 ? 'Root Category' : 'Sub-Category (Level ' . $category->level . ')' }}
Parent Category
{{ $category->parent?->name ?? 'None (Root Category)' }}
Full Path
{{ $category->path }}
Description
{{ $category->description ?? 'N/A' }}
Limit
{{ $category->limit ? 'SAR ' . number_format($category->limit, 2) : 'No Limit' }}
Created At
{{ $category->created_at->format('Y-m-d H:i') }}
Updated At
{{ $category->updated_at->format('Y-m-d H:i') }}
@if(in_array(auth()->user()->role, ['super_admin', 'co_admin'])) Edit Category Add Sub-Category @endif
@if($category->children->count() > 0)

Sub-Categories ({{ $category->children->count() }})

@foreach($category->children as $child) @endforeach
Name Type Limit Description Actions
{{ $child->name }} {{ ucfirst($child->type) }} {{ $child->limit ? 'SAR ' . number_format($child->limit, 2) : 'N/A' }} {{ $child->description ?? 'N/A' }}
Edit @if($child->children->count() === 0 && $child->transactions()->count() === 0)
@csrf @method('DELETE')
@endif
@else

No sub-categories found.

Add first sub-category
@endif
@endsection