@extends('layouts.backend') @section('extraCss') @endsection @php $Discounts = [ 1 => 'Clearence' , 2 => 'Non Clearence' ]; @endphp @section('mainContentArea')

Sales Article Sizewise New Report

Filter

@php if(!empty($articlesParam) && $articlesParam != 0) { $articlesearch = implode(",",$articlesParam); }else { $articlesearch = 0; } if(!empty($subsectionParam) && $subsectionParam != 0) { $subsectionsearch = implode(",",$subsectionParam); }else { $subsectionsearch = 0; } if(!empty($clearenceRequest) && $clearenceRequest != 0) { $clearences = implode(",",$clearenceRequest); }else { $clearences = $clearenceRequest; } @endphp Export Excel
Warehouse Store Discount Subsection Article Start Date End Date ACTION
" style="width:150px" > @if ($errors->has('startdate')) {{ $errors->first('startdate') }} @endif " placeholder="Enter End date" style="width:150px"> @if ($errors->has('enddate')) {{ $errors->first('enddate') }} @endif
@foreach($sizes as $size) @endforeach @php if(count($orders) > 0) { @endphp @php $gtotalTotal = $gtotalXS = $gtotalS = $gtotalL = $gtotalM = $gtotalXL = $gtotal2XL = $gtotal3XL = $gtotal4XL = $gtotal5XL = $gtotal6XL = $gtotal7XL = $gtotalFREE = $gtotalsales = $gtotaldiscount = 0.00; $i=1; @endphp @foreach($orders as $key => $row) @php $totalTotal = 0; @endphp @php $article = \App\Article::select(['id','image','category_id','main_category_id','price'])->where('code',$row['article'])->first(); $images = empty($article->image) || $article->image == 'NULL' ? 'https://via.placeholder.com/100x100.png?text=No Photo' : asset('/uploads/articles/'.$article->image); @endphp @php $totalTotal += $row['XS'] + $row['S'] + $row['L'] + $row['M'] + $row['XL'] + $row['2XL'] + $row['3XL'] + $row['4XL'] + $row['5XL'] + $row['6XL'] + $row['7XL'] + $row['FREE']; $gtotalTotal += $totalTotal; $gtotalXS += $row['XS']; $gtotalS += $row['S']; $gtotalL += $row['L']; $gtotalM += $row['M']; $gtotalXL += $row['XL']; $gtotal2XL += $row['2XL']; $gtotal3XL += $row['3XL']; $gtotal4XL += $row['4XL']; $gtotal5XL += $row['5XL']; $gtotal6XL += $row['6XL']; $gtotal7XL += $row['7XL']; $gtotalFREE += $row['FREE']; $gtotalsales += $row['sales']; $gtotaldiscount += $row['discount']; @endphp @if(!empty(request("discountId"))) @if(in_array(1, request("discountId"))) @php $colorc= 0; $clearenceArticle = \App\Scheme::where('article',$row['article'])->where('activated',1)->where(function ($query) use ($pos_id) { $query->whereIn('store',$pos_id); $query->Orwhere('store',9999); return $query; })->orderby('id','DESC')->first(); if(!empty($clearenceArticle)) { if($clearenceArticle->color === 'any') { $colorc= 1; } if($clearenceArticle->color === $row['color']) { $colorc= 1; } } @endphp @if(!empty($clearenceArticle)) @if($colorc === 1) size === 'any') { $xs = $s = $l = $m = $xl = $xl2 = $xl3 = $xl4 = $xl5 = $xl6 = $xl7 = $free = $clearenceArticle->discper; } else { if ($clearenceArticle->size === 'XS') { $xs = $clearenceArticle->discper; } if ($clearenceArticle->size === 'S') { $s = $clearenceArticle->discper; } if ($clearenceArticle->size === 'L') { $l = $clearenceArticle->discper; } if ($clearenceArticle->size === 'M') { $m = $clearenceArticle->discper; } if ($clearenceArticle->size === 'XL') { $xl = $clearenceArticle->discper; } if ($clearenceArticle->size === 'XL2') { $xl2 = $clearenceArticle->discper; } if ($clearenceArticle->size === 'XL3') { $xl3 = $clearenceArticle->discper; } if ($clearenceArticle->size === 'XL4') { $xl4 = $clearenceArticle->discper; } if ($clearenceArticle->size === 'XL5') { $xl5 = $clearenceArticle->discper; } if ($clearenceArticle->size === 'XL6') { $xl6 = $clearenceArticle->discper; } if ($clearenceArticle->size === 'XL7') { $xl7 = $clearenceArticle->discper; } if ($clearenceArticle->size === 'FREE') { $free = $clearenceArticle->discper; } } ?> @endif @endif @endif @endif @php $i++; @endphp @endforeach @php } @endphp
Image Article Color Subsection{{$size}}Total Mrp Discount Net Sales view
{{ $i }} {{ $row['article'] }} {{ $row['color'] }} {{ !empty($article->category) ? $article->category->name : '' }} {{ $row['XS'] }} {{ $row['S'] }} {{ $row['M'] }} {{ $row['L'] }} {{ $row['XL'] }} {{ $row['2XL'] }} {{ $row['3XL'] }} {{ $row['4XL'] }} {{ $row['5XL'] }} {{ $row['6XL'] }} {{ $row['7XL'] }} {{ $row['FREE'] }} {{$totalTotal}} {{ !empty($row['minmrp']) ? $row['minmrp'] : '' }} - {{ !empty($row['maxmrp']) ? $row['maxmrp'] : '' }} {{$row['discount']}} {{$row['sales']}}
{{ $i }} {{$clearenceArticle->article}} {{$clearenceArticle->color}} {{ !empty($article->category) ? $article->category->name : '' }} {{$xs}}(%) {{$s}}(%) {{$l}}(%) {{$m}}(%) {{$xl}}(%) {{$xl2}}(%) {{$xl3}}(%) {{$xl4}}(%) {{$xl5}}(%) {{$xl6}}(%) {{$xl7}}(%) {{$free}}(%)
{{$gtotalXS}} {{$gtotalS}} {{$gtotalM}} {{$gtotalL}} {{$gtotalXL}} {{$gtotal2XL}} {{$gtotal3XL}} {{$gtotal4XL}} {{$gtotal5XL}} {{$gtotal6XL}} {{$gtotal7XL}} {{$gtotalFREE}} {{$gtotalTotal}} {{$gtotaldiscount}} {{$gtotalsales}}
@endsection @section('extraJs') @endsection