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

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

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

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

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

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

{{__('subscription.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