<?php $__env->startSection('title','Customers'); ?>
<?php $__env->startSection('content'); ?>
<div class="page-shell">
    <div class="page-head"><div><h1 class="page-title">Customer Management</h1><div class="page-subtitle">Customer profile, due and purchase history</div></div><a href="<?php echo e(route('admin.customers.create')); ?>" class="btn primary">Add Customer</a></div>
    <form class="card panel-tight row" method="GET"><div class="col"><label>Search</label><input type="text" name="q" value="<?php echo e(request('q')); ?>" placeholder="name / phone / email"></div><div class="col actions"><button class="btn primary">Filter</button></div></form>
    <div class="card panel-tight table-wrap">
        <table class="table">
            <thead><tr><th>ID</th><th>Name</th><th>Phone</th><th>Group</th><th>Opening Balance</th><th>Points</th><th>Status</th><th>Action</th></tr></thead>
            <tbody>
            <?php $__empty_1 = true; $__currentLoopData = $customers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $customer): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                <tr>
                    <td><?php echo e($customer->id); ?></td><td><?php echo e($customer->name); ?></td><td><?php echo e($customer->phone_number); ?></td><td><?php echo e($customer->customer_group); ?></td><td><?php echo e(number_format($customer->opening_balance,2)); ?></td><td><?php echo e($customer->points); ?></td><td><span class="badge"><?php echo e($customer->status); ?></span></td>
                    <td>
                        <a class="btn" href="<?php echo e(route('admin.customers.show',$customer)); ?>">View</a>
                        <a class="btn" href="<?php echo e(route('admin.customers.edit',$customer)); ?>">Edit</a>
                        <form action="<?php echo e(route('admin.customers.destroy',$customer)); ?>" method="POST" style="display:inline"><?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?><button class="btn btn-danger" onclick="return confirm('Delete this customer?')">Delete</button></form>
                    </td>
                </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                <tr><td colspan="8">No customers found.</td></tr>
            <?php endif; ?>
            </tbody>
        </table>
    </div>
    <?php echo e($customers->links()); ?>

</div>
<?php $__env->stopSection(); ?>

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