<?php $__env->startSection('title', 'Invoices — TechCorp Manager'); ?>

<?php $__env->startSection('content'); ?>
<div data-tc-api-page="invoices">
    <div class="tc-page-head-row">
        <div class="tc-page-head">
            <h2>Invoices</h2>
            <p>Billing and payment status. Create and edit invoices via the API.</p>
        </div>
        <button type="button" class="tc-btn-primary" id="tc-add-invoice">+ New invoice</button>
    </div>

    <div class="tc-card">
        <div class="tc-table-wrap">
            <table class="tc-table">
                <thead>
                    <tr>
                        <th>Invoice #</th>
                        <th>Client</th>
                        <th>Date</th>
                        <th>Due</th>
                        <th>Total</th>
                        <th>Status</th>
                        <th></th>
                    </tr>
                </thead>
                <tbody>
                    <?php $__empty_1 = true; $__currentLoopData = $invoices; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $invoice): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                        <tr>
                            <td><strong><?php echo e($invoice->invoice_number); ?></strong></td>
                            <td><?php echo e($invoice->client?->name ?? '—'); ?></td>
                            <td><?php echo e($invoice->date?->format('M j, Y')); ?></td>
                            <td><?php echo e($invoice->due_date?->format('M j, Y') ?? '—'); ?></td>
                            <td>$<?php echo e(number_format((float) $invoice->total, 2)); ?></td>
                            <td><span class="tc-badge <?php echo e($invoice->status); ?>"><?php echo e($invoice->status); ?></span></td>
                            <td class="tc-table-actions">
                                <a href="<?php echo e(route('web.invoices.document', $invoice)); ?>" class="tc-btn-sm" target="_blank" rel="noopener">Print</a>
                                <a href="<?php echo e(route('web.invoices.pdf', $invoice)); ?>" class="tc-btn-sm">PDF</a>
                                <button type="button" class="tc-btn-sm tc-edit-invoice" data-id="<?php echo e($invoice->id); ?>">Edit</button>
                                <button type="button" class="tc-btn-sm danger tc-del-invoice" data-id="<?php echo e($invoice->id); ?>">Delete</button>
                            </td>
                        </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                        <tr><td colspan="7" class="tc-empty">No invoices yet.</td></tr>
                    <?php endif; ?>
                </tbody>
            </table>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\Users\pc\Desktop\compnany\laravel-api\resources\views/invoices/index.blade.php ENDPATH**/ ?>