<?php $__env->startSection('title', 'Bill Book'); ?>
<?php $__env->startSection('header_title', 'Bill Book Management'); ?>

<?php $__env->startSection('content'); ?>
    <div class="card">
        <h3><i class="fa-solid fa-file-invoice" style="color: var(--primary);"></i> Customer Bills & Invoices</h3>
        <table>
            <thead><tr><th>Invoice</th><th>Customer</th><th>Order</th><th>Payment</th><th>Total</th><th>Action</th></tr></thead>
            <tbody>
                <?php $__empty_1 = true; $__currentLoopData = $bills; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $bill): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <tr>
                        <td><strong><?php echo e($bill->invoice_number); ?></strong><div style="color: var(--text-muted); font-size: 0.8rem;"><?php echo e($bill->ordered_at->format('d M Y')); ?></div></td>
                        <td><?php echo e($bill->customer_name); ?><div style="color: var(--text-muted); font-size: 0.8rem;"><?php echo e($bill->customer_phone); ?></div></td>
                        <td><?php echo e($bill->order_number); ?><div style="color: var(--text-muted); font-size: 0.8rem;"><?php echo e(ucfirst($bill->status)); ?></div></td>
                        <td><span class="badge <?php echo e($bill->payment_status === 'paid' ? 'badge-success' : 'badge-danger'); ?>"><?php echo e(ucfirst($bill->payment_status)); ?></span></td>
                        <td style="color: var(--success); font-weight: 700;">₹<?php echo e(number_format($bill->total, 2)); ?></td>
                        <td><a href="<?php echo e(route('vendor.bills.show', $bill->id)); ?>" target="_blank" class="btn btn-primary"><i class="fa-solid fa-print"></i> View / Print</a></td>
                    </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                    <tr><td colspan="6" style="text-align: center; color: var(--text-muted); padding: 2rem;">No bills available yet.</td></tr>
                <?php endif; ?>
            </tbody>
        </table>
        <div style="margin-top: 1.5rem;"><?php echo e($bills->links()); ?></div>
    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.vendor', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH D:\Clients\MInfosoftware\LiveApp\MyOpticals\backend\resources\views/vendor/bills.blade.php ENDPATH**/ ?>