@extends('theme.master') @section('title', 'Purchase History') @section('content') @include('admin.message')

{{ __('frontstaticword.PurchaseHistory') }}

@foreach($orders as $order)
@endforeach
{{ __('frontstaticword.PurchaseHistory') }} {{ __('frontstaticword.Enrollon') }} {{ __('frontstaticword.EnrollEnd') }} {{ __('frontstaticword.PaymentMode') }} {{ __('frontstaticword.TotalPrice') }} {{ __('frontstaticword.PaymentStatus') }}s {{ __('frontstaticword.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) {{ __('frontstaticword.Recieved') }} @else @if(isset($order->bundle)) @if($order->bundle['subscription_status'] !== 'active') {{ __('frontstaticword.Cancelled') }} @else {{ __('frontstaticword.Pending') }} @endif @endif @endif
@if ($order->subscription_status == 'active' && $order->payment_method !== 'Admin Enroll') @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
{{ __('frontstaticword.Refunds') }} {{ __('frontstaticword.Date') }} {{ __('frontstaticword.Amount') }} {{ __('frontstaticword.PaymentMode') }} {{ __('frontstaticword.PaymentStatus') }}s {{ __('frontstaticword.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) {{ __('adminstaticword.Refunded') }} @else {{ __('adminstaticword.Pending') }} @endif
@endsection