@extends('layouts.admin') @section('title', 'Branch Reports') @section('content')
@foreach(['Global Branch Orders' => $global['orders'], 'Global Revenue' => number_format($global['revenue'], 2), 'Branch Commission' => number_format($global['branch_commission'], 2), 'Admin Commission' => number_format($global['admin_commission'], 2)] as $label => $value)
{{ $label }}

{{ $value }}

@endforeach
@if($analytics)
@foreach(['Total Orders' => $analytics['total_orders'], 'Completed Orders' => $analytics['completed_orders'], 'Cancelled Orders' => $analytics['cancelled_orders'], 'Refunded Orders' => $analytics['refunded_orders'], 'Revenue' => number_format($analytics['revenue'], 2), 'Wallet Balance' => number_format($analytics['wallet_balance'], 2), 'Driver Count' => $analytics['driver_count'], 'Store Count' => $analytics['restaurant_count']] as $label => $value)
{{ $label }}
{{ $value }}
@endforeach
Top Stores
@foreach($analytics['top_restaurants'] as $restaurant)
{{ $restaurant->name }}{{ $restaurant->orders_count }}
@endforeach
Top Drivers
@foreach($analytics['top_drivers'] as $driver)
{{ $driver->name }}{{ $driver->orders_count }}
@endforeach
@endif @endsection