<?php $__env->startSection('content'); ?>
<?php 
$currency =  setting_by_key("currency");
?>
 <div class="wrapper wrapper-content animated fadeInRight">
            <div class="row">
                <div class="col-lg-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5><?php echo app('translator')->getFromJson('online_orders.all_orders'); ?></h5>
                        
                    </div>
                    <div class="ibox-content">

                        <table class="table">
                    <thead>
                        <tr>
                            <th>#</th>
                            <th><?php echo app('translator')->getFromJson('common.name'); ?></th>
                            <th><?php echo app('translator')->getFromJson('common.email'); ?></th>
                            <th><?php echo app('translator')->getFromJson('common.phone'); ?></th>
							<th><?php echo app('translator')->getFromJson('common.amount'); ?></th>
                            <th><?php echo app('translator')->getFromJson('common.status'); ?></th>
							
                            <th></th>
                        </tr>
                    </thead>
                    <tbody>
                    <?php if(!empty($orders)): ?>
                        <?php $__empty_1 = true; $__currentLoopData = $orders; $__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->name); ?></td>
                               <td><?php echo e($sale->email); ?></td>
                               <td><?php echo e($sale->phone); ?></td>
                               <td><?php echo e($currency); ?> <?php echo e($sale->amount); ?></td>
									<?php if($sale->status == 1): ?>  
								<td>
                                    <a href="javascript:void(0)" class="btn btn-primary btn-xs "><?php echo app('translator')->getFromJson('online_orders.completed'); ?></a>
                                </td>
									<?php elseif($sale->status == 2): ?>  
								<td>
                                    <a href="javascript:void(0)" class="btn btn-warning btn-xs"><?php echo app('translator')->getFromJson('online_orders.pending'); ?></a>
                                </td>
									<?php else: ?>
									<td>
                                    <a href="javascript:void(0)" class="btn btn-danger btn-xs"><?php echo app('translator')->getFromJson('online_orders.cancelled'); ?></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"><?php echo app('translator')->getFromJson('common.show'); ?></a>
                                </td>
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                           <tr> 
						  <td colspan="5">
								 <?php echo app('translator')->getFromJson('common.no_record_found'); ?>
									
                                </td>
								</tr>
                        <?php endif; ?>
                    <?php endif; ?>
                    </tbody>
                </table>
				<?php echo $orders->render(); ?>


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


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