@extends('backend.layouts.pdf')
@section('content')
Summary Coach Payments
Bhatiary Golf &Country Club
Driving Range
@if( request()->date_from && request()->date_to)
@php
$store=array();
@endphp
@foreach($info as $key=>$entry)
@php
$wb_exist = false;
$yb_exist = false;
$golf_set_exist = false;
$crs09_exist = false;
$ch45_exist = false;
$crs18_exist = false;
$ch90_exist = false;
$ra_exist = false;
$pro_exist = false;
$totalRow = 0;
@endphp
@php
$store[$key]['id'] = $entry->id;
$store[$key]['course_name'] = $entry->course_name;
@endphp
@php $crs09_exist=false; @endphp
@foreach ($drr as $choice)
@if($entry->id==$choice->driving_info_id && $choice->service_name=='Daily Course Fee-09 Hole')
@php $crs09_exist=true;
$store[$key]['crs09_exist']=$choice->total_price;
$crs09_total=$crs09_total+$choice->total_price;
$totalRow += $choice->total_price;
@endphp
@endif
@endforeach
@php
if (!$crs09_exist){
$store[$key]['crs09_exist']="0.00";
}
@endphp
@php $ch45_exist=false; @endphp
@foreach ($drr as $choice)
@if($entry->id==$choice->driving_info_id && $choice->service_name=='Coach Fee 45 min')
@php $ch45_exist=true;
$store[$key]['ch45_exist']=$choice->total_price;
$totalRow += $choice->total_price;
$ch45_total=$ch45_total+$choice->total_price;
@endphp
@endif
@endforeach
@php
if (!$ch45_exist){
$store[$key]['ch45_exist']="0.00";
}
@endphp
@php $crs18_exist=false; @endphp
@foreach ($drr as $choice)
@if($entry->id==$choice->driving_info_id && $choice->service_name=='Daily Course Fee -18 Hole')
@php $crs18_exist=true;
$store[$key]['crs18_exist']=$choice->total_price;
$totalRow += $choice->total_price;
$crs18_total=$crs18_total+$choice->total_price;
@endphp
@endif
@endforeach
@php
if (!$crs18_exist){
$store[$key]['crs18_exist']="0.00";
}
@endphp
@php $ch90_exist=false; @endphp
@foreach ($drr as $choice)
@if($entry->id==$choice->driving_info_id && $choice->service_name=='Coach Fee 90 min')
@php $ch90_exist=true;
$store[$key]['ch90_exist']=$choice->total_price;
$totalRow += $choice->total_price;
$ch90_total=$ch90_total+$choice->total_price;
@endphp
@endif
@endforeach
@php
if (!$ch90_exist){
$store[$key]['ch90_exist']="0.00";
}
@endphp
@php
$store[$key]['totalRow']=$totalRow;
@endphp
@endforeach
@endif
| Sl |
Coach Name |
Daily Course Fee-09 Hole |
Daily Course Fee-18 Hole |
Coach Fee 90 min |
Coach Fee 45 min |
Total |
Remarks |
@php
$listed=array();
@endphp
@foreach ($store as $ind=>$val)
@php
if(in_array($val['course_name'], $listed))
{
continue;
}
$listed[] = $val['course_name'];
$rows = filterCoach($val['course_name'], $store);
@endphp
| {{++$loop->index}}. |
{{$val['course_name']}} |
|