From 316d0bb23d0be7fd67f9ab4a818ea31e801717a8 Mon Sep 17 00:00:00 2001 From: Frank Schubert Date: Thu, 20 Nov 2025 14:41:12 +0100 Subject: [PATCH] Fixed not being able to order mgmt service from Citycom --- lib/Citycom/OanApiHelper.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Citycom/OanApiHelper.php b/lib/Citycom/OanApiHelper.php index 87404fe7d..ee793e0e8 100644 --- a/lib/Citycom/OanApiHelper.php +++ b/lib/Citycom/OanApiHelper.php @@ -116,10 +116,12 @@ class Citycom_OanApiHelper { $this->log->debug(print_r($want_services, true)); + $allowed_service_types = array_merge(CITYCOM_OAN_API_SERVICES_FOR_ORDER, CITYCOM_OAN_API_SERVICES_FOR_RESERVATION); + // check if we have these services already foreach($cc_service_types as $stype) { - if(!in_array($stype->name, CITYCOM_OAN_API_SERVICES_FOR_ORDER)) continue; - $ctag_service_type = array_flip(CITYCOM_OAN_API_SERVICES_FOR_ORDER)[$stype->name]; + if(!in_array($stype->name, $allowed_service_types)) continue; + $ctag_service_type = array_flip($allowed_service_types)[$stype->name]; if(PreorderCtag::getFirstActive(["preorder_id" => $preorder->id, "service_type" => $ctag_service_type])) { // service was ordered already, remove from want_services unset($want_services[$ctag_service_type]);