<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300&display=swap" rel="stylesheet">
@foreach($cus as $cuse)
@php $deli=0; $tot=0; $unit=0; @endphp

        <div class="row" style="font-size:25px;font-family: 'Open Sans', sans-serif;">
            <div class="col-xs-3">
                Invoice Number
            </div>
            <div class="col-xs-2" style="margin: 5mm 0mm 0mm 0mm; text-align: center;align-self: center;">
                    {!!DNS1D::getBarcodeHTML($cuse->id, 'C128',2,33)!!} 
                    <p style="margin: -2mm 0mm 0mm 0mm;font-size:12px">{{$cuse->id}}</p>
            </div>
            <div class="col-xs-7" style="text-align: center;">
                    COD AMOUNT :  @if($cuse->ordertype== 1) @if($cuse->paymentmethod=="paid")0.00 <b> Already Paid</b>@else {{$cuse->cod}} @endif @elseif($cuse->ordertype== 2)0.00 @endif
                    @if($cuse->ordertype==2)
                    <p style="margin: -3mm 0mm 0mm 0mm;font-size:14px">Exchange Order</p>
                    @endif
            </div>
            </div>


            <div class="row" style="font-size:14px;font-family: 'Open Sans', sans-serif;">

                
                <div class="col-xs-5">
                <div style="text-align: center;"><img src="uploads/{{$cuse->getpage2->image}}" alt="" style="height: 50px;"></div>
                    <h5><b> Issued Date :</b> {{$ldate}} </h5>
                    <h5><b>Online Store :</b>{{$cuse->getpage2->companyname}}</h5>
                     <h5><b>Address :</b>  {{$cuse->getpage2->address}} </h5>
                   <h5> <b>Tel :</b>   {{$cuse->getpage2->phone}} </h5>
                </div>
                <div class="col-xs-6" style="border-left: 1px solid black;">
                
                
                  <h5><b>To : </b> {{$cuse->name}}</h5>
                  <h5><b>Address : </b> {{$cuse->address}} </h5>
                  <h5><b>Phone No : </b> {{$cuse->phone}} / {{$cuse->secondaryphone}}</h5>
                  <h5><b>Nearest City :</b>  {{$cuse->getcity->city}} </h5>
                  <h5><b>District : </b>{{$cuse->district}}</h5>
                </div>               
            </div>
            <div class="row">
                <div class="col-xs-12col-md-12">
 <table class="table" id="book-table" name="book-table" style="font-size: 10px;">
            <thead>
                  <tr>
                    <th style="width:60px;" class="text-center">QTY</th>
                    <th class="text-left">DESCRIPTION</th>
                    <th style="width:140px" class="text-right">UNIT PRICE</th>
                    <th style="width:90px" class="text-right">TOTAL</th>
   
                  </tr>
            </thead>
            <tbody>
                    
            @foreach($cuse->cus_or as $data) 
                    <tr>
                        <td class="text-center">{{ $data->qty }}</td>
                        <td>                       
                        {{$data->orders->pro_name}}
                        </td>
                        <td class="text-right">{{ $data->pro_amount }}</td>
                        <td class="text-right"> {{ $data->qty * $data->pro_amount }}
                        </td>
                        <input type="hidden" value="">
                    </tr>            
                @endforeach
                    <tr>
                            <td colspan="2" rowspan="4">
                             
                              <td class="text-right"><strong>Delivery Charge</strong></td>
                              <td class="text-right">{{$cuse->deliverycharge}}</td>
                          </tr>

                          <tr>
                            <td class="text-right no-border">
                              <strong>Total</strong>
                            </td>
                            <td class="text-right"><strong>@if($cuse->ordertype== 2)0.00 @else {{$cuse->cod}} @endif</strong></td>
                          </tr>
            </tbody>
        </table> 
                </div> 
            </div>
            <hr class="new2" style="margin: -40px;">
            <div class="breakNow"></div>
@endforeach



<style>
    hr.new2 {
  border-top: 1px dashed black;
}

h5{
    font-size:14px;
    font-family: 'Open Sans', sans-serif;
}
b{
    font-size:14px;
    font-family: 'Open Sans', sans-serif;
}

div.breakNow { page-break-inside:avoid; page-break-after:always; }
.center {
                text-align: center;
            }



/* @page  {
        margin: 1cm;
    } */

    @page  {
        margin: -0.1cm 1cm 1cm 1cm;
    }
</style>