From c4018e9cec9662a8828ec2184e0830624ff413a4 Mon Sep 17 00:00:00 2001 From: arf20 Date: Sun, 24 Mar 2024 17:13:39 +0100 Subject: Show invoices in admin dashboard --- admin.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/admin.php b/admin.php index f70ed7b..eaa0f62 100644 --- a/admin.php +++ b/admin.php @@ -42,6 +42,13 @@ mysqli_stmt_execute($stmt); $result = mysqli_stmt_get_result($stmt); $tickets = $result->fetch_all(MYSQLI_ASSOC); +// Get invoices +$sql = "SELECT id, client, `desc`, amount, date, status FROM invoices"; +$stmt = mysqli_prepare($link, $sql); +mysqli_stmt_execute($stmt); +$result = mysqli_stmt_get_result($stmt); +$invoices = $result->fetch_all(MYSQLI_ASSOC); + function getservicebyid($id) { global $services; foreach ($services as $service) { @@ -135,7 +142,14 @@ function getorderbyid($id) {

Invoices

- + + + \n"; + } + ?> +
clientamount
".getclientbyid($invoice["client"])["username"]."".number_format($invoice["amount"], 2, '.', '')."€
-- cgit v1.2.3