@extends('admin.layout.master') @section('title',($type==3?'SALES':'SALES RETURN').' Summery') @section('custom_style') @endsection @section ('content')
@include('admin.layout.title_header', ['title'=>'SALES SUMMERY(ITEM WISE)'])
{{-- --}}
{{--
--}}
@php $printData['title']='SHOWROOM-WISE '.($type==3?'SALES':'SALES RETURN'); $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()->showroom && Request()->showroom!=0?$customers->where('id',Request()->showroom)->first()->name_eng:'All Showroom'; $printData['search_by']=(Request()->product_id?strtoupper($products->find(Request()->product_id)->name_eng):''); $routeName=Route::currentRouteName(); $printData=getPrintData($routeName,$printData); @endphp {!!$printData['head']!!} {{--

{{Request()->product_id?strtoupper($products->find(Request()->product_id)->name_eng):''}}

SHOWROOM-WISE {{($type==3?'SALES':'SALES RETURN')}} SUMMERY

@if(Request()->date_from)
{{ 'From '.date('d-M-Y',strtotime(Request()->date_from)).' To '.date('d-M-Y',strtotime(Request()->date_to))}}
@endif --}} @forelse ($dateArray as $date) @empty @endforelse @php $i=1; @endphp @forelse ($showRooms as $party_id => $showRoom) @forelse ($dateArray as $date) @php if($dayWiseSales->has($date)){ foreach ($dayWiseSales[$date]->where('party_id',$party_id)->groupBy('product_id') as $product_id=>$items){ if(Request()->get_value==1){ $qty=$items->sum(function($t){ return $t->quantity * $t->avg_price;}); }else{ $qty=$items->sum('quantity'); } } }else{ $qty=0; } @endphp @empty @endforelse @empty @endforelse
# Showroom{{$date}}
{{$i++}} {{$showRoom->first()->showroom->name_eng}}{{number_format($qty,2)}}

{{-- @include('inventory.order.detail_modal') --}} @endsection @section('script') @stop