<?php $__env->startSection('content'); ?>
<?php $currency =  setting_by_key("currency"); ?>
<div class="row wrapper border-bottom white-bg page-heading">
                <div class="col-lg-10">
                    <h2>Sale Invoice </h2>
                    <ol class="breadcrumb">
                        <li>
                            <a href="<?php echo e(url('')); ?>">Home</a>
                        </li>
                     
                        <li class="active">
                            <strong>Invoice </strong>
                        </li>
                    </ol>
                </div>
                <div class="col-lg-2">

                </div>
            </div>
			

<div class="wrapper wrapper-content animated fadeInRight">
                    <div class="ibox-content p-xl">
					<div class="row">
                                <div class="col-sm-6">
                                    <h5>From:</h5>
                                    <address>
                                        <strong><?php echo e($sale->name); ?></strong><br>
                                        <?php echo e($sale->address); ?><br>
                                        <abbr title="Phone">P:</abbr> <?php echo e($sale->phone); ?><br>
                                        <abbr title="Email">E:</abbr> <?php echo e($sale->email); ?>

                                    </address>
                                </div>

                                <div class="col-sm-6 text-right">
                                    <h4>Invoice No.</h4>
                                    <h4 class="text-navy"> <?php echo e($sale->invoice_no); ?></h4>
                                    
                                    <p>
                                        <span><strong>Date:</strong> <?php echo date('d M, Y' , strtotime($sale->created_at)); ?></span><br/>
                                    </p>
                                </div>
                            </div>
							
                            <div class="table-responsive m-t">
                                <table class="table invoice-table">
                                    <thead>
                                    <tr>
                                        <th>Product Name</th>
                                        <th>Qty</th>
                                        <th>Unit Price</th>
                                        <th>Total Amount </th>
                                       
                                    </tr>
                                    </thead>
                                    <tbody>
									<?php $__currentLoopData = $sale->items; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $k=>$item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <tr>
                                        <td><?php echo e($item->product->name); ?>(<?php echo e(substr($item->size , 0, 1)); ?>)</td>
                                        <td><?php echo e($item->quantity); ?></td>
                                        <td><?php echo e($currency); ?><?php echo e($item->price); ?></td>
                                        <td><?php echo e($currency); ?><?php echo e($item->quantity * $item->price); ?></td>
                                    </tr>
									<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    
                                    </tbody>
                                </table>
                            </div><!-- /table-responsive -->

                            <table class="table invoice-total">
                                <tbody>
                                <tr>
                                    <td><strong>Sub Total :</strong></td>
                                    <td><?php echo e($currency); ?><?php echo e($sale->subtotal); ?></td>
                                </tr>
								 <tr>
                                    <td><strong>TAX :</strong></td>
                                    <td><?php echo e($currency); ?><?php echo e($sale->vat); ?></td>
                                </tr>
								
								<tr>
                                    <td><strong>Delivery Cost :</strong></td>
                                    <td><?php echo e($currency); ?><?php echo e($sale->delivery_cost); ?></td>
                                </tr>
								
								
                                <tr>
                                    <td><strong>DISCOUNT :</strong></td>
                                    <td><?php echo e($currency); ?><?php echo e($sale->discount); ?></td>
                                </tr>
                                <tr>
                                    <td><strong>TOTAL :</strong></td>
                                    <td><?php echo e($currency); ?><?php echo e($sale->subtotal + $sale->vat + $sale->delivery_cost); ?></td>
                                </tr>
                                </tbody>
                            </table>
							
                            <div class="well m-t"><strong>Comments</strong>
                               <?php echo e($sale->comment); ?>

                            </div>
                        </div>
                </div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>