@include('admin.layout.title_header', ['title'=>'SALES SUMMERY(ITEM WISE)'])
{{--
--}}
@php
$printData['title']='ORDER SUMMERY '.($type==0?'(SHOWROOM VS PRODUCT)':($type==1?'(PRODUCT VS SHOWROOM)':'(SHOWROOM VS SECTIONWISE-PRODUCT)'));
$printData['start_date']=Request()->date_from?date('d-M-Y',strtotime(Request()->date_from)):date('d-M-Y');
$printData['end_date']=Request()->date_to?date('d-M-Y',strtotime(Request()->date_to)):date('d-M-Y');
$printData['showroom']=Request()->group?$groups->where('id',Request()->group)->first()->name_eng:(Request()->showroom && Request()->showroom!=0?$customers->where('id',Request()->showroom)->first()->name_eng:'All Showroom');
$printData['search_by']=$type==2?(Request()->category_code && Request()->category_code!=0?$categories->where('id',Request()->category_code)->first()->chart_name:'All Section'):(Request()->category_code && Request()->category_code!=0?$categories->where('code',Request()->category_code)->first()->name_eng:'All Category');
$routeName=Route::currentRouteName();
$printData=getPrintData($routeName,$printData);
@endphp
{!!$printData['head']!!}
@if($type==0 || $type==2)
@php
$tr='';
@endphp
@forelse ($transacted_products as $a=>$transacted_product)
@empty
@endforelse
@php
$i=1;
@endphp
@forelse (Request()->showroom?$loopableCustomers->where('id',Request()->showroom):$loopableCustomers as $showroom)
| {{$i++}} |
{{$showroom->user_name}} |
{{-- {{$showroom->first()->showroom->user_name}} | --}}
@forelse ($transacted_products as $k=>$transacted_product)
{{ number_format($transacted_product->where('party_id',$showroom->id)->where('product_id',$k)->sum(Request()->delivered==1?'quantity':'order_qty'),2) }} |
@empty
@endforelse
@empty
| {{__('obs.no_data_available')}} |
@endforelse
| {{__('obs.total')}} |
@forelse ($transacted_products as $m=>$transacted_product)
{{-- @if($a!='') --}}
{{ number_format($transacted_product->where('product_id',$m)->sum(Request()->delivered==1?'quantity':'order_qty'),2) }} |
{{-- @endif --}}
@empty
@endforelse
@else
@php
$tr='';
@endphp
@forelse (Request()->showroom?$loopableCustomers->where('id',Request()->showroom):$loopableCustomers as $showroom)
@empty
@endforelse
@php
$i=1;
@endphp
@forelse ($transacted_products as $a=>$transacted_product)
@php
$sWiseAmt=0;
@endphp
| {{$i++}} |
{{Request()->name_type==1?$transacted_product->first()->product->name_local:$transacted_product->first()->product->name_eng}} |
@forelse (Request()->showroom?$loopableCustomers->where('id',Request()->showroom):$loopableCustomers as $s=>$showroom)
@php
$amt=$transactions->where('party_id',$showroom->id)->where('product_id',$a)->sum(Request()->delivered==1?'quantity':'order_qty');
$sWiseAmt+=$amt;
@endphp
{{ number_format($amt,2) }} |
@empty
@endforelse
{{number_format($sWiseAmt,2) }} |
@empty
| {{__('obs.no_data_available')}} |
@endforelse
| {{__('obs.total')}} |
{{-- @forelse ($showroom as $t=>$showroom) --}}
@php
$tsWiseAmt=0;
@endphp
@forelse (Request()->showroom?$loopableCustomers->where('id',Request()->showroom):$loopableCustomers as $t=>$showroom)
{{-- @forelse ($customers as $t=>$showroom) --}}
@php
$tamt=count($transactions)?$transactions->where('party_id',$showroom->id)->sum(Request()->delivered==1?'quantity':'order_qty'):0;
$tsWiseAmt+=$tamt;
@endphp
{{ number_format($tamt,2) }} |
@empty
@endforelse
{{number_format($tsWiseAmt,2) }} |
@endif