{{__('payment.Purchase history')}}

@if(count($enrolls)==0)

{{__('student.No Course Purchased Yet')}}!

@else
@if(hasTax()) @endif @foreach ($enrolls as $key=>$enroll) @if(hasTax()) @endif @endforeach
{{__('common.SL')}} {{__('common.Date')}} {{__('common.Total Courses')}} {{__('payment.Total Price')}} {{__('common.Discount')}}{{__('tax.TAX')}}{{__('common.Payment Type')}}
{{@$key+1}} {{ showDate($enroll->updated_at) }} @if(count($enroll->courses)==0) 1 @else {{count($enroll->courses)}} @endif {{getPriceFormat($enroll->purchase_price,false)}} {{getPriceFormat($enroll->discount,false)}} {{getPriceFormat($enroll->tax,false)}} @if($enroll->payment_method=='Wallet') {{__('payment.Wallet')}} @elseif($enroll->payment_method=='None') {{__('common.None')}} @else {{ $enroll->payment_method }} @endif {{__('common.View')}}
{{ $enrolls->links() }}
@endif
@if(isModuleActive("Store"))

{{__('store.Order History')}}

@if(count($orders)==0)

{{__('student.No Product Purchased Yet!')}}

@else
@if(hasTax()) @endif @foreach ($orders as $key=>$order) @if(hasTax()) @endif @endforeach
{{__('common.SL')}} {{__('product.Order ID')}} {{__('common.Date')}} {{ __('common.Total') }} {{ __('product.Products') }} {{__('payment.Total Price')}} {{__('common.Discount')}}{{__('tax.TAX')}}{{__('product.Delivery Fee')}} {{__('common.Status')}} {{__('common.Payment Type')}}
{{@$key+1}} {{ $order->order_number }} {{ showDate($order->updated_at) }} {{ $order->courses->sum('qty') }} {{getPriceFormat($order->purchase_price,false)}} {{getPriceFormat($order->discount,false)}} {{getPriceFormat($order->tax,false)}} {{ getPriceFormat($order->shipping->cost,false) }} @php if (isModuleActive('Store')) { $is_paid = $order->status == 1 && $order->is_paid == 1; }else { $is_paid = $order->status == 1; } @endphp {{ $is_paid ? __('student.Paid') : __('student.Unpaid') }} @if($order->payment_method=='Wallet') {{__('payment.Wallet')}} @elseif($order->payment_method=='None') {{__('common.None')}} @else {{ $order->payment_method }} @endif
{{ $orders->links() }}
@endif
@endif @if(isModuleActive("Subscription"))

{{__('subscription.Subscription History')}}

@if(count($checkouts)==0)

{{__('student.No Subscription Purchased Yet')}}!

@else
@if(isset($checkouts)) @foreach ($checkouts as $key=>$checkout) @endforeach @endif
{{__('common.SL')}} {{__('subscription.Plan')}} {{__('subscription.Start Date')}} {{__('subscription.End Date')}} {{__('subscription.Days')}} {{__('subscription.Price')}} {{__('subscription.Payment Method')}} {{__('subscription.Status')}} {{__('payment.Invoice')}}
{{@$key+1}} {{$checkout->plan->title}} {{ showDate($checkout->start_date) }} {{ showDate($checkout->end_date) }} {{$checkout->days}} {{$checkout->price}} {{$checkout->payment_method}} @php $date_of_subscription = $checkout->end_date; $now = new DateTime(); $startdate = new DateTime($checkout->start_date); $enddate = new DateTime($checkout->end_date); if($startdate <= $now && $now <= $enddate) { echo "Valid"; }else{ echo "Expire"; } @endphp {{__('common.View')}}
{{ $checkouts->links() }}
@endif
@endif