@if(count($salereport)) @if( $type != 'customer') @endif @foreach($salereport as $value) @if($type != 'customer') @endif @endforeach
{{trans('report-sale.date')}} {{trans('report-sale.items_purchased')}} {{trans('report-sale.total')}} {{__('Status')}}  
{{ $value->created_at->format('d M Y') }} {{count($value->saleItems)}} {{currencySymbol().$value->grand_total}} {!! $value->getStatus() !!}
@foreach($value->saleItems as $SaleDetailed) @endforeach
{{trans('report-sale.item_id')}} {{trans('report-sale.item_name')}} {{trans('report-sale.quantity_purchase')}} {{trans('report-sale.total')}} {{trans('report-sale.profit')}}
{{ $SaleDetailed->item_id }} {{ $SaleDetailed->item->item_name }} {{ $SaleDetailed->quantity }} {{currencySymbol()}}{{ $SaleDetailed->selling_price * $SaleDetailed->quantity}} {{currencySymbol()}}{{ ($SaleDetailed->quantity * $SaleDetailed->selling_price) - ($SaleDetailed->quantity * $SaleDetailed->cost_price)}}
@if($type != 'datefilter') @php if($type == 'customer') { $index_route = route('customers.show', $customer->id); } else { $index_route = url('/sales'); } @endphp @include('partials.pagination', ['items'=>$salereport, 'index_route'=>$index_route]) @endif @endif