🤩 File Manager - Mr.X
PHP:
8.3.33
Server:
Apache
OS:
Linux 5.14.0-611.49.1.el9_7.x86_64
User:
websparkit
Navigate
Upload:
Upload
New File
New Folder
Editing:my-invoices.php
<?php require_once __DIR__ . '/../config/config.php'; require_once __DIR__ . '/../includes/functions.php'; if (!isLoggedIn()) redirect(SITE_URL . 'customer/login.php'); global $conn; $stmt = $conn->prepare("SELECT i.*, b.booking_id as booking_no, p.name as package_name FROM invoices i JOIN bookings b ON i.booking_id = b.id JOIN packages p ON b.package_id = p.id WHERE i.customer_id = ? ORDER BY i.created_at DESC"); $stmt->bind_param("i", $_SESSION['customer_id']); $stmt->execute(); $invoices = $stmt->get_result()->fetch_all(MYSQLI_ASSOC); define('PAGE_TITLE', 'My Invoices'); include 'dashboard-header.php'; ?> <div class="d-flex justify-content-between align-items-center mb-4"> <h4 class="fw-bold text-navy mb-0"><i class="bi bi-receipt text-warning me-2"></i>My Invoices</h4> </div> <div class="premium-card p-4"> <div class="table-responsive"> <table class="table table-hover datatable"> <thead><tr><th>Invoice No</th><th>Booking</th><th>Date</th><th>Total</th><th>Paid</th><th>Balance</th><th>Status</th><th>Action</th></tr></thead> <tbody><?php foreach ($invoices as $inv): ?> <tr><td><strong><?= $inv['invoice_no'] ?></strong></td><td><?= $inv['booking_no'] ?> (<?= $inv['package_name'] ?>)</td> <td><?= date('d M Y', strtotime($inv['invoice_date'])) ?></td><td><?= formatPrice($inv['total_amount']) ?></td><td><?= formatPrice($inv['advance_paid']) ?></td> <td><?= formatPrice($inv['balance']) ?></td><td><?= getStatusBadge($inv['status']) ?></td> <td><a href="<?= SITE_URL ?>pdf/invoice.php?id=<?= $inv['id'] ?>" target="_blank" class="btn btn-sm btn-outline-premium"><i class="bi bi-download"></i></a></td></tr> <?php endforeach; ?></tbody> </table> </div> </div> <?php include 'dashboard-footer.php'; ?>
Save Changes
Cancel
Create New File
Create New Folder