@extends('backend.layouts.app') @section('content')
@php $dateInput = request()->date_from ? request()->date_from : date('d-m-Y'); $dateInput = date('d-m-Y',strtotime($dateInput)); @endphp
@php $dateInput = request()->date_to ? request()->date_to : date('d-m-Y'); $dateInput = date('d-m-Y',strtotime($dateInput)); @endphp
@if( request()->date_from && request()->date_to)

Summary- {{$title}}

Print
@if (Session::has('error'))
×

{{ Session::get('error') }}

@endif @php $i=0; @endphp @if(isset($information)) @foreach($information as $key_main => $info) @php $i++ @endphp @if (count($info)>0)
{{ucwords(str_replace('_', ' ', $key_main))}}
@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]['membership_no'] = $entry->membership_no; $store[$key]['full_name'] = $entry->full_name; @endphp @php $store[$key]['totalRow']=$totalRow; @endphp @endforeach
Sl M.No Mem Name White Ball Yellow Ball Golf Set Daily Course Fee-09 Hole Coach Fee 45 min Daily Course Fee -18 Hole Coach Fee 90 min R&A PRO Shift P.Mode Total Action
{{$loop->index +1 }}. {{$entry->membership_no}} {{$entry->full_name}} @php $wb_exist=false; @endphp @foreach ($drr as $choice) @if($entry->id==$choice->driving_info_id && $choice->service_name=='White Ball') {{ sprintf('%0.2f', $choice->total_price)}} @php $wb_exist=true; $store[$key]['wb_exist']=$choice->total_price; $wb_total=$wb_total+$choice->total_price; $totalRow += $choice->total_price; @endphp @endif @endforeach @php if (!$wb_exist){ echo $store[$key]['wb_exist']="0.00"; } @endphp @php $yb_exist=false; @endphp @foreach ($drr as $choice) @if($entry->id==$choice->driving_info_id && $choice->service_name=='Yellow Ball') {{ sprintf('%0.2f', $choice->total_price)}} @php $yb_exist=true; $store[$key]['yb_exist']=$choice->total_price; $yb_total=$yb_total+$choice->total_price; $totalRow += $choice->total_price; @endphp @endif @endforeach @php if (!$yb_exist){ echo $store[$key]['yb_exist']="0.00"; } @endphp @php $golf_set_exist=false; @endphp @foreach ($drr as $choice) @if($entry->id==$choice->driving_info_id && $choice->service_name=='Golf Set') {{ sprintf('%0.2f', $choice->total_price)}} @php $golf_set_exist=true; $store[$key]['golf_set_exist']=$choice->total_price; $golf_set_total=$golf_set_total+$choice->total_price; $totalRow += $choice->total_price; @endphp @endif @endforeach @php if (!$golf_set_exist){ echo $store[$key]['golf_set_exist']="0.00"; } @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') {{ sprintf('%0.2f', $choice->total_price)}} @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){ echo $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') {{ sprintf('%0.2f', $choice->total_price)}} @php $ch45_exist=true; $store[$key]['ch45_exist']=$choice->total_price;$ch45_total=$ch45_total+$choice->total_price; $totalRow += $choice->total_price; @endphp @endif @endforeach @php if (!$ch45_exist){ echo $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') {{ sprintf('%0.2f', $choice->total_price)}} @php $crs18_exist=true; $store[$key]['crs18_exist']=$choice->total_price;$crs18_total=$crs18_total+$choice->total_price; $totalRow += $choice->total_price; @endphp @endif @endforeach @php if (!$crs18_exist){ echo $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') {{ sprintf('%0.2f', $choice->total_price)}} @php $ch90_exist=true; $store[$key]['ch90_exist']=$choice->total_price;$ch90_total=$ch90_total+$choice->total_price; $totalRow += $choice->total_price; @endphp @endif @endforeach @php if (!$ch90_exist){ echo $store[$key]['ch90_exist']="0.00"; } @endphp @php $ra_exist=false; @endphp @foreach ($drr as $choice) @if($entry->id==$choice->driving_info_id && $choice->service_name=='R&A') {{ sprintf('%0.2f', $choice->total_price)}} @php $ra_exist=true; $store[$key]['ra_exist']=$choice->total_price;$ra_total=$ra_total+$choice->total_price; $totalRow += $choice->total_price; @endphp @endif @endforeach @php if (!$ra_exist){ echo $store[$key]['ra_exist']="0.00"; } @endphp @php $pro_exist=false; @endphp @foreach ($drr as $choice) @if($entry->id==$choice->driving_info_id && $choice->service_name=='PRO') {{ sprintf('%0.2f', $choice->total_price)}} @php $pro_exist=true; $store[$key]['pro_exist']=$choice->total_price;$pro_total=$pro_total+$choice->total_price; $totalRow += $choice->total_price; @endphp @endif @endforeach @php if (!$pro_exist){ echo $store[$key]['pro_exist']="0.00"; } @endphp {{$entry->shift}} {{$entry->name}} {{$entry->grand_total}}
G.Total {{sprintf('%0.2f',$wb_total)}} {{sprintf('%0.2f',$yb_total)}} {{sprintf('%0.2f',$golf_set_total)}} {{sprintf('%0.2f',$crs09_total)}} {{sprintf('%0.2f',$ch45_total)}} {{sprintf('%0.2f',$crs18_total)}} {{sprintf('%0.2f',$ch90_total)}} {{sprintf('%0.2f',$ra_total)}} {{sprintf('%0.2f',$pro_total)}} -- -- {{sprintf('%0.2f',$total_bill)}}
@php $listed=array(); @endphp @foreach ($store as $ind=>$val) @php if(in_array($val['full_name'], $listed)) { continue; } $listed[] = $val['full_name']; $rows = filterMemberDriving($val['full_name'], $store); @endphp @endforeach {{-- cloned from top base html table --}}
Sl M.No Mem Name White Ball Yellow Ball Golf Set Daily Course Fee-09 Hole Coach Fee 45 min Daily Course Fee -18 Hole Coach Fee 90 min R&A PRO Total
{{++$loop->index}}. {{$val['membership_no']}} {{$val['full_name']}} {{sprintf('%0.2f',$rows['wb_existSum'])}} {{sprintf('%0.2f',$rows['yb_existSum'])}} {{sprintf('%0.2f',$rows['golf_set_existSum'])}} {{sprintf('%0.2f',$rows['crs09_existSum'])}} {{sprintf('%0.2f',$rows['ch45_existSum'])}} {{sprintf('%0.2f',$rows['crs18_existSum'])}} {{sprintf('%0.2f',$rows['ch90_existSum'])}} {{sprintf('%0.2f',$rows['ra_existSum'])}} {{sprintf('%0.2f',$rows['pro_existSum'])}} {{sprintf('%0.2f',$rows['totalRowSum'])}}
G.Total {{sprintf('%0.2f',$wb_total)}} {{sprintf('%0.2f',$yb_total)}} {{sprintf('%0.2f',$golf_set_total)}} {{sprintf('%0.2f',$crs09_total)}} {{sprintf('%0.2f',$ch45_total)}} {{sprintf('%0.2f',$crs18_total)}} {{sprintf('%0.2f',$ch90_total)}} {{sprintf('%0.2f',$ra_total)}} {{sprintf('%0.2f',$pro_total)}} {{sprintf('%0.2f', ($wb_total + $yb_total + $golf_set_total + $crs09_total + $ch45_total + $crs18_total + $ch90_total + $ra_total + $pro_total ))}}
@endif @endforeach @endif
{{--
--}}
Admin
Rep. Contractor
AGC
@endif
@endsection