@php $totalproductArray=array(); $prodCount = 1; $gCount = 0; @endphp @foreach ($grouProducts as $val) @php $gCount = count($val); $totalProduct = 0; $totalIndProduct = 0; $totalSurProduct = 0; $imgdetails=null; if(count($val[0]['prodimages'])>0){ $imgdetails =$val[0]['prodimages']; $productlogo = asset('uploads').'/'.($imgdetails[0]['imageName'])??null; }else{ $productlogo = asset('uploads/noimage.jpeg'); } @endphp @foreach ($val as $lkey => $location) @php $totalIndProduct = $location['pTotalprice']; $totalProduct += $totalIndProduct; @endphp @if($lkey % 2 == 0)
{{($val[0]['productName']??'')}}
@php $generalNotes=''; if($val[0]['productGeneralNotes']!=null){ $notes=$val[0]['productGeneralNotes']; foreach($notes as $key=>$noteval){ if($noteval['productId']==$val[0]['productId']){ $generalNotes =($noteval['pGeneralNotes'])??''; } } } $dataarray = ['pName'=>$val[0]['productName'],'pTotalAmt'=>$totalProduct]; array_push($totalproductArray,$dataarray); @endphp @if($generalNotes != '' && $lkey == 0)
General notes :
{{$generalNotes}}
@endif @endif
@if(($location['pColor']!=null) || ($location['pFabric']!=null) ||(count($location['options'])>0)) @if(($location['pFabric']!=null)) @endif @if(($location['pColor']!=null)) @endif @if($location['multiplePrice']==1 && $location['dualBlind']==1) @if($location['pFabricDual']!=null) @endif @if($location['pColorDual']!=null) @endif @endif @if(($location['options']!=null)) @foreach($location['options'] as $key => $specProdOption) @php $typevalueLoc=json_decode($specProdOption['typeValue']) ; if(is_array($typevalueLoc)){ $typevalueLoc = implode(', ',$typevalueLoc); } @endphp @endforeach @endif @endif
Item : {{$prodCount}} | Location : {{$location['pLocation']}}
Width (mm) Drop (mm)
{{$location['pWidth']}} {{$location['pHieght']}}
Fitter Fitter
Options :
Fabric {{$location['pFabric']}} Fitter
Color {{$location['pColor']}} Fitter
Bottom Fabric {{$location['pFabricDual']}} Fitter
Bottom Fabric Colour {{$location['pColorDual']}} Fitter
{{$specProdOption['optionName']}} {{$typevalueLoc}} Fitter
{{-- @if(($location['pColor']!=null) || ($location['pFabric']!=null) ||(count($location['options'])>0)) @endif
Options :
@if(($location['pFabric']!=null)) Fabric{{$location['pFabric']}} @endif @if(($location['pColor']!=null)) Color:{{$location['pColor']}} @endif @if($location['multiplePrice']==1 && $location['dualBlind']==1) @if($location['pFabricDual']!=null) Bottom Fabric{{$location['pFabricDual']}} @endif @if($location['pColorDual']!=null) Bottom Fabric Colour{{$location['pColorDual']}} @endif @endif @if(($location['options']!=null)) @foreach($location['options'] as $key => $specProdOption) @php $typevalueLoc=json_decode($specProdOption['typeValue']) ; if(is_array($typevalueLoc)){ $typevalueLoc = implode(', ',$typevalueLoc); } @endphp {{$specProdOption['optionName']}}{{$typevalueLoc}} @endforeach @endif
--}} @php $surcharges =[]; if(array_key_exists($location['pSpecId'],$relatedHardwareGrp)){ $surcharges = $relatedHardwareGrp[$location['pSpecId']]; } @endphp @if(count($surcharges)>0) @foreach ($surcharges as $sur) @php $totalIndProduct = $totalIndProduct+$sur['pTotalprice']; $totalProduct += $sur['pTotalprice']; @endphp @endforeach
Hardware / Surcharge Qty
{{$sur['productName']}}@if($sur['pWidth']>0)(@{{$sur['pWidth']}})@endif @if(count($sur['options'])>0) ( @foreach ($sur['options'] as $surOption) @php $typevalue=json_decode($surOption['typeValue']) ; if(is_array($typevalue)){ $typevalue = implode(', ',$typevalue); } @endphp {{$surOption['optionName']}} {{$typevalue}} @endforeach ) @endif {{$sur['pQty']}}
@endif @if($location['isCustomColor']==1)
Product name / Surcharge
Custom System Colour Surchagre
@endif @if($location['iNotes'] != '')
Notes for Installer
{{$location['iNotes']}}
@endif @if($location['sNotes'] != '')
Notes for Supplier
{{$location['sNotes']}}
@endif @if($lkey % 2 != 0 || $gCount == 1 || (($lkey +1) == $gCount && $gCount % 2 != 0) )
@endif @if( ($lkey +1) == $gCount )
@endif
@php $prodCount = $prodCount + 1; @endphp @endforeach @endforeach @if(count($grouHrdware)>0)
Hardware
@endif @foreach ($grouHrdware as $val) @php $totalProduct = 0; $totalIndProduct = 0; $totalSurProduct = 0; $imgdetails=null; if(count($val[0]['hardwareimages'])>0){ $imgdetails =$val[0]['hardwareimages']; $productlogo = asset('uploads').'/'.($imgdetails[0]['imageName'])??null; }else{ $productlogo = asset('uploads/noimage.jpeg'); } @endphp
{{($val[0]['productName']??'')}}
@foreach ($val as $lkey => $location) @php $totalIndProduct = $location['pTotalprice']; $totalProduct += $totalIndProduct; @endphp
Product {{$lkey+1}} : {{$location['productName']}}
Product name / Surcharge Qty
{{$location['productName']}} @if(count($location['options'])>0) ( @foreach ($location['options'] as $surOption) @php $typevalue=json_decode($surOption['typeValue']) ; if(is_array($typevalue)){ $typevalue = implode(', ',$typevalue); } @endphp {{$surOption['optionName']}} : {{$typevalue}} @endforeach ) @endif {{$location['pQty']}}
@php $surcharges =[]; if(array_key_exists($location['pSpecId'],$relatedHardwareGrp)){ $surcharges = $relatedHardwareGrp[$location['pSpecId']]; } @endphp @if(count($surcharges)>0) @foreach ($surcharges as $sur) @php $totalIndProduct = $totalIndProduct+$sur['pTotalprice']; $totalProduct += $sur['pTotalprice']; @endphp @endforeach
Product name / Surcharge Qty
{{$sur['productName']}}@if($sur['pWidth']>0)({{$sur['pWidth']}})@endif @if(count($sur['options'])>0) ( @foreach ($sur['options'] as $surOption) @php $typevalue=json_decode($surOption['typeValue']) ; if(is_array($typevalue)){ $typevalue = implode(', ',$typevalue); } @endphp {{$surOption['optionName']}} : {{$typevalue}} @endforeach ) @endif {{$sur['pQty']}}
@endif @if($location['iNotes']!=null) @endif
Installer Notes :
{{$location['iNotes']}}
@if($location['sNotes']!=null) @endif
Supplier Notes :
{{$location['sNotes']}}
@endforeach @php $generalNotes=''; if($val[0]['hardware_general_notes']!=null){ $notes=$val[0]['hardware_general_notes']; foreach($notes as $key=>$noteval){ if($noteval['productId']==$val[0]['productId']){ $generalNotes =($noteval['pGeneralNotes'])??''; } } } $dataarray = ['pName'=>$val[0]['productName'],'pTotalAmt'=>$totalProduct]; array_push($totalproductArray,$dataarray); @endphp
General notes :
{{$generalNotes}}
@endforeach @if(count($grouHrdware)>0)
Miscellaneous
@endif @foreach ($groupMisc as $val) @php $totalProduct = 0; $totalIndProduct = 0; $totalSurProduct = 0; @endphp
{{($val[0]['productName']??'')}}
@foreach ($val as $lkey => $location) @php $totalIndProduct = $location['pTotalprice']; $totalProduct += $totalIndProduct; @endphp @php $tdsize ='36%'; $tdsize1 ='24%'; if($isUser){ $tdsize ='20%'; $tdsize1 ='16%'; } @endphp @if($isUser) @endif @if($isUser) @endif
Product {{$lkey+1}} : {{$location['productName']}}
LocationWidth (mm) Drop (mm)
{{$location['pLocation']}}{{$location['pWidth']}} {{$location['pHieght']}}
@if($location['iNotes']!=null)
Installer Notes :
{{$location['iNotes']}}
@endif @if($location['sNotes']!=null)
Supplier Notes :
{{$location['sNotes']}}
@endif @endforeach @php $dataarray = ['pName'=>$val[0]['productName'],'pTotalAmt'=>$totalProduct]; array_push($totalproductArray,$dataarray); @endphp @endforeach