Add ticket status to invoice filter.

This commit is contained in:
o-psi 2024-01-10 20:45:18 +00:00
parent b7894ffd58
commit 39ba7d83fd
1 changed files with 25 additions and 15 deletions

View File

@ -92,10 +92,20 @@ if (isset($_GET['invoice_id'])) {
"); ");
//Get billable, and unbilled tickets to add to invoice //Get billable, and unbilled tickets to add to invoice
$sql_tickets_billable = mysqli_query($mysqli, "SELECT * FROM tickets WHERE ticket_client_id = $client_id AND ticket_billable = 1 AND ticket_invoice_id = 0;"); $sql_tickets_billable = mysqli_query(
$mysqli, "
SELECT
*
FROM
tickets
WHERE
ticket_client_id = $client_id
AND
ticket_billable = 1
AND
ticket_invoice_id = 0
AND
ticket_status LIKE '%close%';");
//Add up all the payments for the invoice and get the total amount paid to the invoice //Add up all the payments for the invoice and get the total amount paid to the invoice