code: static public function calculateReceivedQuantity(SupplierOrderItemInterface $item)
      {
          $quantity = 0;
  
          foreach ($item->getOrder()->getDeliveries() as $delivery) {
              foreach ($delivery->getItems() as $deliveryItem) {
                  if ($item === $deliveryItem->getOrderItem()) {
                      $quantity += $deliveryItem->getQuantity();
                      continue 2;
                  }
              }
          }
  
          return $quantity;
      }
docs: Calculate the given supplier order item's received quantity.
  
  @param SupplierOrderItemInterface $item
  
  @return float