@extends('admin.layouts.app') @section('content')

{{ trans('admin/main.sales') }}

{{trans('admin/main.total_sales')}}

{{ $totalSales['count'] }}
{{ handlePrice($totalSales['amount']) }}

{{trans('admin/main.classes_sales')}}

{{ $classesSales['count'] }}
{{ handlePrice($classesSales['amount']) }}

{{trans('admin/main.appointments_sales')}}

{{ $appointmentSales['count'] }}
{{ handlePrice($appointmentSales['amount']) }}

{{trans('admin/main.faild_sales')}}

{{ $failedSales }}
@can('admin_sales_export') {{ trans('admin/main.export_xls') }} @endcan
@foreach($sales as $sale) @endforeach
# {{ trans('admin/main.student') }} {{ trans('admin/main.instructor') }} {{ trans('admin/main.paid_amount') }} {{ trans('admin/main.discount') }} {{ trans('admin/main.tax') }} {{ trans('admin/main.item') }} {{ trans('admin/main.sale_type') }} {{ trans('admin/main.date') }} {{ trans('admin/main.status') }} {{ trans('admin/main.actions') }}
{{ $sale->id }} {{ !empty($sale->buyer) ? $sale->buyer->full_name : '' }}
ID : {{ !empty($sale->buyer) ? $sale->buyer->id : '' }}
{{ $sale->item_seller }}
ID : {{ $sale->seller_id }}
@if($sale->payment_method == \App\Models\Sale::$subscribe) {{ trans('admin/main.subscribe') }} @else @if(!empty($sale->total_amount)) {{ handlePrice($sale->total_amount ?? 0) }} @else {{ trans('public.free') }} @endif @endif {{ handlePrice($sale->discount ?? 0) }} {{ handlePrice($sale->tax ?? 0) }}
{{ $sale->item_title }}
ID : {{ $sale->item_id }}
@if($sale->type == \App\Models\Sale::$registrationPackage) {{ trans('update.registration_package') }} @elseif($sale->type == \App\Models\Sale::$product) {{ trans('update.product') }} @elseif($sale->type == \App\Models\Sale::$bundle) {{ trans('update.bundle') }} @elseif($sale->type == \App\Models\Sale::$gift) {{ trans('update.gift') }} @elseif($sale->type == \App\Models\Sale::$installmentPayment) {{ trans('update.installment_payment') }} @else {{ trans('admin/main.'.$sale->type) }} @endif {{ dateTimeFormat($sale->created_at, 'j F Y H:i') }} @if(!empty($sale->refund_at)) {{ trans('admin/main.refund') }} @elseif(!$sale->access_to_purchased_item) {{ trans('update.access_blocked') }} @else {{ trans('admin/main.success') }} @endif @can('admin_sales_invoice') @if(!empty($sale->webinar_id)) @endif @endcan @can('admin_sales_refund') @if(empty($sale->refund_at) and $sale->payment_method != \App\Models\Sale::$subscribe) @include('admin.includes.delete_button',[ 'url' => getAdminPanelUrl().'/financial/sales/'. $sale->id .'/refund', 'tooltip' => trans('admin/main.refund'), 'btnIcon' => 'fa-times-circle' ]) @endif @endcan
@endsection