@extends('layouts.admin') @section('title', 'Branch Dashboard') @section('header', 'Branch Dashboard') @php $currencySymbol = App\Models\AppSetting::getValue('currency_symbol', 'Rs'); $decimals = App\Models\AppSetting::currencyDecimals(); $avgOrderValue = $stats['orders'] > 0 ? $stats['revenue'] / max($stats['orders'], 1) : 0; $statusClass = fn ($status) => str_replace('_', '-', strtolower($status ?? 'pending')); @endphp @section('styles') @endsection @section('content')
{{ ucfirst($branch->status) }} branch covering restaurants, drivers, territories, wallet, settlements, and live branch orders.
| Order | Store | Driver | Status | Total | Credited Earnings |
|---|---|---|---|---|---|
|
#{{ $order->order_number ?? $order->id }}
{{ $order->created_at?->format('d M Y, h:i A') }}
|
{{ $order->restaurant?->name ?? 'N/A' }} | {{ $order->driver?->name ?? 'Unassigned' }} | {{ ucfirst(str_replace('_', ' ', $order->status ?? 'pending')) }} | {{ $currencySymbol }}{{ number_format($order->total, $decimals) }} |
{{ $currencySymbol }}{{ number_format($order->branch_commission_settled ? $order->branch_commission : 0, $decimals) }}
@unless($order->branch_commission_settled)
Pending delivery
@endunless
|
| No branch orders found yet. | |||||
| Settlement | Period | Gross | Branch Earnings | Net | Status |
|---|---|---|---|---|---|
| {{ $settlement->settlement_number }} | {{ $settlement->period_start?->format('d M Y') }} - {{ $settlement->period_end?->format('d M Y') }} | {{ $currencySymbol }}{{ number_format($settlement->gross_orders, $decimals) }} | {{ $currencySymbol }}{{ number_format($settlement->branch_commission, $decimals) }} | {{ $currencySymbol }}{{ number_format($settlement->amount, $decimals) }} | {{ ucfirst(str_replace('_', ' ', $settlement->status)) }} |
| No settlements generated yet. | |||||