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

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

{{ $totalOrders }} {{ trans('update.total_orders') }}
{{ $pendingOrders }} {{ trans('update.pending_orders') }}
{{ $canceledOrders }} {{ trans('update.canceled_orders') }}
{{ (!empty($totalSales) and $totalSales > 0) ? handlePrice($totalSales) : 0 }} {{ trans('financial.total_sales') }}

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

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

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

@foreach($orders as $order) @endforeach
{{ trans('update.customer') }} {{ trans('update.order_id') }} {{ trans('public.price') }} {{ trans('public.discount') }} {{ trans('financial.total_amount') }} {{ trans('financial.income') }} {{ trans('public.type') }} {{ trans('public.status') }} {{ trans('public.date') }}
{{ !empty($order->buyer) ? $order->buyer->full_name : '' }} {{ !empty($order->buyer) ? $order->buyer->email : '' }}
{{ $order->id }} {{ $order->quantity }} {{ trans('update.product') }} {{ handlePrice($order->sale->amount) }} {{ handlePrice($order->sale->discount ?? 0) }} {{ handlePrice($order->sale->total_amount) }} {{ handlePrice($order->sale->getIncomeItem()) }} @if(!empty($order) and !empty($order->product)) {{ trans('update.product_type_'.$order->product->type) }} @endif @if(!empty($order)) @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 @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_sales_no_result'), 'hint' => nl2br(trans('update.product_sales_no_result_hint')), ]) @endif @endsection @push('scripts_bottom') @endpush