<div class="col-sm-12">
                        <div class="white-box">
                            <!-- <div class="pull-right">
                                <?php if (\Illuminate\Support\Facades\Blade::check('permission', 'create-inventory')): ?>
                                <a href="<?php echo e(route('inventory.add')); ?>" class="btn  btn-primary">
                                    <i class="fa fa-plus-square"></i>&nbsp; Add new Inventory
                                </a>
                                <?php endif; ?>
                            </div> -->
                            <h3 class="box-title">All Inventories (<?php echo e(number_format(count($allInventories))); ?>)</h3>

                            <div class="table-responsive">
                                
                                    <table id="myTable" class="table table-striped">
                                        <thead>
                                            <tr>
                                                <th>Sr #</th>
                                                <th>Project</th>
                                                <th>Unit #</th>
                                                <!-- <th>floor</th>
                                                                        <th>Type</th> -->
                                                <th>Size</th>
        
                                                <th>Net Amount</th>
                                                <th>Status</th>
                                                <th>Action</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <?php $count = 1; ?>
                                            <?php if (\Illuminate\Support\Facades\Blade::check('permission', 'view-inventory')): ?>
                                                <?php $view_inventory = true; ?>
                                            <?php else: ?>
                                                <?php $view_inventory = false; ?>
                                            <?php endif; ?>
                                            <?php if (\Illuminate\Support\Facades\Blade::check('permission', 'edit-inventory')): ?>
                                                <?php $edit_inventory = true; ?>
                                            <?php else: ?>
                                                <?php $edit_inventory = false; ?>
                                            <?php endif; ?>
                                            <?php if (\Illuminate\Support\Facades\Blade::check('permission', 'delete-inventory')): ?>
                                                <?php $delete_inventory = true; ?>
                                            <?php else: ?>
                                                <?php $delete_inventory = false; ?>
                                            <?php endif; ?>
                                            <?php if (\Illuminate\Support\Facades\Blade::check('role', 'admin')): ?>
                                                <?php $admin = true; ?>
                                            <?php else: ?>
                                                <?php $admin = false; ?>
                                            <?php endif; ?>
        
                                            <?php $__currentLoopData = $allInventories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $i): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <tr>
                                                    <td><?php echo e($count++); ?></td>
                                                    <td><?php echo e($i->multiProject ? $i->multiProject->name : 'None'); ?>

        
                                                    </td>
                                                    <td>
                                                        <?php if (\Illuminate\Support\Facades\Blade::check('permission', 'view-inventory')): ?>
                                                            <a
                                                                href="<?php echo e(route('inventory.detail', ['id' => $i->id])); ?>"><?php echo e($i->unit_number); ?></a>
                                                        <?php else: ?>
                                                            <?php echo e($i->unit_number); ?>

                                                        <?php endif; ?>
        
                                                    </td>
        
                                                    <td><?php echo e($i->size ? $i->size->name : ''); ?>

        
                                                        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('isSuperAdmin')): ?>
                                                        <?php
                                                        if ($i->multiProject->type->id == \App\ProjectType::society) {
                                                            $size = \App\ProjectType::society_size;
                                                        } else {
                                                            $size = \App\ProjectType::high_rise_size;
                                                        }
                                                        ?>
                                                        <?php endif; ?>
                                                       
                                                        <?php echo e($size); ?>

                                                    </td>
                                                    <td><?php echo e(number_format($i->total_price)); ?></td>
        
                                                    <?php if($admin): ?>
                                                        <?php if($i->status == \App\Inventory::open): ?>
                                                            <td><span class="label label-success">Open</span></td>
                                                        <?php elseif($i->status == \App\Inventory::package_open_file): ?>
                                                            <td><span class="label label-success">Open/Dealer Package File</span></td>
                                                        <?php elseif($i->status == \App\Inventory::package_open_file_refunded): ?>
                                                            <td><span class="label label-success">Open/Dealer Package Refunded</span></td>
                                                        <?php elseif($i->status == \App\Inventory::sold): ?>
                                                            <td><span class="label label-danger">Sold</span></td>
                                                        <?php elseif($i->status == \App\Inventory::hold_client): ?>
                                                            <td><span class="label label-primary">Client Hold</span></td>
                                                        <?php elseif($i->status == \App\Inventory::hold_company): ?>
                                                            <td><span class="label label-primary">Company Hold</span></td>
                                                        <?php elseif($i->status == \App\Inventory::token_hold): ?>
                                                            <td><span class="label label-primary">Token Hold</span></td>
                                                        <?php elseif($i->status == \App\Inventory::temp_hold): ?>
                                                            <td><span class="label label-primary">Temporary Hold</span></td>
                                                        <?php else: ?>
                                                            <td></td>
                                                        <?php endif; ?>
                                                    <?php else: ?>
                                                        <?php if($i->status == \App\Inventory::open): ?>
                                                            <td><span class="label label-success">Open</span></td>
                                                        <?php else: ?>
                                                            <td><span class="label label-danger">Sold</span></td>
                                                        <?php endif; ?>
                                                    <?php endif; ?>
                                                    <td class="text-nowrap">
                                                        <?php if($view_inventory): ?>
                                                            <a href="<?php echo e(route('inventory.detail', ['id' => $i->id])); ?>"
                                                                data-toggle="tooltip" data-original-title="View"> <i
                                                                    class="fa fa-eye text-inverse m-r-10"></i> </a>
                                                        <?php endif; ?>
        
                                                        <?php if($i->status != \App\Inventory::package_open_file): ?>
                                                        <?php if($edit_inventory): ?>
                                                            <a href="<?php echo e(route('inventory.editView', ['id' => $i->id])); ?>"
                                                                data-toggle="tooltip" data-original-title="Edit"> <i
                                                                    class="fa fa-pencil text-inverse m-r-10"></i> </a>
                                                        <?php endif; ?>
                                                        <?php endif; ?>
        
                                                        
                                                        <?php if($delete_inventory): ?>
                                                            <a data-toggle="confirmation" data-title="Are you sure to delete?"
                                                                href="<?php echo e(route('inventory.delete', ['id' => $i->id])); ?>"> <i
                                                                    class="fa fa-close text-danger"></i> </a>
                                                        <?php endif; ?>
                                                    </td>
                                                </tr>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        
                                        </tbody>
                                        
                                    </table>
                                   
                            </div>
                        </div>
                    </div><?php /**PATH C:\xampp\htdocs\erpv7\resources\views/inventory/update-table.blade.php ENDPATH**/ ?>