@extends('layouts.admin') @section('content')
Sales Summary Reports
@if($errors->has('date_from'))
{{ $errors->first('date_from') }}
@endif
@if($errors->has('date_to'))
{{ $errors->first('date_to') }}
@endif
{{-- @cannot('isWarehouse')
@if($errors->has('warehouse'))
{{ $errors->first('warehouse') }}
@endif
@endcannot --}}
@isset ($reportData)
@php $total_utd_amount = 0; $total_today_amt = 0; @endphp @foreach ($reportData as $key => $data) @php $total_utd_amount += $data->utd_amount; $total_today_amt += $data->today_amt; @endphp @endforeach
Name Total Amount Today Amount
{{ $data->name }} RM {{ number_format($data->utd_amount, 2, '.', '') }}RM {{ number_format($data->today_amt, 2, '.', '') }}
Grand Total: RM {{ number_format($total_utd_amount, 2, '.', '') }} RM {{ number_format($total_today_amt, 2, '.', '') }}
@else

There is no any data currently.

@endisset {{-- @if ($reportData)
@foreach ($reportData as $mainKey => $mainData) @foreach($mainData['availableStores'] as $subKey => $availableStore) @endforeach @if(!$loop->last) @endif @endforeach
No. Merchandiser Name Date Visited Number of merchant visited
{{ $mainKey + 1 }} {{ $mainData['employee_name'] }} {{ $mainData['date'] }} {{ $mainData['number_merchants'] }}
{{ $availableStore['store_name'] }} @foreach ($availableStore['products'] as $key => $product) @endforeach
# Product Name Quantity
{{ $key + 1 }} {{ $product['product_name'] }} {{ $product['quantity'] }}
{{ $availableStore['feedback'] }}
@else @endif --}}
@endsection @section('scripts') @parent {{-- --}} @endsection