@extends('layouts.admin') @section('title', 'Branches') @section('content')
@foreach(['Total Branches' => $stats['total'], 'Active Branches' => $stats['active'], 'Assigned Stores' => $stats['restaurants'], 'Wallet Balance' => number_format($stats['wallet_balance'], 2)] as $label => $value)
{{ $label }}

{{ $value }}

@endforeach
@forelse($branches as $branch) @empty @endforelse
BranchOwnerLocationCommission SplitStoresWalletStatus
{{ $branch->name }}
{{ $branch->code }}
{{ $branch->owner_name }}
{{ $branch->owner_email }}
{{ collect([$branch->city, $branch->state, $branch->country])->filter()->join(', ') ?: 'Not set' }} {{ $branch->branch_share_percent }}% branch
{{ number_format(100 - (float) $branch->branch_share_percent, 2) }}% admin remainder
{{ $branch->restaurants_count }} {{ number_format($branch->wallet?->balance ?? 0, 2) }} {{ ucfirst($branch->status) }}
@csrf @method('DELETE')
No branches found.
@endsection