@slot('table_header')
| {{ __(spaceAfterCapitalLetters(camelize($type))) }} |
@php
$colsSpans = arrayCountAllLongest($sumForEachInterval) + 1 ;
@endphp
@foreach (getLongestArray($sumForEachInterval) as $year => $d )
@foreach ($d as $month=>$value )
{{ $endOfMonth=\Carbon\Carbon::parse($year.'-'.$month)->endOfMonth()->format('d-M-Y') }}
|
@endforeach
@endforeach
{{-- {{ date('d-M-Y', strtotime($date)) }} | --}}
{{-- {{ __('Total') }} | --}}
@endslot
@slot('table_body')
@foreach ($sumForEachInterval as $zone_name => $data)
@php
$totalCountInvoiceNumber = 0 ;
@endphp
|
{{ __($zone_name) }}
|
@foreach (getLongestArray($sumForEachInterval) as $year => $d )
@foreach ($d as $interval=>$q)
|
@endforeach
@endforeach
| {{ __('Invoice Count') }} |
@foreach (getLongestArray($sumForEachInterval) as $year => $d )
@foreach ($d as $interval=>$q)
@php
$countInvoiceNumber = ($sumForEachInterval[$zone_name][$year][$interval]['invoice_number']) ?? 0
@endphp
{{ number_format( $countInvoiceNumber )}}
|
@endforeach
@endforeach
@if($type != 'product_item')
| {{ __('Avg Product Items Count Per Invoice') }} |
@foreach (getLongestArray($sumForEachInterval) as $year => $d )
@foreach ($d as $interval=>$q)
@php
$invoiceNumber = ($sumForEachInterval[$zone_name][$year][$interval]['invoice_number']) ?? 0 ;
@endphp
{{
round(($sumForEachInterval[$zone_name][$year][$interval]['avg']) ?? 0)
}}
|
@endforeach
@endforeach
| {{ __('Avg Invoice Value') }} |
@foreach (getLongestArray($sumForEachInterval) as $year => $d )
@foreach ($d as $interval=>$q)
@php
$intervalFormatted=\Carbon\Carbon::parse($year.'-'.$interval)->endOfMonth()->format('d-m-Y');
$invoiceNumber = ($sumForEachInterval[$zone_name][$year][$interval]['invoice_number']) ?? 0 ;
$salesValue = $reportSalesValues[$zone_name][$intervalFormatted] ?? 0 ;
$avg_invoice_value = $invoiceNumber ? number_format($salesValue / $invoiceNumber) : 0;
@endphp
{{-- // ; --}}
{{
$avg_invoice_value
}}
|
@endforeach
@endforeach
@endif
@php
$idd = $idd + 1 ;
@endphp
@endforeach
@endslot