@extends('admin.main')
@section('content')
<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
    <h1>
        Orders
        <!-- <small>Optional description</small> -->
    </h1>
    <ol class="breadcrumb">
        <li><a href="{{ url ('admin') }}"><i class="fa fa-dashboard"></i> Dashboard</a></li>
        <li class="active"> Orders</li>
    </ol>
    </section>

    <!-- Main content -->
    <section class="content container-fluid">
        <div class="row">
            <div class="col-md-12">
                <div class="box">
                    <div class="box-header with-border">
                       <h4 class="box-title">Order List</h4>
                    </div>
                    <div class="box-body">
                        <div class="row">
                        <div class="col-md-12">
                            <div class="table-responsive"> 
                                <table id="orders_table" class="table table-bordered table-hover">
                                    <thead>
                                        <tr>
                                            <th>Store</th>
                                            <th>Invoice #</th>
                                            <th>Currency</th>
                                            <th>Tax</th>
                                            <th>Subtotal</th>
                                            <th>Total</th>
                                            <th>Date</th>
                                            <th class="text-center">Action</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        @foreach($array_payment_details as $pd_row)
                                            <tr>
                                                <td>{{ $pd_row->StoreName }}</td>
                                                <td>{{ $pd_row->InvoiceNumber }}</td>
                                                <td>{{ $pd_row->Currency }}</td>
                                                <td>{{ $pd_row->Tax }}</td>
                                                <td>{{ $pd_row->SubTotal  }}</td>
                                                <td>{{ $pd_row->Total }}</td>
                                                <td>{{ date("F j, Y g:i a", strtotime($pd_row->DateCreated)) }}</td>
                                                <td class="text-center"><a href="{{ url('admin/orders/view') . '/' . $pd_row->CartKey }}" class="btn btn-link btn-xs">View Details</a></td>   
                                            </tr>
                                        @endforeach
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <!-- /.content -->
</div>
@endsection