@extends('theme.master') @section('title', 'Purchase History') @section('content') @include('admin.message') @php $gets = App\Breadcum::first(); @endphp @if(isset($gets))
@if($gets['img'] !== NULL && $gets['img'] !== '') @else course @endif

{{ __('Purchase History') }}

@endif
@foreach($orders as $order)
@endforeach
{{ __('Purchase History') }} {{ __('Enroll on') }} {{ __('Enroll End') }} {{ __('Payment Mode') }} {{ __('Total Price') }} {{ __('Payment Status') }} {{ __('Actions') }}
@if($order->course_id != NULL) @if($order->courses['preview_image'] !== NULL && $order->courses['preview_image'] !== '') course @else {{ __('course')}} @endif @else @if($order->bundle['preview_image'] !== NULL && $order->bundle['preview_image'] !== '') course @else course @endif @endif
@if($order->course_id != NULL) {{ $order->courses->title }} @else {{ $order->bundle->title }} @endif
{{ date('jS F Y', strtotime($order->created_at)) }}
@if($order->course_id != NULL) @if($order->enroll_expire != NULL) {{ date('jS F Y', strtotime($order->enroll_expire)) }} @else - @endif @endif
{{ $order->payment_method }}
@php $contains = Illuminate\Support\Str::contains($order->currency_icon, 'fa'); @endphp @if($order->coupon_discount == !NULL)
@if($contains) @else {{ $order->currency_icon }} @endif {{ $order->total_amount - $order->coupon_discount }}
@else
@if($contains) @else {{ $order->currency_icon }} @endif {{ $order->total_amount }}
@endif
@if($order->status ==1) {{ __('Received') }} @else @if(isset($order->bundle)) {{ __('Pending') }} {{-- @if($order->bundle['subscription_status'] !== 'active') {{ __('Canceled') }} @else {{ __('Pending') }} @endif --}} @endif @endif
@if ($order->subscription_status == 'active' && $order->payment_method !== 'Admin Enroll')
{{ csrf_field() }} {{ __('UnSubscribe') }}
@endif @php $order_id = Crypt::encrypt($order->id); $cor = $order->course_id; $course = App\Course::where('id', $cor)->first(); $ref = App\RefundPolicy::where('id', optional($course)->refund_policy_id)->first(); $days = isset($ref['days']); $orderDate = $order['created_at']; $startDate = date("Y-m-d", strtotime("$orderDate +$days days")); $mytime = Carbon\Carbon::now(); @endphp @php $requested = App\RefundCourse::where('user_id', Auth::User()->id)->where('course_id', $order->course_id)->first(); @endphp @if($requested == NULL) @if($order->id) @if($order->status == 1 ) @if($startDate >= $mytime) @endif @endif @endif @endif
@foreach($refunds as $refund)
@endforeach
{{ __('Refunds') }} {{ __('Date') }} {{ __('Amount') }} {{ __('Payment Mode') }} {{ __('Payment Status') }} {{ __('Actions') }}
@if($refund->courses['preview_image'] !== NULL && $refund->courses['preview_image'] !== '') course @else course @endif
{{ date('jS F Y', strtotime($refund->updated_at)) }}
@if($gsetting['currency_swipe'] == 1)
{{ $refund->total_amount }}
@else
{{ $refund->total_amount }}
@endif
{{ $refund->payment_method }}
@if($refund->status ==1) {{ __('Refunded') }} @else {{ __('Pending') }} @endif
@endsection