<?php $__env->startSection('content'); ?>
 <div class="wrapper wrapper-content">
        <div class="row">
            <div class="col-lg-2">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <span class="label label-info pull-right"><?php echo e($total_sales_today); ?></span>
                        <h5>Today</h5>
                    </div>
                    <div class="ibox-content">
                        <h1 class="no-margins"><?php echo e($today); ?></h1>
                    </div>
                </div>
            </div>
            <div class="col-lg-2">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <span class="label label-info pull-right"><?php echo e($total_sales_yesterday); ?></span>
                        <h5>Yesterday</h5>
                    </div>
                    <div class="ibox-content">
                        <h1 class="no-margins"><?php echo e($yesterday); ?></h1>
                        
                    </div>
                </div>
            </div>

			
			 <div class="col-lg-2">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
					<span class="label label-info pull-right"><?php echo e($total_sales_last_week); ?></span>
                        <h5>Last 7 Days</h5>
                    </div>
                    <div class="ibox-content">
                        <h1 class="no-margins"><?php echo e($last_week); ?></h1>
                       
                    </div>
                </div>
            </div>

			
			 <div class="col-lg-2">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
					<span class="label label-info pull-right"><?php echo e($total_sales_last_month); ?></span>
                         <h5>Last 30 Days</h5>
                    </div>
                    <div class="ibox-content">
                        <h1 class="no-margins"><?php echo e($last_month); ?></h1>
                        <!--<div class="stat-percent font-bold text-info">20% <i class="fa fa-level-up"></i></div>
                        <small>New orders</small> -->
                    </div>
                </div>
            </div>
			
			<div class="col-lg-4">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <span class="label label-info pull-right"><?php echo e($total_sales); ?> </span>
                        <h5>Total Sales</h5>
                    </div>
                    <div class="ibox-content">
                        <h1 class="no-margins"><?php echo e($total_earning); ?></h1>
                        
                    </div>
                </div>
            </div>
			
			
            
        </div>
       

        <div class="row">

        <div class="col-lg-12">
        <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5> Last 10 Sales </h5>
            <div class="ibox-tools">
                <a class="collapse-link">
                    <i class="fa fa-chevron-up"></i>
                </a>
            </div>
        </div>
        <div class="ibox-content">
           
            <div class="table-responsive">
                <table class="table table-striped">
                    <thead>
                        <tr>
                            <th>#</th>
                            <th>Cashier</th>
                            <th>Customer</th>
                            <th>Sales Date</th>
                            <th>Status</th>
                            <th></th>
                        </tr>
                    </thead>
                    <tbody>
                    <?php if(!empty($sales)): ?>
                        <?php $__empty_1 = true; $__currentLoopData = $sales; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $sale): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                            <tr>
                                <td><?php echo e($key + 1); ?></td>
                               <td><?php echo e($sale->cashier['name']); ?></td>
                               <td><?php echo e($sale->customer['name']); ?></td>
                                <td><?php echo e($sale->created_at->format('d F Y')); ?></td>
								<?php if($sale->status == 1): ?>  
								<td>
                                    <a href="javascript:void(0)" class="btn btn-primary btn-xs ">Completed</a>
                                </td>
									<?php else: ?>
								<td>
                                    <a href="javascript:void(0)" class="btn btn-danger btn-xs">Canceled</a>
                                </td>
									<?php endif; ?>
								
                                <td>
								  <a target="_blank" href="<?php echo e(url('sales/receipt/' . $sale->id)); ?>" class="btn btn-primary btn-xs pull-right">Show</a>
									
                                </td>
								
								
								
								
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                            <?php echo $__env->make('partials.table-blank-slate', ['colspan' => 5], array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                        <?php endif; ?>
                    <?php endif; ?>
                    </tbody>
                </table>
            </div>

        </div>
        </div>
        </div>
		
		

        </div>


        </div>
<?php $__env->stopSection(); ?>

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