@extends('admin.layout.layout') @section('page-level-css') @endsection @section('content')
@include('admin.partials.header')
{{-- flash message starts here --}}
@if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif @if(Session::has('success'))
{{Session::get('success')}}
@endif
{{-- flash message ends here --}}
{{-- filters starts --}}
{{-- Filters --}}
{{-- filters --}} {{-- @include('admin.partials.filters.locationFilter') --}} {{-- filters ends --}}
Clear
{{-- All time wise sales starts --}}

₹ {{number_format($all_time_sales,2)}} /-

{{-- All time wise sales ends --}} {{-- Date wise sales starts --}}

₹{{ ($date_wise_sales) ? number_format($date_wise_sales,2) : '0' }} /-

{{-- Date wise sales ends --}} {{-- Discount given starts--}}

₹ {{number_format($discountTransaction,2)}} /-

{{-- Discount given ends--}} {{-- Completed Transactions starts --}}

{{ $completed_transactions }}

{{-- Completed Transactions ends --}} {{-- Failed Transactions starts --}}

{{ $failed_transactions }}

{{-- Failed Transactions ends --}} {{-- Incomplete Transactions starts --}}

{{ $incomplete_transactions }}

{{-- Incomplete Transactions ends --}} {{-- Unit Solds starts --}}

{{ $unitsSold }}

{{-- Unit Solds Transactions ends --}} {{-- Most bought product start --}}

{{ $mostBuyedProduct->title }}

{{-- Most bought product start --}} {{-- Discount Coupons starts --}}
Discount Coupons
@php $sr = 1; @endphp @foreach( $discounts as $discount ) @php $times_used = App\Orders::where('bank_status','success')->where('coupon_id',$discount->id)->get(); @endphp @php $sr++; @endphp @endforeach
{{-- Discount Coupons ends --}} {{-- Products starts here --}}
Products
@if( count($products) != 0 ) @php $sr = 1; @endphp @foreach( $products as $product ) @php $sale = 0; $quantity = 0; $products_in_order = App\ProductsInOrder::where('product_id',$product->id)->get(); foreach ($products_in_order as $products_in_order_info) { $order_check = App\Orders::where('id',$products_in_order_info->order_id)->first(); if($order_check->bank_status == 'success'){ $sale = $sale + $products_in_order_info->sub_total; $quantity = $quantity + $products_in_order_info->quantity; } } @endphp @php $sr++; @endphp @endforeach @else @endif
{{-- Products ends here --}}
{{-- Delete Modal Starts here --}} @include('admin.partials.trashModal') {{-- Delete Modal ends here --}} @include('admin.partials.footer')
@endsection @section('page-level-js') {{-- --}} @endsection