<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> <form id="form-money-info-contract"> <table class="table table-striped table-bordered table-hover" id="tb"> <tr> <th style="min-width: 40px"><input class="form-control checkbox" type="checkbox" id="select-all-money-contracts"></th> <th> Thao tác </th> <th>Nhà</th> <th>Phòng</th> <th>Khách</th> <th>Số tiền</th> <th>Tiền nhà</th> <th>Tiền dịch vụ</th> <th>Đã trả</th> <th>Giảm giá</th> <th>Còn lại</th> </tr> <tr> <th></th> <th> </th> <th></th> <th></th> <th></th> <th><?php echo e(number_format($moneyInfos->sum('amount'), 0, '.', '.')); ?></th> <th><?php echo e(number_format($moneyInfos->whereIn('type', [\App\Models\MoneyInfo::VOUCHER_ROOM_PRICE, \App\Models\MoneyInfo::VOUCHER_CONTRACT])->sum('amount'), 0, '.', '.')); ?></th> <th><?php echo e(number_format($moneyInfos->where('type', \App\Models\MoneyInfo::VOUCHER_SERVICE)->sum('amount'), 0, '.', '.')); ?></th> <th><?php echo e(number_format($moneyInfos->sum('pay'), 0, '.', '.')); ?></th> <th><?php echo e(number_format($moneyInfos->sum('discount'), 0, '.', '.')); ?></th> <th><?php echo e(number_format($moneyInfos->sum('remain'), 0, '.', '.')); ?></th> </tr> <?php $__currentLoopData = $contracts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $contract): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php if($contract->moneyInfos->count() > 0): ?> <tr> <td><input class="form-control checkbox contract-checkbox" value="<?php echo e($contract->id); ?>" name="contract_ids[]" type="checkbox"></td> <td style="width: 15%"> <?php if(auth('backend')->user()->can('view-money-info')): ?> <a data-id="<?php echo e($contract->id); ?>" data-toggle="modal" href="#detail-money-info" data-toggle="tooltip" title="Xem" class="btn btn-icon-only purple detail-money-contract" data-toggle="tooltip"><i data-tooltip="Xem" class="fa fa-eye"></i></a> <?php endif; ?> <?php if($owner->type_display_money_info == \App\User::TYPE_DISPLAY_MONEY_INFO_PREVIOUS_MONTH): ?> <a target="_blank" href="https://itro.vn/bill/print-money-info-room-service?web=1&contract_id=<?php echo e($contract->id); ?>&month=<?php echo e($month->copy()->format('m/Y')); ?>&token=<?php echo e($owner->token); ?>" class="btn btn-icon-only green detail-money" data-toggle="tooltip" title="In"><i class="fa fa-print"></i></a> <?php else: ?> <a target="_blank" href="https://itro.vn/bill/print-money-info-contract?contract_id=<?php echo e($contract->id); ?>&month=<?php echo e($month->copy()->format('m/Y')); ?>&token=<?php echo e($owner->token); ?>" class="btn btn-icon-only green detail-money" data-toggle="tooltip" title="In"><i class="fa fa-print"></i></a> <?php endif; ?> <?php if(auth('backend')->user()->can('edit-money-info')): ?> <a data-id="<?php echo e($contract->id); ?>" data-toggle="modal" href="#detail-money-info-contract" class="btn btn-icon-only green-meadow edit-money-contract" data-toggle="tooltip" title="Cập nhật"><i class="fa fa-edit"></i></a> <?php endif; ?> <?php if(auth('backend')->user()->can('add-payment')): ?> <a data-id="<?php echo e($contract->id); ?>" class="btn btn-icon-only green-meadow mark-paid-full-contract"><i class="fa fa-check" data-toggle="tooltip" title="Thanh toán hóa đơn"></i></a> <?php endif; ?> <?php if(auth('backend')->user()->can('send-voucher')): ?> <a data-id="<?php echo e($contract->id); ?>" class="btn btn-icon-only blue send-zalo-contract" data-toggle="tooltip" title="Gửi hóa đơn qua zalo" ><i class="fa fa-comment"></i></a> <?php endif; ?> <?php if(auth('backend')->user()->can('delete-voucher')): ?> <a data-id="<?php echo e($contract->id); ?>" class="btn btn-icon-only red delete-voucher-contract" data-toggle="tooltip" title="Xóa" ><i class="fa fa-trash"></i></a> <?php endif; ?> </td> <td><?php echo e($contract->hostel->name); ?></td> <td><?php echo e($contract->room->name); ?></td> <td><?php echo e($contract->name); ?></td> <td><?php echo e(number_format($contract->moneyInfos->sum('amount'), 0, '.', '.')); ?></td> <td><?php echo e(number_format($contract->moneyInfos->whereIn('type', [\App\Models\MoneyInfo::VOUCHER_ROOM_PRICE, \App\Models\MoneyInfo::VOUCHER_CONTRACT])->sum('amount'), 0, '.', '.')); ?></td> <td><?php echo e(number_format($contract->moneyInfos->where('type', \App\Models\MoneyInfo::VOUCHER_SERVICE)->sum('amount'), 0, '.', '.')); ?></td> <td><?php echo e(number_format($contract->moneyInfos->sum('pay'), 0, '.', '.')); ?></td> <td><?php echo e(number_format($contract->moneyInfos->sum('discount'), 0, '.', '.')); ?></td> <td><?php echo e(number_format($contract->moneyInfos->sum('remain'), 0, '.', '.')); ?></td> </tr> <?php endif; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </table> </form>