@extends('layouts.admin') @section('content')
Salesperson Sales Detail 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 $grandTotal = 0; @endphp @foreach ($reportData as $key => $data) @php $grandTotal += $data->amount; @endphp @endforeach
Product Quantity Amount (RM)
{{ $data->product_name }} {{ $data->quantity }} {{ number_format($data->amount, 2, '.','') }}
Grand Total: {{ number_format($grandTotal, 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