
<?php $__env->startSection('main-container'); ?>

  <main id="main" class="main">
    <?php echo $__env->make('cdn', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
     <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
     <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
     <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js" integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous"></script>
     <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.min.js" integrity="sha384-cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz/bgldoEyl4H0zUF0QKbrJ0EcQF" crossorigin="anonymous"></script>
     <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<div>
  <a href="<?php echo e(url('/components-invoice')); ?>" type="button"  class="btn btn-link "><i class="bi bi-arrow-return-left"></i></a>
  <button type="button" onclick="printPageArea('print')" class="btn btn-link float-right"><i class="bi bi-printer"></i></button>
</div> 
<div id="print">


<div class="row invoice">

          <!-- Start .row -->
                    <div class="row" style="background:#eee;">
                      
                                <div class="col-sm-6 mt-3">
                                    <div  style="margin-left:12px;">
                                    <h6><?php echo e($companyinfo->c_name); ?></h6>
                                    <h6>Address:<?php echo e($companyinfo->address); ?></h6>
                                    <h6>Email: <?php echo e($companyinfo->email); ?></h6>
                                    <h6>Mobile: <?php echo e($companyinfo->c_phone); ?></h6>
                                    </div>
                                </div>
                    
                                <div class="col-sm-6 mt-3 text-end">
                                    <h3>INVOICE</h3>
                                    <h6>InvId.: #<?php echo e($invoice->id); ?></h6>
                                    <h6>Invoice Date: <?php echo e($invoice->created_at->format('m/d/Y')); ?></h6>
                                    <h6>GST: <?php echo e($companyinfo->gst_no); ?></h6>
                                    <!-- <p><strong>Status:</strong> <span class="label label-danger">UNPAID</span></p> -->
                                </div>
                        
                    </div>
                    <!-- col-lg-6 end here -->
                    <div class="col-lg-12">
                        <!-- col-lg-12 start here -->
                        
                        <div class="row mt-2" style="margin-left:1px;">
                            <div class="col-sm-6">
                            <ul class="list-unstyled">
                                <li><strong>Invoiced To</strong></li>
                                <li>Name: <?php echo e($customer->name); ?></li>
                                <li>Address: <?php echo e($customer->address); ?>, <?php echo e($customer->city_info->name); ?>,<?php echo e($customer->country_info->name); ?></li>
                                <li>Email: <?php echo e($customer->email); ?></li>
                                <li>Mobile: <?php echo e($customer->mobile); ?></li>
                            </ul>
                            </div>
                            <div class="col-sm-6">
                                <div class="text-end p-4" >
                                   <h6 ><strong>Payment Type:</strong> <?php echo e($invoice->paytype); ?></h6>
                                   <h6><strong>Shipping:</strong> <?php echo e($invoice->shipping); ?></h6>
                                </div>
                            </div>   
                        </div>
                        <div class="">
                          
                                <table class="table table-bordered">
                                    <thead>
                                        <tr style="background:#eee;">
                                            <th class="per70 text-center">Product Name</th>
                                            <th class="per5 text-center">Price(<?php echo e($invoice->currency); ?>)</th>
                                            <th class="per70 text-center">Qty</th>
                                            <th class="per25 text-center">Total(<?php echo e($invoice->currency); ?>)</th>
                                        </tr>
                                    </thead>
                                    <tbody>

                                         <?php $__currentLoopData = $records; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $record): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <tr >
                                                <td class="text-center"><?php echo e($record->product); ?></td>
                                                <td class="text-center"><?php echo e($record->price); ?></td>
                                                <td class="text-center"><?php echo e($record->qty); ?></td>
                                                <td class="text-center"><?php echo e($record->total); ?></td>
                                            </tr>
                                         <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> 
                                        
                                    </tbody>
                                    <tfoot>
                                        <tr>
                                            <th colspan="3" class="text-end">Grand Total(<?php echo e($invoice->currency); ?>)</th>
                                            <th class="text-center"><?php echo e($invoice->currency); ?> <?php echo e($grandtotal); ?></th>
                                        </tr>
                                        <tr>
                                            <th colspan="3" class="text-end">Tax(<?php echo e($tax); ?>%)</th>
                                            <th class="text-center"><?php echo e($invoice->currency); ?> <?php echo e($grandtotal*$tax/100); ?></th>
                                        </tr>
                                        <tr>
                                            <th colspan="3" class="text-end">Total Payable(<?php echo e($invoice->currency); ?>)</th>
                                            <th class="text-center"><?php echo e($invoice->currency); ?> <?php echo e($finalamt); ?></th>
                                        </tr>
                                        
                                    </tfoot>
                                </table>
                        
                        </div>
                   
            </div>

</div>


</div>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/1.13.1/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/buttons/2.3.2/js/dataTables.buttons.min.js
"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js
"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/buttons/2.3.2/js/buttons.html5.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/buttons/2.3.2/js/buttons.print.min.js"></script>
<script type="text/javascript">
function printPageArea(areaID){
    var printContent = document.getElementById(areaID).innerHTML;
    var originalContent = document.body.innerHTML;
    document.body.innerHTML = printContent;
    window.print();
    document.body.innerHTML = originalContent;
}
</script>
</main><!-- End #main -->
<?php $__env->stopSection(); ?>


<?php echo $__env->make('frontend.layouts.main', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\Family\resources\views/frontend/components-invoice.blade.php ENDPATH**/ ?>