@if($user->orders)
    <table class="table table-responsive table-hover table-bordered">
        <tr>
            <th>{{__('frontside.orders.ord_id')}}</th>
            <th>{{__('frontside.orders.created_at')}}</th>
            <th>{{__('frontside.orders.buyer')}}</th>
            <th>{{__('frontside.orders.ord_adress')}}</th>
            <th>{{__('frontside.orders.ord_email')}}</th>
            <th>{{__('frontside.orders.ord_phone')}}</th>
            <th>{{__('frontside.orders.ord_status')}}</th>
            <th>{{__('frontside.orders.total')}}</th>
            <th>{{__('frontside.orders.view')}}</th>
        </tr>

    @foreach($user->orders as $order)
        <tr>
            <td>{{$order->ord_id}}</td>
            <td>{{sr_date($order->created_at)}}</td>
            <td>{{!is_null($order->ord_company) ? $order->ord_company.' - ' : ''}}{{$order->ord_lname}} {{$order->ord_fname}}</td>
            <td>{{$order->ord_adress}}</td>
            <td>{{$order->ord_email}}</td>
            <td>{{$order->ord_phone}}</td>
            <td>{{$order->ord_status}}</td>
            <td>{{number_format($order->ord_total, 2, '.', ',')}}</td>
            <td>
                <a class="btnn btn-primary  btn-xs" href="{{locRoute('user.order', ['orderid' => $order->ord_id])}}">
                    <i class="fa fa-eye"></i> {{__('frontside.orders.view')}}
                </a>
            </td>
        </tr>
        {{--<pre>{{print_r($order,true)}}</pre>
        <pre>{{print_r($order->items,true)}}</pre>--}}
    @endforeach
    </table>
    {{--<pre>{{print_r($user->orders,true)}}</pre>--}}
@else
<div class="text-center"><strong>Jos uvek niste napravili nijednu porudzbinu</strong></div>
@endif

