@extends('vendor.layout.main')
@section('content')  
<div class="row">
    <div class="col-lg-12" style="padding-left: 4px;padding-right: 4px;">
        <div class="card m-b-30" style="border-radius: 5px;">
            <div class="card-body">
                <div class="invoice">
                    <div class="invoice-head">
                        <div class="row">
                            <div class="col-12 col-md-7 col-lg-7">
                                <div class="invoice-logo">
                                    <img src="{{asset('web/images/logo/logo-6.png')}}" class="img-fluid">
                                </div>
                                <p style="color: #656c75" class="mb-0">Palton, Dhaka.</p>
                            </div>
                            <div class="col-12 col-md-5 col-lg-5">
                                <div class="invoice-name">
                                    <h5 class="text-uppercase mb-3">Invoice</h5>
                                    <p style="color: #656c75" class="mb-1">No : #{{$ord_data->id}}</p>
                                    <p style="color: #656c75" class="mb-0">{{ date_format(date_create($ord_data->created_at), 'd M, Y') }}</p>
                                    @if(is_null($ord_data->grand_total))
                                    <h4 class="text-success mb-0 mt-3">৳{{$ord_data->sub_total}}</h4>
                                    @else
                                    <h4 class="text-success mb-0 mt-3">৳{{$ord_data->grand_total}}</h4>
                                    @endif
                                </div>
                            </div>
                        </div>
                    </div> 
                    <div class="invoice-billing">
                        <div class="row">
                            <div class="col-sm-6 col-md-4 col-lg-4">
                                <div class="invoice-address">
                                    <h6 class="mb-3">Ship & Bill To,</h6>
                                    <h6>{{$ord_data->cus_name}}</h6>
                                    <ul class="list-unstyled">
                                        <li style="color: #656c75">{{$ord_data->address}}, {{$ord_data->state}}, {{$ord_data->city}} - {{$ord_data->zip}}, {{$user_data->country}} </li>
                                        <li style="color: #656c75">{{$ord_data->cus_mobile}}</li>  
                                    </ul>
                                </div>
                            </div>
                            <div class="col-sm-6 col-md-4 col-lg-4">
                               <div class="invoice-address">
                                    <h6 class="mb-3">Order Info,</h6>
                                    <ul class="list-unstyled">
                                        <li style="color: #656c75"><span style="font-weight:bold;">Shop: </span> {{$shop->name}} </li>
                                        <li style="color: #656c75"><span style="font-weight:bold;">Status:</span> @if($ord_data->status == 0) <span style="color: red;">Pending</span> @else <span style="color: green;">Delivered</span> @endif </li>  

                                    </ul>
                                </div> 
                            </div>
                            <div class="col-sm-12 col-md-4 col-lg-4">
                                <div class="invoice-address">
                                    <div class="card">
                                        <div class="card-body bg-info-rgba text-center">
                                            <h6>Payment Method</h6>
                                            <p><i class="mdi mdi-wallet text-info font-40"></i></p>
                                            <p style="color: #c2ae54;font-size: 17px;font-weight: 700;font-family: cursive;">{{$ord_data->payment_method}}</p>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>  
                    <div class="invoice-summary">
                        <div class="table-responsive">
                            <table class="table table-borderless">
                                <thead>
                                    <tr>
                                        <th scope="col">No</th>   
                                        <th scope="col">Product</th>
                                        <th scope="col">Qty</th>
                                        <th scope="col">Price</th>
                                        <th scope="col" class="text-right">Total</th>
                                    </tr>
                                </thead>
                                <tbody>
                                 
                                    @foreach($pro_data as $pro)
                                    <tr>
                                        <th scope="row">#</th>
                                        <td>{{$pro->product_title}}</td>
                                        <td>{{$pro->product_qty}}</td>
                                        <td>{{$pro->product_price}}</td>
                                        <td class="text-right">{{$pro->product_price*$pro->product_qty}}</td>
                                    </tr> 
                                    @endforeach                              
                                 
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <div class="invoice-summary-total">
                        <div class="row">
                            <div class="col-md-12 order-2 order-lg-1 col-lg-5 col-xl-6">
                                <div class="order-note">
                                    @if(is_null($ord_data->shipping_charges))
                                    <p class="mb-3"><span class="badge badge-info-inverse font-14">This is Free Shipping Order</span></p>
                                    @endif
                                    <h6>Special Note for this order:</h6>
                                    <p style="color: #656c75">Please, Contact to Support, if you not received your product.</p>
                                </div>
                            </div>
                            <div class="col-md-12 order-1 order-lg-2 col-lg-7 col-xl-6">
                                <div class="order-total table-responsive ">
                                    <table class="table table-borderless text-right">
                                        <tbody>
                                            <tr>
                                                <td>Sub Total :</td>
                                                <td>{{$ord_data->sub_total}}</td>
                                            </tr>
                                            <tr>
                                                <td>Shipping Charges :</td>
                                                @if(is_null($ord_data->shipping_charges))
                                                <td>0.00</td>
                                                @else
                                                <td>{{$ord_data->shipping_charges}}</td>
                                                @endif

                                            </tr>
                                            <tr>
                                                <td>Tax (0%) :</td>
                                                <td>0.00</td>
                                            </tr>
                                            <tr>
                                                <td class="f-w-7 font-18"><h5>Grand Total :</h5></td>
                                                @if(is_null($ord_data->grand_total))
                                                <td class="f-w-7 font-18"><h5>{{$ord_data->sub_total}}</h5></td>
                                                @else
                                                <td class="f-w-7 font-18"><h5>{{$ord_data->grand_total}}</h5></td>
                                                @endif
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="invoice-meta">
                        <div class="row">
                            <div class="col-sm-6 col-md-4 col-lg-4">
                                <div class="invoice-meta-box">
                                    <h6 class="mb-3">Terms &amp; Conditions</h6>
                                    <ul class="pl-3">
                                        <li style="color: #656c75">Goods once sold will not be taken back.</li>  
                                        <li style="color: #656c75">We are responsible for Quality.</li>  
                                        <li style="color: #656c75">Receive Product from Office.</li>  
                                    </ul>
                                </div>
                            </div>
                            <div class="col-sm-6 col-md-4 col-lg-4">
                                <div class="invoice-meta-box">
                                    <h6 class="mb-3">Contact Us</h6>
                                    <ul class="list-unstyled">
                                        <li style="color: #656c75"><i class="feather icon-aperture mr-2"></i>www.osbbl.shop</li>  
                                        <li style="color: #656c75"><i class="feather icon-mail mr-2"></i>info@osbbl.shop</li>  
                                        <li style="color: #656c75"><i class="feather icon-phone mr-2"></i>01940243031</li>  
                                    </ul>
                                </div>
                            </div>
                            <div class="col-sm-12 col-md-4 col-lg-4" >
                                <div class="invoice-meta-box text-right">
                                    <h6 class="mb-0">Authorized Signatory</h6>
                                </div>
                            </div>
                        </div>
                    </div> 
                    <div class="invoice-footer">
                        <div class="row align-items-center">
                            <div class="col-md-6">
                                <p class="mb-0">Thank yopu for your Business.</p>
                            </div>
                            <div class="col-md-6">
                                <div class="invoice-footer-btn">
                                    <a href="javascript:window.print()" class="btn btn-primary-rgba py-1 font-16"><i class="feather icon-printer mr-2"></i>Print</a>
                                </div>
                            </div>
                        </div>
                    </div>                                   
                </div>
            </div>
        </div>
    </div>
</div>
@endsection