@extends(getTemplate() .'.panel.layouts.panel_layout') @push('styles_top') @endpush @section('content')

{{ trans('update.purchases_statistics') }}

{{ $totalOrders }} {{ trans('update.total_orders') }}
{{ $pendingOrders }} {{ trans('update.pending_orders') }}
{{ $canceledOrders }} {{ trans('update.canceled_orders') }}
{{ !empty($totalPurchase) ? handlePrice($totalPurchase) : 0 }} {{ trans('update.total_purchase') }}

{{ trans('update.purchases_report') }}

@if(!empty($orders) and !$orders->isEmpty())

{{ trans('update.purchases_history') }}

@foreach($orders as $order) @endforeach
{{ trans('update.seller') }} {{ trans('update.order_id') }} {{ trans('public.price') }} {{ trans('public.discount') }} {{ trans('cart.tax') }} {{ trans('update.delivery_fee') }} {{ trans('financial.total_amount') }} {{ trans('public.type') }} {{ trans('public.status') }} {{ trans('public.date') }}
{{ !empty($order->seller) ? $order->seller->full_name : '' }} {{ !empty($order->seller) ? $order->seller->email : '' }}
{{ $order->id }} {{ $order->quantity }} {{ trans('update.product') }} {{ handlePrice($order->sale->amount) }} @if(!empty($order->sale->discount) and (int)$order->sale->discount > 0) {{ handlePrice($order->sale->discount ?? 0) }} @else - @endif @if(!empty($order->sale->tax)) {{ handlePrice($order->sale->tax) }} @else - @endif @if(!empty($order->sale->product_delivery_fee)) {{ handlePrice($order->sale->product_delivery_fee) }} @else - @endif {{ handlePrice($order->sale->total_amount) }} @if(!empty($order) and !empty($order->product)) {{ trans('update.product_type_'.$order->product->type) }} @endif @if($order->status == \App\Models\ProductOrder::$waitingDelivery) {{ trans('update.product_order_status_waiting_delivery') }} @elseif($order->status == \App\Models\ProductOrder::$success) {{ trans('update.product_order_status_success') }} @elseif($order->status == \App\Models\ProductOrder::$shipped) {{ trans('update.product_order_status_shipped') }} @elseif($order->status == \App\Models\ProductOrder::$canceled) {{ trans('update.product_order_status_canceled') }} @endif {{ dateTimeFormat($order->created_at, 'j M Y H:i') }} @if(!empty($order) and $order->status != \App\Models\ProductOrder::$canceled) @endif
{{ $orders->appends(request()->input())->links('vendor.pagination.panel') }}
@else @include(getTemplate() . '.includes.no-result',[ 'file_name' => 'sales.png', 'title' => trans('update.product_purchases_no_result'), 'hint' => nl2br(trans('update.product_purchases_no_result_hint')), ]) @endif @endsection @push('scripts_bottom') @endpush