<form id="form-add-hostel-fee" action="#"> <div class="table-scrollable"> <table class="table table-bordered table-hover"> <thead> <tr> <th>STT</th> <th style="width: 20%"> Tên</th> <th style="width: 20%"> Loại phí</th> <th style="width: 18%"> Đơn giá</th> <th> Đơn vị</th> <th> Thiết lập</th> <th style="width: 18%"> Thao tác</th> </tr> </thead> <input type="hidden" name="hostel_id" value="<?php echo e($hostel->id); ?>"/> <tbody id="table-hostel-fees"> <?php $__currentLoopData = $fees; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $fee): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr> <td><?php echo e($loop->index + 1); ?></td> <td> <?php echo e($fee->name); ?> </td> <td> <?php echo e($fee->type_text); ?> </td> <td> <?php if($fee->type == \App\Models\HostelFee::ELECTRIC || $fee->type == \App\Models\HostelFee::WATER || $fee->type == \App\Models\HostelFee::DYNAMIC || $fee->type == \App\Models\HostelFee::WATER_DYNAMIC || $fee->type == \App\Models\HostelFee::ELECTRIC_DYNAMIC ): ?> Biến động <?php else: ?> <?php echo e(number_format($fee->fee, 0, '.', '.' )); ?> <?php endif; ?> </td> <td><?php echo e($fee->unit); ?></td> <td> <?php if($fee->type == \App\Models\HostelFee::ELECTRIC || $fee->type == \App\Models\HostelFee::WATER): ?> <a data-hostel="<?php echo e($hostel->id); ?>" data-type="<?php echo e($fee->type); ?>" data-id="<?php echo e($fee->id); ?>" data-target="#hostel-fee-quota" data-toggle="modal" class="btn btn-sm red btn-hostel-fee-quota">Thiết lập</a> <?php endif; ?> </td> <td> <?php if($fee->type != \App\Models\HostelFee::ELECTRIC && $fee->type != \App\Models\HostelFee::WATER): ?> <a href="#" class="btn btn-sm btn-default btn-edit-fee" data-fee="<?php echo e($fee->id); ?>"><i class="fa fa-pencil"></i> Sửa</a> <?php endif; ?> <a href="#" class="btn btn-sm btn-default btn-delete-fee" data-fee="<?php echo e($fee->id); ?>"><i class="fa fa-trash"></i> Xóa</a> </td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </tbody> </table> </div> </form> <div class="center"> <button class="btn btn-success" id="btn-add-fee" data-hostel="<?php echo e($hostel->id); ?>">Thêm chi phí</button> </div> <div class="text-center" style="margin-top: 15px"> <div class="alert alert-warning"> Chú ý: Nếu bạn sửa giá của 1 dịch vụ đang áp dụng, giá sẽ được áp dụng cho các hoá đơn được tạo ra sau lần sửa này. Các hoá đơn cũ không thay đổi</div> </div>