@extends('admin.layouts.app') @section('title', 'Sale Report') @section('content')

Sales Report

{!! Form::open(['route' => ['admin.sales.report'], 'id' => 'filter_form']) !!}
{!! Form::label('status', __('Status')) !!} {{ Form::select('status', $status, $status_filter, ['id'=>'status','class' => 'form-control','placeholder' => 'Select Status']) }}
{!! Form::label('payment_type', __('Payment Type')) !!} {{ Form::select('payment_type', $paymentType, $payment_type, ['id'=>'payment_type','class' => 'form-control','placeholder' => 'Select Type']) }}
{!! Form::label('date_selection', __('Date Selection')) !!} {{ Form::select('date', $dateSelction, $date, ['id'=>'date','class' => 'form-control','placeholder' => 'Select Date']) }}
{!! Form::label('start_date', __('Start Date')) !!} {{ Form::date('start_date', $start_date, ['id'=>'date','class' => 'form-control','placeholder' => 'Select Date']) }}
{!! Form::label('end_date', __('End Date')) !!} {{ Form::date('end_date', $end_date, ['id'=>'date','class' => 'form-control','placeholder' => 'Select Date']) }}
{!! Form::submit(__('Filter'), ['class' => 'btn btn-primary']) !!}
{!! Form::close() !!}
{{-- @if(count($orders) > 0)
@endif --}}
@if (Session::has('message'))
{{ Session::get('message') }}
@endif {{-- --}} @foreach($orders as $order) {{-- --}} @php $date = date('Y-m-d', strtotime($order->created_at)); $totalOrders[$date] = $order; @endphp @endforeach
Order ID UsernameDelivery ChargesContact No Order Status Payment Type Total Amount Order Created
{{$order->order_id}} {{$order->user->name}}{{$order->delivery_charges}}{{$order->userAddress->contact_no}} {{$order->order_status}} {{$order->payment_type}} {{$order->grand_total}} KD {{dateConvertFormat($order->created_at)}}
{{-- @php $optionGraphValues = []; if(count($datesArr) > 0){ foreach ($datesArr as $key => $value) { $optionArr[] = [ 'label' => date('d M', strtotime($key)), 'y' => count($value), ]; } $optionGraphValues = json_encode($optionArr); } @endphp --}} @endsection