@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))}}
@foreach($info as $key=>$entry) @php $wb_exist = false; $yb_exist = false; $golf_set_exist = false; $crs90_exist = false; $ch45_exist = false; $crs18_exist = false; $ch90_exist = false; $ra_exist = false; $pro_exist = false; @endphp @endforeach {{-- AGC G.Total --}} {{-- Coach G.Total --}} {{-- Contractor G.Total --}}
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; $wb_total=$wb_total+$choice->total_price; @endphp @endif @endforeach {{(!!$wb_exist)?"":"0.00"}} @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; $yb_total=$yb_total+$choice->total_price; @endphp @endif @endforeach {{(!!$yb_exist)?"":"0.00"}} @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; $golf_set_total=$golf_set_total+$choice->total_price; @endphp @endif @endforeach {{(!!$golf_set_exist)?"":"0.00"}} @php $crs90_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 $crs90_exist=true; $crs90_total=$crs90_total+$choice->total_price; @endphp @endif @endforeach {{(!!$crs90_exist)?"":"0.00"}} @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; $ch45_total=$ch45_total+$choice->total_price; @endphp @endif @endforeach {{(!!$ch45_exist)?"":"0.00"}} @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; $crs18_total=$crs18_total+$choice->total_price; @endphp @endif @endforeach {{(!!$crs18_exist)?"":"0.00"}} @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; $ch90_total=$ch90_total+$choice->total_price; @endphp @endif @endforeach {{(!!$ch90_exist)?"":"0.00"}} @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; $ra_total=$ra_total+$choice->total_price; @endphp @endif @endforeach {{(!!$ra_exist)?"":"0.00"}} @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; $pro_total=$pro_total+$choice->total_price; @endphp @endif @endforeach {{(!!$pro_exist)?"":"0.00"}} {{$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',$crs90_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)}}
AGC G.Total {{sprintf('%0.2f', $agc_wb_total = getPercentage($wb_total, 50) )}}
(50%)
{{sprintf('%0.2f', $agc_yb_total = getPercentage($yb_total, 50) )}}
(50%)
{{sprintf('%0.2f', $agc_golf_set_total = getPercentage($golf_set_total, 100) )}}
(100%)
{{sprintf('%0.2f', $agc_crs90_total = getPercentage($crs90_total, 15) )}}
(15%)
{{sprintf('%0.2f', $agc_ch45_total = getPercentage($ch45_total, 100) )}}
(100%)
{{sprintf('%0.2f', $agc_crs18_total = getPercentage($crs18_total, 15) )}}
(15%)
{{sprintf('%0.2f', $agc_ch90_total = getPercentage($ch90_total, 100) )}}
(100%)
{{sprintf('%0.2f', $agc_ra_total = getPercentage($ra_total, 0) )}}
(0%)
{{sprintf('%0.2f', $agc_pro_total = getPercentage($pro_total, 0) )}}
(0%)
-- -- {{sprintf('%0.2f', ($agc_wb_total + $agc_yb_total + $agc_golf_set_total + $agc_crs90_total + $agc_ch45_total + $agc_crs18_total + $agc_ch90_total + $agc_ra_total + $agc_pro_total) )}}
Coach G.Total {{sprintf('%0.2f', $coach_wb_total = getPercentage($wb_total, 0) )}}
(0%)
{{sprintf('%0.2f', $coach_yb_total = getPercentage($yb_total, 0) )}}
(0%)
{{sprintf('%0.2f', $coach_golf_set_total = getPercentage($golf_set_total, 0) )}}
(0%)
{{sprintf('%0.2f', $coach_crs90_total = getPercentage($crs90_total, 85) )}}
(85%)
{{sprintf('%0.2f', $coach_ch45_total = getPercentage($ch45_total, 0) )}}
(0%)
{{sprintf('%0.2f', $coach_crs18_total = getPercentage($crs18_total, 85) )}}
(85%)
{{sprintf('%0.2f', $coach_ch90_total = getPercentage($ch90_total, 0) )}}
(0%)
{{sprintf('%0.2f', $coach_ra_total = getPercentage($ra_total, 0) )}}
(0%)
{{sprintf('%0.2f', $coach_pro_total = getPercentage($pro_total, 0) )}}
(0%)
-- -- {{sprintf('%0.2f', ($coach_wb_total + $coach_yb_total + $coach_golf_set_total + $coach_crs90_total + $coach_ch45_total + $coach_crs18_total + $coach_ch90_total + $coach_ra_total + $coach_pro_total) )}}
Contractor G.Total {{sprintf('%0.2f', $contractor_wb_total = getPercentage($wb_total, 50) )}}
(50%)
{{sprintf('%0.2f', $contractor_yb_total = getPercentage($yb_total, 50) )}}
(50%)
{{sprintf('%0.2f', $contractor_golf_set_total = getPercentage($golf_set_total, 0) )}}
(0%)
{{sprintf('%0.2f', $contractor_crs90_total = getPercentage($crs90_total, 0) )}}
(0%)
{{sprintf('%0.2f', $contractor_ch45_total = getPercentage($ch45_total, 0) )}}
(0%)
{{sprintf('%0.2f', $contractor_crs18_total = getPercentage($crs18_total, 0) )}}
(0%)
{{sprintf('%0.2f', $contractor_ch90_total = getPercentage($ch90_total, 0) )}}
(0%)
{{sprintf('%0.2f', $contractor_ra_total = getPercentage($ra_total, 0) )}}
(0%)
{{sprintf('%0.2f', $contractor_pro_total = getPercentage($pro_total, 0) )}}
(0%)
-- -- {{sprintf('%0.2f', ($contractor_wb_total + $contractor_yb_total + $contractor_golf_set_total + $contractor_crs90_total + $contractor_ch45_total + $contractor_crs18_total + $contractor_ch90_total + $contractor_ra_total + $contractor_pro_total) )}}
@endif @endforeach @endif
{{--
--}}
Admin
Rep. Contractor
AGC
@endif
@endsection