Add support for invoicing period retrieval and enhanced filtering options for wash subscription transactions
This commit is contained in:
@@ -1122,4 +1122,17 @@ class users_o extends db
|
||||
return (new customer_default_department_o())->getDefaultDepartment((int)$this->customer_number->value());
|
||||
}
|
||||
|
||||
public function getCustomersWithVehicleSubscriptions(): array
|
||||
{
|
||||
global $db;
|
||||
// Get all customers with vehicle subscriptions
|
||||
$sql = "SELECT DISTINCT customer_id FROM customer_vehicles WHERE wash_subscription = 1";
|
||||
$result = $db->query($sql);
|
||||
$customer_numbers = [];
|
||||
while ($row = $result->fetch_assoc()) {
|
||||
$customer_numbers[] = (int)$row['customer_id'];
|
||||
}
|
||||
return $customer_numbers;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user