eavConfig = $eavConfig; } /** * Returns current increment id * * @return string */ public function getCurrentValue() { return $this->incrementValue; } /** * Returns new value of increment id * * @param int $storeId * @return string * @throws \Exception * @throws \Magento\Framework\Exception\LocalizedException */ public function getNextValue($storeId) { $this->incrementValue = $this->eavConfig->getEntityType(Order::ENTITY)->fetchNewIncrementId($storeId); return $this->incrementValue; } }