@php $sumMethodAsHelper = isset($sumMethodAsHelper) ? $sumMethodAsHelper : 'sumIntervalsIndexes'; @endphp @foreach ($reportData as $reportName => $reportTotalWithItsSubItemsArray) @php $currentLoopItems = $sumMethodAsHelper(removeKeyFromArray($reportTotalWithItsSubItemsArray,'subItems'),$interval,$hospitalitySector->financialYearStartMonth(),$dateIndexWithDate); @endphp @php $currentTotal = 0 ; @endphp {{ __($reportName) }} @foreach ($dates as $dateAsIndex=>$dateAsString) {{ number_format(getValueFromArrayStringAndIndex($currentLoopItems,$dateAsString,$dateAsIndex,0),0) }} @php $currentTotal+=getValueFromArrayStringAndIndex($currentLoopItems,$dateAsString,$dateAsIndex,0) @endphp @endforeach @php $id = 0 ; @endphp @foreach($reportTotalWithItsSubItemsArray['subItems']??[] as $subItemName => $subItemsTotalsAndItesSubItems ) @php if($subItemName == 'Net Profit'){ $currentLoopItems = sumIntervalsIndexes(removeKeyFromArray($subItemsTotalsAndItesSubItems,'subItems'),$interval,$hospitalitySector->financialYearStartMonth(),$dateIndexWithDate); } elseif($subItemName == 'Retained Earnings'){ $currentNetProfit = sumIntervalsIndexes($reportData['Owners Equity']['subItems']['Net Profit'] ?? [],$interval,$hospitalitySector->financialYearStartMonth(),$dateIndexWithDate); $currentLoopItems = $hospitalitySector->calculateRetainedEarning($currentNetProfit,$interval); if($interval == 'annually'){ // dd($currentLoopItems,$currentNetProfit); } } else { $currentLoopItems = $sumMethodAsHelper(removeKeyFromArray($subItemsTotalsAndItesSubItems,'subItems'),$interval,$hospitalitySector->financialYearStartMonth(),$dateIndexWithDate); } @endphp @php $mainRowtotal = 0 ; @endphp
@if(count($subItemsTotalsAndItesSubItems['subItems'] ?? [])) @endif {{ __($subItemName) }}
@php @endphp @foreach ($dates as $dateAsString=>$dateAsIndex) {{ number_format(getValueFromArrayStringAndIndex($currentLoopItems,$dateAsString,$dateAsIndex,0) ,0) }} @php $mainRowtotal += getValueFromArrayStringAndIndex($currentLoopItems,$dateAsString,$dateAsIndex,0) ; @endphp @endforeach @foreach ($subItemsTotalsAndItesSubItems['subItems'] ?? [] as $subName => $subDatesAndValues) @php $currentLoopItems = $sumMethodAsHelper(removeKeyFromArray($subDatesAndValues,'subItems'),$interval,$hospitalitySector->financialYearStartMonth(),$dateIndexWithDate); @endphp @php $subItemTotal = 0 ; @endphp {{-- --}} {{ $subName }} @foreach ($dates as $dateAsString=>$dateAsIndex) {{ number_format(getValueFromArrayStringAndIndex($currentLoopItems,$dateAsString,$dateAsIndex,0) , 0)}} @php @endphp @php $subItemTotal += getValueFromArrayStringAndIndex($currentLoopItems,$dateAsString,$dateAsIndex,0) @endphp @endforeach @endforeach
Warning: Undefined variable $id in /home/cfostools/public_html/cfohotel.evoqas.com/resources/views/components/tables/one-sub-table.blade.php on line 121
@endforeach @endforeach