@php $spcCustomer = \DB::table('oc_customer_ref')->select('customer_id')->whereIn('warehouse_id', $pos_id)->get(); foreach ($spcCustomer as $key => $value) { $spsCustomersCollection[] = $value->customer_id; } $spscount = \DB::table('oc_plan_to_customer')->where('current',1) ->where('status',1)->whereBetween('start_date', [$startdate, $enddate])->whereIn('customer_id', $spsCustomersCollection)->count(); @endphp
Total SPS :
@if($filterby != 'month') @endif @if(!empty($orders)) @php $gtotalCash = $gtotalQty = $gtotalbill = $gtotalmrp = $gtotalsps = $gtotalOffer = $gtotalvocher = $gotherOffer = $gclearence = $gtotalreward = $gtotal = $gtotalbill0 = $gtotalbill15 = $gtotalbill25 = $gtotalbill5 = $gtotalbill7 = $gtotalbill10 = $gtotalSuits = $gtotalBottom = $gtotalacceess = $gtotaljewelery = $averaguabv = $gtotalSPSNew = $gtotalSPSOld = $averagasp = $gtotalSPSOld = $averagupt = $gtotalSPS = $abv = $asp = 0.00; $totalCount = count($orders); @endphp @foreach($orders as $key => $order) @php $totalTotal = $otherOffer = $clearence = 0; $totalexchangeqty = $order['exchangeqty']; $exchangeamount = $order['exchangeamount']; $order['totalfinalamt'] = $order['totalfinalamt'] - $exchangeamount; $order['totalQty'] = $order['totalQty'] - $totalexchangeqty; $order['totalMrp'] = $order['totalMrp'] - $exchangeamount; $gtotalmrp += $order['totalMrp']; $totalTotal += $order['totalfinalamt']; $gtotalQty += $order['totalQty']; $gtotalSPS += $order['spscount']; $gtotalSPSOld += $order['oldspscount']; $gtotalbill += $order['totalBill']; $dismrp = ($order['totalMrp'] * 10/100); $otherOffer = $order['otherOffer']; $gotherOffer += $otherOffer; $clearence = $order['clearence']; $gclearence += $clearence; $averagupt += $order['upt']; if($order['totalBill'] > 0) { $abv= $totalTotal/ $order['totalBill']; } $averaguabv += $abv; if($order['totalQty'] > 0) { $asp = $totalTotal/ $order['totalQty']; } $averagasp += $asp; $gtotalsps += $order['totalSpsDiscount']; $gtotalvocher += $order['voucher']; $gtotalreward += $order['totalreward']; $gtotal += $totalTotal; $gtotalbill5 += $order['bill5']; $gtotalbill7 += $order['bill7']; $gtotalbill10 += $order['bill10']; $gtotalbill0 += $order['bill0']; $gtotalbill15 += $order['bill15']; $gtotalbill25 += $order['bill25']; $gtotalSuits += $order['Suits']; $gtotalBottom += $order['Bottom']; $gtotalacceess += $order['acceess']; $gtotaljewelery += $order['jewelery']; @endphp @if($filterby != 'month') @endif @endforeach @if($filterby != 'month') @endif @php $aupt=$averagupt/$totalCount; $aabv=$averaguabv/$totalCount; $aasp=$averagasp/$totalCount; @endphp @endif
DateDay Store Location Foot fall Repeat New Total NOB QTY UPT ABV ASP Target New SPS Old SPS MRP SPS Discount Clearence Discount Other Offer Discount Gift Vouchers Reward Points Realised sale ACH% CONV% 0 - 1499 1500 - 2499 2500 - 4999 4999 - 7499 7500 - 9999 10000 above Upper Suit Sets Bottom Home Accessory Jewellery
{{$order['date']}}{{date('l', strtotime($order['date']))}}{{$order['store']}} 0 0 0 {{$order['totalBill']}} {{$order['totalQty']}} {{number_format($order['upt'],2)}} {{ number_format((float)$abv, 2, '.', '') }} {{ number_format((float)$asp, 2, '.', '') }} 0 {{$order['spscount']}} {{$order['oldspscount']}} {{$order['totalMrp']}} {{$order['totalSpsDiscount']}} {{$clearence}} {{$otherOffer}} {{$order['voucher']}} {{$order['totalreward']}} {{$totalTotal}} 0 0 {{$order['bill0']}} {{$order['bill15']}} {{$order['bill25']}} {{$order['bill5']}} {{$order['bill7']}} {{$order['bill10']}} 0 {{!empty($order['Suits']) ? $order['Suits'] : 0 }} {{ !empty($order['Bottom']) ? $order['Bottom'] : 0 }} 0 {{!empty($order['acceess']) ? $order['acceess'] :0 }} {{ !empty($order['jewelery']) ? $order['jewelery'] : 0 }}
0 0 0 {{$gtotalbill}} {{$gtotalQty}} {{ round ($aupt) }} {{ round ($aabv) }} {{ round ($aasp) }} 0 {{round($gtotalSPS)}} {{round($gtotalSPSOld)}} {{round($gtotalmrp)}} {{round($gtotalsps)}} {{round($gclearence)}} {{round($gotherOffer)}} {{round($gtotalvocher)}} {{round($gtotalreward)}} {{round($gtotal)}} 0 0 {{round($gtotalbill0) }} {{round($gtotalbill15) }} {{round($gtotalbill25) }} {{round($gtotalbill5) }} {{round($gtotalbill7) }} {{round($gtotalbill10) }} 0 {{ round($gtotalSuits)}} {{ round($gtotalBottom)}} 0 {{round($gtotalacceess)}} {{round($gtotaljewelery)}}