From 006c02b6b9e96f09f69d94d016f5405a3f3f0abe Mon Sep 17 00:00:00 2001 From: arf20 Date: Sun, 28 Apr 2024 02:13:03 +0200 Subject: Invoices only for active services --- makeinvoices.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'makeinvoices.php') diff --git a/makeinvoices.php b/makeinvoices.php index e20b0e5..de16c4b 100644 --- a/makeinvoices.php +++ b/makeinvoices.php @@ -81,7 +81,7 @@ $result = mysqli_stmt_get_result($stmt); $clients = $result->fetch_all(MYSQLI_ASSOC); // Get due orders -$sql = "SELECT id, service, name, client, billing, date FROM orders"; +$sql = "SELECT id, service, name, client, billing, date FROM orders WHERE status = 'active'""; $stmt = mysqli_prepare($link, $sql); mysqli_stmt_execute($stmt); $result = mysqli_stmt_get_result($stmt); @@ -295,4 +295,5 @@ function generate_pdf($client, $dueorders, $desc = null, $manualqty = null) { return array($pdf->Output('invoice.pdf', 'S'), $subtotal, $nextid); } -?> \ No newline at end of file +?> + -- cgit v1.2.3