@extends('layouts.dashboard') @section('dash_nav') @include('client_view.home_dashboard.main_navs',['active'=>'interval_dashboard']) @endsection @section('css') @endsection @section('content')

{{ __('Dashboard Results') }}

@csrf
{{--
--}}
{{-- Title --}} {{--

{{__('Products Items Sales Interval Comparing Analysis')}}

--}} {{-- FIRST CARD --}}
@php $i = 0 @endphp @php $k = 0 @endphp @foreach ($intervalComparing as $theType => $intervals)

{{ (ucfirst(str_replace('_',' ' ,$theType))) . ' Sales Interval Comparing Analysis ' }}

@foreach ($intervals as $intervalName => $data )
@include('interval_date' , ['k'=>$k % 2 ])
@slot('table_header') # {{ __('Product Items')}} {{ __('Sales Values') }} {{ __('Percentages %') }} @endslot @slot('table_body') @php $total = array_sum(array_column($data,'Sales Value')) @endphp @foreach ($data as $key => $item) {{$key+1}} {{$item['item']?? '-'}} {{number_format($item['Sales Value']??0)}} {{$total == 0 ? 0 : number_format((($item['Sales Value']/$total)*100) , 1) . ' %'}} @endforeach {{__('Total')}} {{number_format($total)}} 100 % @endslot
@php $k = $k+ 1 @endphp @endforeach
@php $i = $i + 2 @endphp @endforeach @php $i = 0 @endphp @foreach ($intervalComparing as $theType => $intervals)

{{ (ucfirst(str_replace('_',' ' ,$theType))) . ' Sales Interval Comparing Analysis ' }}

{{--

{{ (ucfirst(str_replace('_',' ' ,$theType))) . ' Sales Interval Comparing Analysis ' }}

--}} @foreach ($intervals as $intervalName => $data )
@include('interval_date' , ['i'=>$i %2 ])
@endforeach
@php $i = $i + 2 @endphp @endforeach
@endsection @section('js') @foreach ($intervalComparing as $theType => $intervals) @foreach ($intervals as $intervalName => $data) @endforeach @endforeach @foreach ($intervalComparing as $theType => $intervals) @foreach ($intervals as $intervalName => $data) @endforeach @endforeach @endsection