@extends('layouts.frontend') @section('title', 'Voucher History' ) @section('css') @endsection @section('content')
@include('users.inc.sidebar')
@if(Session::has('success'))
Success! {{Session::get('success')}}
@endif @if(Session::has('error'))
Error! {{Session::get('error')}}
@endif
Pending Voucher
Processing
Closed Voucher
Total Voucher
@if(count($orders)>0) @foreach($orders as $index => $order) @php $delivery_next_date = (count($order->voucherTimelines)>0) ? Carbon\Carbon::parse($order->voucherTimelines[0]->invoice_date)->addDays(30)->format('Y-m-d'. ' 00:00:00') : Carbon\Carbon::parse($order->order_date)->addDays(10)->format('Y-m-d'. ' 00:00:00'); @endphp format('Y-m-d'. ' 00:00:00') >= $delivery_next_date && ($order->order_status != 'cancel' && $order->order_status != 'closed')) class="blink" @endif id="{{$order->order_id}}" @if($order->order_status == 'cancel' || $order->order_status == 'closed') style="background:#ff000026" @endif > @endforeach @else @endif
# Order Next Delivery Date Product Qty Amount Pay_method Payment Status Delivery Action
{{ $index+1 }} #{{$order->order_id}}

{{Carbon\Carbon::parse($order->order_date)->format(Config::get('siteSetting.date_format'))}}

@if($order->order_status != 'cancel' && $order->order_status != 'closed' && $order->payment_method !='pending') {{Carbon\Carbon::parse($delivery_next_date)->format('d M, Y')}}
00

Days

00

HOURS

00

MINUTES

00

SECONDS

@else

Voucher {{$order->order_status}}

@endif
@if(count($order->order_details)>0) {{ $order->order_details[0]->product->title }} @endif {{$order->total_qty}} {{$order->currency_sign . ($order->total_price + $order->shipping_cost - $order->coupon_discount) }} @if($order->payment_method !='pending') {{ ucfirst(str_replace('-', ' ', $order->payment_method))}} @else Pending
Pay Now @endif
{{$order->payment_status}} @if($order->order_status == 'delivered') {{ str_replace('-', ' ', $order->order_status)}} @elseif($order->order_status == 'closed') {{ str_replace('-', ' ', $order->order_status)}} @elseif($order->order_status == 'accepted') Processing @elseif($order->order_status == 'ready-to-ship') {{ str_replace('-', ' ', $order->order_status)}} @elseif($order->order_status == 'cancel') {{ str_replace('-', ' ', $order->order_status)}} @elseif($order->order_status == 'on-delivery') {{ str_replace('-', ' ', $order->order_status)}} @elseif($order->order_status == 'return') {{ str_replace('-', ' ', $order->order_status)}} @else Pending @endif ( {{$order->voucher_timelines_count}} )
Times

No vouchers found.

@endsection @section('js') @endsection