<?php requireonce 'config.php'; requireLogin(); $companyid = $SESSION['companyid'] ??…
- User
<!-- Invoices List --> <div class="card mb-4"> <div class="card-body"> <div class="table-responsive"> <table class="table table-striped table-hover"> <thead> <tr> <th>Invoice #</th> <th>Date</th> <th><?php echo $invoice_type === 'sales' ? 'Customer' : 'Supplier'; ?></th> <th>GSTIN</th> <th>Amount</th> <th>Tax</th> <th>Total</th> <th>Status</th> <th>Actions</th> </tr> </thead> <tbody> <?php foreach ($invoices as $invoice): ?> <tr> <td><?php echo htmlspecialchars($invoice['invoice_number']); ?></td> <td><?php echo date('d-m-Y', strtotime($invoice['invoice_date'])); ?></td> <td><?php echo htmlspecialchars($invoice['party_name']); ?></td> <td><?php echo htmlspecialchars($invoice['party_gstin']); ?></td> <td class="text-end">₹<?php echo number_format($invoice['total_amount'], 2); ?></td> <td class="text-end">₹<?php echo number_format($invoice['tax_amount'], 2); ?></td> <td class="text-end">₹<?php echo number_format($invoice['grand_total'], 2); ?></td> <td> <span class="badge bg-<?php echo match($invoice['status']) { 'paid' => 'success', 'overdue' => 'danger', 'sent' => 'info', default => 'secondary' }; ?>"> <?php echo ucfirst($invoice['status']); ?> </span> </td> <td> <div class="btn-group btn-group-sm"> <a href="view_invoice.php?id=<?php echo $invoice['id']; ?>" class="btn btn-info" title="View"> <i class="fas fa-eye"></i> </a> <a href="edit_invoice.php?id=<?php echo $invoice['id']; ?>" class="btn btn-warning" title="Edit"> <i class="fas fa-edit"></i> </a> <button type="button" class="btn btn-danger" title="Delete" onclick="deleteInvoice(<?php echo $invoice['id']; ?>)"> <i class="fas fa-trash"></i> </button> <button type="button" class="btn btn-success" title="Print" onclick="printInvoice(<?php echo $invoice['id']; ?>)"> <i class="fas fa-print"></i> </button> <a href="update_invoice_status.php?id=<?php echo $invoice['id']; ?>&type=<?php echo $invoice_type; ?>" class="btn btn-secondary" title="Change Status"> <i class="fas fa-exchange-alt"></i> </a> </div> </td> </tr> <?php endforeach; ?> </tbody> </table> </div> <!-- Pagination --> <?php if ($total_pages > 1): ?> <nav aria-label="Page navigation" class="mt-4"> <ul class="pagination justify-content-center"> <li class="page-item <?php echo $page <= 1 ? 'disabled' : ''; ?>"> <a class="page-link" href="?type=<?php echo $invoice_type; ?>&page=<?php echo $page-1; ?>">Previous</a> </li> <?php for ($i = 1; $i <= $total_pages; $i++): ?> <li class="page-item <?php echo $page == $i ? 'active' : ''; ?>"> <a class="page-link" href="?type=<?php echo $invoice_type; ?>&page=<?php echo $i; ?>"><?php echo $i; ?></a> </li> <?php endfor; ?> <li class="page-item <?php echo $page >= $total_pages ? 'disabled' : ''; ?>"> <a class="page-link" href="?type=<?php echo $invoice_type; ?>&page=<?php echo $page+1; ?>">Next</a> </li> </ul> </nav> <?php endif; ?> </div> </div> - Assistant
- User
give me with statenems block
- Assistant