Fixed not being able to order mgmt service from Citycom
This commit is contained in:
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user