Update getCustomersWithVehicleSubscriptions to exclude fixed pricing customers and remove unused return statement in invoicing route

This commit is contained in:
Jeppe Bundgaard
2026-03-12 12:17:52 +01:00
parent be358309d6
commit ddc45bf206
2 changed files with 2 additions and 3 deletions
+2 -2
View File
@@ -1299,8 +1299,8 @@ class users_o extends db
public function getCustomersWithVehicleSubscriptions(): array
{
global $db;
// Get all customers with vehicle subscriptions
$sql = "SELECT DISTINCT customer_id FROM customer_vehicles WHERE wash_subscription = 1";
// Get all customers with vehicle subscriptions and not fixed pricing
$sql = "SELECT DISTINCT customer_id FROM customer_vehicles WHERE wash_subscription = 1 AND customer_id NOT IN (SELECT customer_number FROM customer_fixed_pricing)";
$result = $db->query($sql);
$customer_numbers = [];
while ($row = $result->fetch_assoc()) {