@extends('operations.layout.mainlayout') @section('content')

Sales Forecast

Forecast Parameters

Branch
Year
Yearly Target

Current Year Overview

Monthly Target {{ number_format($monthly_target, 2) }}
Required Monthly {{ number_format($balance['monthly_required'], 2) }}

Forecast Analysis

@foreach($forecast as $branch)
{{ $branch->NAME_EN }} Forecast: {{ number_format($branch->forecast_amount ?? 0, 2) }}
Monthly Avg: {{ number_format($branch->AVG_AMOUNT ?? 0, 2) }}
@endforeach

Monthly Breakdown (2024)

@foreach($current as $sale) @endforeach
Month Branch Sales Amount Orders Patients Avg Per Order Target Balance
{{ Carbon\Carbon::createFromFormat('m', $sale->MONTH)->format('F') }} {{ $sale->NAME_EN }} {{ number_format($sale->TOTAL_AMOUNT, 2) }} {{ $sale->TOTALS }} {{ $sale->PATIENT_COUNT }} {{ number_format($sale->AVG_PER_ORDER, 2) }} {{ number_format($monthly_target, 2) }} {{ number_format($monthly_target - $sale->TOTAL_AMOUNT, 2) }}

Historical Performance

@foreach($historical as $history) @endforeach
Year Branch Total Sales Total Orders Total Patients Avg Per Order
{{ Carbon\Carbon::parse($history->PAID_TIME)->format('Y') }} {{ $history->NAME_EN }} {{ number_format($history->TOTAL_AMOUNT, 2) }} {{ $history->TOTALS }} {{ $history->PATIENT_COUNT }} {{ number_format($history->AVG_PER_ORDER, 2) }}
@endsection @section('scripts') @endsection