@extends('layouts.app') @section('title', 'Performance Report - Tiqkets') @section('page-title', 'Performance Report') @section('header-action')
@if(request('search')) @endif @if(request('outlet_id')) @endif @if(request('date_range')) @endif
@endsection @section('content')
@if(count($tableData) > 0)
@foreach($tableData as $data) @php $successRate = $data['total_orders'] > 0 ? round(($data['delivered'] / $data['total_orders']) * 100, 1) : 0; @endphp @endforeach
Date Outlet Name Total Orders Delivered Cancelled Pending Success Rate
{{ $data['date'] }}
{{ $data['outlet_name'] }}
{{ $data['total_orders'] }} {{ $data['delivered'] }} {{ $data['cancelled'] }} {{ $data['pending'] }} {{ $successRate }}%

{{ collect($tableData)->sum('total_orders') }}

Total Orders

{{ collect($tableData)->sum('delivered') }}

Delivered

{{ collect($tableData)->sum('cancelled') }}

Cancelled
@php $totalOrders = collect($tableData)->sum('total_orders'); $delivered = collect($tableData)->sum('delivered'); $overallRate = $totalOrders > 0 ? round(($delivered / $totalOrders) * 100, 1) : 0; @endphp

{{ $overallRate }}%

Success Rate
@else
No Data Found

No performance data available for the selected filters.

Reset Filters
@endif
@endsection @push('styles') @endpush @push('scripts') @endpush