source/Application/Model/Order.php
protected function _setNumber()
    {
        $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();

        $iCnt = oxNew(\OxidEsales\Eshop\Core\Counter::class)->getNext($this->_getCounterIdent());
        $sQ = "update oxorder set oxordernr = ? where oxid = ?";
        $blUpdate = ( bool ) $oDb->execute($sQ, [$iCnt, $this->getId()]);

        if ($blUpdate) {
            $this->oxorder__oxordernr = new \OxidEsales\Eshop\Core\Field($iCnt);
        }

        return $blUpdate;
    }
protected function _setNumber()
    {
        $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();

        $iCnt = oxNew(\OxidEsales\Eshop\Core\Counter::class)->getNext($this->_getCounterIdent());
        $sQ = "update oxorder set oxordernr = ? where oxid = ?";
        $blUpdate = ( bool ) $oDb->execute($sQ, [$iCnt, $this->getId()]);

        if ($blUpdate) {
            $this->oxorder__oxordernr = new \OxidEsales\Eshop\Core\Field($iCnt);
        }

        return $blUpdate;
    }
protected function _setNumber ( ) { $ oDb = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) ; $ iCnt = oxNew ( \ OxidEsales \ Eshop \ Core \ Counter :: class ) -> getNext ( $ this -> _getCounterIdent ( ) ) ; $ sQ = "update oxorder set oxordernr = ? where oxid = ?" ; $ blUpdate = ( bool ) $ oDb -> execute ( $ sQ , [ $ iCnt , $ this -> getId ( ) ] ) ; if ( $ blUpdate ) { $ this -> oxorder__oxordernr = new \ OxidEsales \ Eshop \ Core \ Field ( $ iCnt ) ; } return $ blUpdate ; }
Tries to fetch and set next record number in DB. Returns true on success

@return bool
Tries to fetch and set next record number in DB . Returns true on success