

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


 
<div class="card mb-4">
    <div class="card-header">
        <div class="d-flex">
            <div class="mr-auto p-2 align-self-center"><h4>Orders</h4></div>
            <div class="p-2">              
            <!-- <a class="btn btn-primary" href=""><i class="fa fa-plus"></i> ADD New</a> -->
            </div>           
        </div>
    </div>
    <div class="card-body">
        <div class="table-responsive">
            <table class="table table-hover">
                <thead>
                    <tr>
                    <?php $Slno=0; ?>
                        <th>Slno</th>
                        <th>Order No.</th>
                        <th>Customer</th>
                        <th>Mobile</th>
                        <th>Status</th>
                        <th>Rack</th>
                        <th>Godown</th>                     
                        <th colspan="2">Actions</th>
                    </tr>
                </thead>
                <?php if($PlacedOrders): ?>
                <tbody>
                    <?php $__currentLoopData = $PlacedOrders; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $PlacedOrder): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <tr>
                        <td ><?php echo e(++$Slno); ?></td>
                        <td><?php echo e($PlacedOrder->id); ?></td>
                        <td><?php echo e($PlacedOrder->user->name); ?></td>
                        <td><?php if($PlacedOrder->user->mobile): ?><?php echo e($PlacedOrder->user->mobile->mobile); ?><?php endif; ?></td>
                        <td><?php echo e($PlacedOrder->status->title); ?></td>
                        <?php if($PlacedOrder->rack): ?>
                            <td><?php echo e($PlacedOrder->rack->title); ?></td>
                        <?php else: ?>
                            <td>Not Selected</td>
                        <?php endif; ?>    
                        <?php if($PlacedOrder->rack): ?>
                            <td><?php echo e($PlacedOrder->rack->godown->title); ?></td>
                        <?php else: ?>
                            <td>Not Selected</td>
                        <?php endif; ?> 
                        <td>
                            <?php if($PlacedOrder->status->id<='3'): ?>
                            <a href="<?php echo e(route('OrderDetails.View',$PlacedOrder->id)); ?>"><button type="button" class="btn btn-info">View</button></a>
                            <?php elseif(($PlacedOrder->status->id>'3')&&($PlacedOrder->status->id<'6')): ?>
                            <a href="<?php echo e(route('pickupDetails.View',$PlacedOrder->id)); ?>"><button type="button" class="btn btn-dark">View</button></a>
                            <?php elseif($PlacedOrder->status->id>='6'): ?>
                            <a href="<?php echo e(route('returnDetails.View',$PlacedOrder->id)); ?>"><button type="button" class="btn btn-primary">View</button></a>
                            <?php endif; ?>
                            <?php if($PlacedOrder->status->id>='6'): ?>
                            <a href="<?php echo e(route('InvoicePrint',$PlacedOrder->id)); ?>"><button type="button" class="btn btn-secondary">Inovice</i></button></a>
                            <?php endif; ?>
                        </td>
                                              
                    </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </tbody>
                <?php endif; ?>
            </table>
        </div>
    </div>
    <div class="card-footer">
    
        <div class="d-flex justify-content-end font-weight-bold"><h5>Total: <?php echo e($PlacedOrders->Count()); ?></h5></div>        
    </div>
</div>

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


<?php echo $__env->make('layouts.adminapp', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/exouzia1/public_html/tailor/resources/views/DeliveryManager/index.blade.php ENDPATH**/ ?>