<?php $__env->startSection('title', 'Customer Report'); ?>

<?php $__env->startSection('content'); ?>
<div class="d-flex justify-content-between align-items-center mb-4">
    <h2 class="fw-bold">Customer Report</h2>
</div>

<div class="card">
    <div class="card-body">
        <table id="customerReportTable" class="table table-striped table-bordered">
            <thead class="table-light">
                <tr>
                    <th>Customer Name</th>
                    <th>Mobile</th>
                    <th>Total Invoices</th>
                    <th>Total Purchase Amount (₹)</th>
                </tr>
            </thead>
            <tbody>
                <?php $__currentLoopData = $customers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $customer): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr>
                    <td><?php echo e($customer->customer_name); ?></td>
                    <td><?php echo e($customer->mobile); ?></td>
                    <td><?php echo e($customer->invoices_count); ?></td>
                    <td class="text-end"><?php echo e(number_format($customer->invoices_sum_grand_total ?? 0, 2)); ?></td>
                </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </tbody>
        </table>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php $__env->startPush('scripts'); ?>
<script>
$(document).ready(function() {
    $('#customerReportTable').DataTable({
        "order": [[ 3, "desc" ]]
    });
});
</script>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH E:\xampp\htdocs\riya\billing\resources\views/reports/customers.blade.php ENDPATH**/ ?>