Fix Pay With a Saved Card in Invoice Listing if Saved Cards are on files for that client

This commit is contained in:
johnnyq
2025-11-16 17:34:37 -05:00
parent cf0fa0024c
commit 96b8fcad3a
2 changed files with 13 additions and 8 deletions

View File

@@ -18,8 +18,8 @@ if (isset($_GET['invoice_id'])) {
$mysqli,
"SELECT * FROM invoices
LEFT JOIN clients ON invoice_client_id = client_id
LEFT JOIN contacts ON clients.client_id = contacts.contact_client_id AND contact_primary = 1
LEFT JOIN locations ON clients.client_id = locations.location_client_id AND location_primary = 1
LEFT JOIN contacts ON client_id = contact_client_id AND contact_primary = 1
LEFT JOIN locations ON client_id = location_client_id AND location_primary = 1
WHERE invoice_id = $invoice_id
$access_permission_query
LIMIT 1"