<div class="row"> <div class="col-md-12"> <table class="table table-bordered table-hover"> <thead> <tr> <th> TT</th> <th> Tên</th> <th> Đơn giá</th> <th style="width: 12%">Chỉ số đầu</th> <th style="width: 12%">Chỉ số cuối</th> <th style="width: 12%"> Số lượng</th> <th style="width: 12%"> Thành tiền</th> </tr> </thead> <tbody> <?php $__currentLoopData = $details; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $detail): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php

                        ?> <tr> <input type="hidden" name="id[]" value="<?php echo e($detail->id); ?>"/> <td> <?php echo e($loop->index + 1); ?></td> <td> <?php echo e($detail->name); ?></td> <td> <?php if($detail->is_electric || $detail->is_water): ?> <?php if(in_array(optional($detail->hostelFee)->type, [ App\Models\HostelFee::WATER_BY_CLOCK, App\Models\HostelFee::ELECTRIC_BY_CLOCK, App\Models\HostelFee::ELECTRIC_BY_PEOPLE, App\Models\HostelFee::ELECTRIC_DYNAMIC, App\Models\HostelFee::WATER_DYNAMIC, App\Models\HostelFee::DYNAMIC, App\Models\HostelFee::WATER_BY_PEOPLE, ])): ?> <?php echo e(number_format($detail->value, 0, '.', '.')); ?> <?php else: ?> Biến động <?php endif; ?> <?php else: ?> <?php echo e(number_format($detail->value, 0, '.', '.')); ?> <?php endif; ?></td> <td> <?php echo e($detail->start_index); ?></td> <td> <?php echo e($detail->end_index); ?></td> <td> <?php echo e(number_format((float)$detail->qty_text_2, 2, '.', '')); ?></td> <?php if(!empty($detail->sum_amount)): ?> <td> <?php echo e(number_format($detail->sum_amount, 0, '.', '.')); ?></td> <?php else: ?> <td> <?php echo e(number_format($detail->amount, 0, '.', '.')); ?></td> <?php endif; ?> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <tr> <td colspan="6"><b>Tổng</b></td> <td><?php echo e(number_format($moneyInfoItem->amount, 0, '.', '.')); ?></td> </tr> <?php if(!empty($moneyInfoItem->discount)): ?> <tr> <td colspan="6"><b>Giảm giá</b></td> <td><?php echo e(number_format($moneyInfoItem->discount, 0, '.', '.')); ?></td> </tr> <tr> <td colspan="6"><b>Tổng sau giảm giá</b></td> <td><?php echo e(number_format($sum - $moneyInfoItem->discount, 0, '.', '.')); ?></td> </tr> <?php endif; ?> <tr> <td colspan="6"><b>Đã thanh toán</b></td> <td><?php echo e(number_format($pay, 0, '.', '.')); ?></td> </tr> <tr> <td colspan="6"><b>Còn lại</b></td> <td><?php echo e(number_format($moneyInfoItem->amount - $moneyInfoItem->discount-$pay, 0, '.', '.')); ?></td> </tr> <tr> </tr> </tbody> </table> </div> </div>