 <style> .red { color: #eb4034; } .uppercase { text-transform: uppercase } <?php if(isset($isExcel)): ?> #tb td, #tb th { border: 1px solid #000000; } td { text-align: center; } th { text-align: center; } <?php endif; ?> </style> <table class="table table-striped table-bordered table-hover" id="tb"> <tr> <th colspan="6" class="uppercase">Báo cáo chi tiết hiện trạng thuê</th> </tr> <tr> <th>STT</th> <th>Nhà</th> <th>Phòng</th> <th>Số chỗ</th> <th>Đang ở</th> <th>Hiện trạng</th> </tr> <tr> <td><strong>I</strong></td> <td><strong>Tất cả</strong></td> <td><strong>Tất cả</strong></td> <td><?php echo e($numberRoom); ?></td> <td><?php echo e($numberRenterRoom); ?></td> <td></td> </tr> <?php $__currentLoopData = $hostels; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $hostel): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php $cnt= App\Components\Functions::getNumberRoomsHostel2($hostel); ?> <tr> <td><strong><?php echo e(App\Components\Functions::numberToRomanRepresentation($loop->index + 2)); ?></strong></td> <td rowspan="<?php echo e($hostel->rooms->count() + 1); ?>"> <strong><?php echo e($hostel->name); ?></strong></td> <td><strong>Tất cả</strong></td> <td><strong><?php echo e($cnt['number_rooms']); ?></strong></td> <td><strong><?php echo e($cnt['number_used_rooms']); ?></strong></td> <td></td> </tr> <?php $__currentLoopData = $hostel->rooms; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $room): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php $cnt2= App\Components\Functions::getNumberRooms($room); ?> <tr> <td><?php echo e($loop->index + 1); ?></td> <?php if(isset($isExcel)): ?> <td></td> <?php endif; ?> <td><?php echo e($room->name); ?></td> <td><?php echo e($room->max_renters); ?></td> <td><?php echo e($cnt2['used']); ?></td> <td> <?php if($hostel->type_rent == App\Models\Hostel::TYPE_RENT_EVERY): ?> <?php if($cnt2['used'] == $room->max_renters): ?> Đã thuê <?php else: ?> Còn giường <?php endif; ?> <?php else: ?> <?php if($cnt2['used'] != 0): ?> Đã thuê <?php else: ?> Còn trống <?php endif; ?> <?php endif; ?> </td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </table>