@extends('layouts.app') @section('title', $branch->name) @section('page-title', $branch->name) @section('content') {{-- KPI Cards --}}
${{ number_format($todaySales, 2) }}
Today's Sales
${{ number_format($monthlySales, 2) }}
This Month
{{ number_format($totalSales) }}
Total Sales
{{ $lowStock }}
Low Stock Items
{{-- Left column --}}
{{-- Monthly trend chart --}}
Revenue Trend (Last 6 Months)
{{-- Recent Sales --}}
Recent Sales
View All →
@forelse($recentSales as $sale) @empty @endforelse
Invoice Customer Amount (USD) Date
{{ $sale->invoice_number }} {{ $sale->customer?->name ?? 'Walk-in' }} ${{ number_format($sale->total_usd, 2) }} {{ $sale->sale_date->format('M j, H:i') }}
No sales recorded yet.
{{-- Right column --}}
{{-- Top 3 Trending Products --}}
Top Trending
This month at this branch
@forelse($topProducts as $i => $product)
{{ $i + 1 }}
{{ $product->name }}
{{ number_format($product->total_qty) }} units sold
${{ number_format($product->total_revenue, 2) }}
@empty

No sales this month yet.

@endforelse
{{-- Branch info card --}}
Branch Info
@if($branch->address)
{{ $branch->address }}
@endif @if($branch->phone)
{{ $branch->phone }}
@endif @if($branch->email)
{{ $branch->email }}
@endif @if($branch->manager_name)
{{ $branch->manager_name }}
@endif
Branch code: {{ $branch->code }}
Staff {{ $branch->users->count() }} users
Products {{ $branch->products->count() }} SKUs
@endsection @push('scripts') @endpush