prepare($sql); $stmt->execute([$invoice_id]); $invoice = $stmt->fetch(); if (!$invoice) { die('Invoice not found.'); } } catch (PDOException $e) { die("Database error: " . $e->getMessage()); } ?>

Invoice Details #

Invoice Information

Invoice ID:

Order ID:

Invoice Date:

Due Date:

Total Amount: $

Status:

Payments
prepare($sql); $stmt->execute([$invoice_id]); $payments = $stmt->fetchAll(); $total_paid = 0; foreach ($payments as $payment) { $total_paid += $payment['amount']; echo ''; echo ''; echo ''; echo ''; echo ''; } ?>
Payment Date Amount Payment Method
' . htmlspecialchars($payment['payment_date']) . '$' . htmlspecialchars(number_format($payment['amount'], 2)) . '' . htmlspecialchars($payment['payment_method']) . '

Total Paid: $

Amount Due: $

Post a Payment