From 94b5e9d37cbc5e030f9fbba865b7205b872be365 Mon Sep 17 00:00:00 2001 From: arf20 Date: Sun, 24 Mar 2024 16:59:57 +0100 Subject: Manage invoices and generate manual invoice --- manageinvoices.php | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'manageinvoices.php') diff --git a/manageinvoices.php b/manageinvoices.php index 4e4e9a6..56f2490 100644 --- a/manageinvoices.php +++ b/manageinvoices.php @@ -28,6 +28,13 @@ mysqli_stmt_execute($stmt); $result = mysqli_stmt_get_result($stmt); $invoices = $result->fetch_all(MYSQLI_ASSOC); +// Get orders +$sql = "SELECT id, service, name, client, date, billing, status, comments FROM orders"; +$stmt = mysqli_prepare($link, $sql); +mysqli_stmt_execute($stmt); +$result = mysqli_stmt_get_result($stmt); +$orders = $result->fetch_all(MYSQLI_ASSOC); + // GET actions // delete entry if (isset($_GET["del"])) { @@ -128,6 +135,24 @@ function getinvoicebyid($id) {

Orders

".$client["username"].""; + foreach ($orders as $order) + //if ($order["client"] == ) + $order_options .= ""; + echo "

Generate invoice

\n" + ."

\n" + ."

\n" + ."

\n" + ."

\n" + ."

\n" + ."" + ."
cancel" + ."
"; + } + if (isset($_GET["edit"])) { $invoice = getinvoicebyid($_GET["edit"]); $client_options = $service_options = ""; @@ -143,7 +168,7 @@ function getinvoicebyid($id) { } ?> - add + manual invoice
idclientdescriptionamountdatepdfstatusaction