Update getCustomersWithVehicleSubscriptions to exclude fixed pricing customers and remove unused return statement in invoicing route
This commit is contained in:
@@ -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()) {
|
||||
|
||||
@@ -1056,7 +1056,6 @@ class InvoicingPeriodRoute
|
||||
true
|
||||
);
|
||||
}
|
||||
return $subscriptions;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user