<?php $__env->startSection('title', 'All Sales'); ?>
<?php $__env->startSection('page_title', 'All Sales'); ?>

<?php $__env->startSection('content'); ?>
<div class="page-shell">
    <div class="page-head">
        <div>
            <h1 class="page-title">All Sales</h1>
            <div class="page-subtitle">Recent POS sales and invoice history.</div>
        </div>
        <a href="<?php echo e(route('admin.sales.create')); ?>" class="btn primary">Add Sale / POS</a>
    </div>

    <div class="card">
        <div class="table-wrap">
            <table class="table">
                <thead>
                    <tr>
                        <th>ID</th>
                        <th>Invoice</th>
                        <th>Product</th>
                        <th>Qty</th>
                        <th>Total</th>
                        <th>Date</th>
                        <th class="text-end">Action</th>
                    </tr>
                </thead>
                <tbody>
                <?php $__empty_1 = true; $__currentLoopData = $sales; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $sale): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <tr>
                        <td><?php echo e($sale->id); ?></td>
                        <td><?php echo e($sale->invoice_no); ?></td>
                        <td><?php echo e($sale->product_name); ?></td>
                        <td><?php echo e($sale->quantity_sold); ?></td>
                        <td>৳ <?php echo e(number_format((float) $sale->total_amount, 2)); ?></td>
                        <td><?php echo e($sale->sale_date ?: optional($sale->sales_date)->format('Y-m-d')); ?></td>
                        <td class="text-end">
                            <a href="<?php echo e(route('admin.sales.invoice', $sale)); ?>" class="btn btn-light">Invoice</a>
                        </td>
                    </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                    <tr>
                        <td colspan="7">No sale data found.</td>
                    </tr>
                <?php endif; ?>
                </tbody>
            </table>
        </div>

        <div style="margin-top:14px;">
            <?php echo e($sales->links()); ?>

        </div>
    </div>
</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/sales/index.blade.php ENDPATH**/ ?>