<!-- 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">

<?php $__currentLoopData = $cus; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $cuse): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php $deli=0; $tot=0; $unit=0; ?>

<table class="table table-borderless" boder="0">
  <tbody>
    <tr>
      <th><h3>Invoice Number :</h3></th>
      <td>
      <p style="margin: 2mm 0mm 0mm 0mm;"><?php echo e($cuse->id); ?></p>
       <?php echo DNS1D::getBarcodeHTML($cuse->id, 'C39'); ?> 
      </td>
      <td ><h4>Issued date - <?php echo e($ldate); ?> </h4></td>
    </tr>
  </tbody>
</table>

    <div class="row">
        <div class="col-xs-6">
        <h5>Customer Name : <?php echo e($cuse->getseholsellername->name); ?></h5>
        <h5>Address : <?php echo e($cuse->getseholsellername->address); ?></h5>
        <h5>Phone Number : <?php echo e($cuse->getseholsellername->phone); ?></h5>
        </div>  
        <div class="col-xs-5" align="right">
            <h5>Wasi Mart Holdings [pvt] Ltd</h5>
            <h5>Nugegoda.</h5>
            <h5>01111111111</h5>
            <h5>wasimart.lk@gmail.com</h5>
        </div>    
    </div>

<hr>


            <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>
                    
            <?php $__currentLoopData = $prod; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> 
                    <tr>
                        <td class="text-center"><?php echo e($data->qty); ?></td>
                        <td><?php echo e($data->wholsepro->name); ?>

                        <?php if($data->attribute=="null" or $data->attribute==""): ?>
                        <?php else: ?>
                            <?php $__currentLoopData = json_decode($data->attribute); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $val): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                (<?php echo e($key); ?>:<?php echo e($val); ?>)
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        <?php endif; ?>
                        </td>
                        <td class="text-right"><?php echo e($data->unitprice); ?></td>
                        <td class="text-right"><?php echo e($data->unitprice * $data->qty); ?>

                        </td>
                        <input type="hidden" value="">
                    </tr>            
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    <tr>                             
                              <td class="text-right" colspan="3"><strong>Total</strong></td>
                              <td class="text-right"><?php echo e($cuse->total); ?></td>
                          </tr>

                        <?php $__currentLoopData = $paidp; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $pdata): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                          <tr style="color: red;">
                            <td class="text-right no-border" colspan="3">
                            <?php if($pdata->paymenttype == "cheque" OR $pdata->paymenttype == "credit"): ?>
                            
                            <?php echo e($pdata->paymenttype); ?> &nbsp;&nbsp;- &nbsp;&nbsp;#<?php echo e($pdata->checkno); ?>&nbsp;&nbsp; -&nbsp;&nbsp; <?php echo e($pdata->ccdate); ?>

                            
                            <?php else: ?>                            
                            <?php echo e($pdata->paymenttype); ?> &nbsp;&nbsp;- &nbsp;&nbsp;<?php echo e($pdata->paiddate); ?>

                            <?php endif; ?>
                            </td>
                            <td class="text-right"><strong><?php echo e($pdata->amount); ?></strong></td>
                          </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>


            </tbody>
        </table> 
                </div> 
            </div>
            
            
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>


<style>

      hr {
            position: relative;
            border: none;
            height: 1px;
            background: black;
        }
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>