diff --git a/src/Controller/APIController.php b/src/Controller/APIController.php index 21e4a0a9..c1ea75fe 100644 --- a/src/Controller/APIController.php +++ b/src/Controller/APIController.php @@ -2533,22 +2533,9 @@ class APIController extends Controller implements LoggedController if (!empty($sku)) $hub_criteria->addItem($batt->getSAPCode(), 1); - // find nearest hub - if (($jo->getServiceType() == ServiceType::BATTERY_REPLACEMENT_NEW) || - ($jo->getServicetype() == ServiceType::BATTERY_REPLACEMENT_WARRANTY)) - { - // get nearest hub - // $nearest_hub = $this->findNearestHubWithInventory($jo, $batt, $em, $map_tools, $im); - //$nearest_hub = $this->findNearestHub($jo, $em, $map_tools); - $nearest_hubs = $hub_select->find($hub_criteria); - } - else - { - $nearest_hub = $this->findNearestHub($jo, $em, $map_tools); - $nearest_hubs = $hub_select->find($hub_criteria); - } + // find nearest hubs + $nearest_hubs = $hub_select->find($hub_criteria); - // TODO: this might need changes after the new hub selector if (!empty($nearest_hubs)) { // go through the hub list, find the nearest hub