@foreach($periods as $key=>$period) @if ($type_period == 1) @else @endif @endforeach @foreach ($otas as $key=>$ota) @foreach($periods as $period) @endforeach @endforeach
OTA{{date('d-m-Y',strtotime($period))}}{{date('F, Y', strtotime(date('Y-d-m', strtotime('01/' . str_replace('-', '/', $period)))))}}Total Period
{{$ota->name}} {{ array_key_exists($ota->id, $data_ota) ? (array_key_exists($period, $data_ota[$ota->id]['per_period_nett']) ? number_format($data_ota[$ota->id]['per_period_nett'][$period], 2) : 0) : 0}}{{ array_key_exists($ota->id, $data_ota) ? (array_key_exists($ota->id, $data_ota) ? number_format($data_ota[$ota->id]['total_nett'], 2) : '0') : '0'}}