public function reduceStock($dAmount, $blAllowNegativeStock = false)
    {
        $this->actionType = ACTION_UPDATE_STOCK;
        $this->beforeUpdate();

        $database = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
        $query = 'select oxstock from oxarticles where oxid = ' . $database->quote($this->getId()) . ' FOR UPDATE ';
        $actualStock = $database->getOne($query);

        $iStockCount = $actualStock - $dAmount;
        if (!$blAllowNegativeStock && ($iStockCount < 0)) {
            $dAmount += $iStockCount;
            $iStockCount = 0;
        }
        $this->oxarticles__oxstock = new \OxidEsales\Eshop\Core\Field($iStockCount);

        $query = 'update oxarticles set oxarticles.oxstock = ' . $database->quote($iStockCount) .
                 ' where oxarticles.oxid = ' . $database->quote($this->getId());
        $database->execute($query);
        $this->onChange(ACTION_UPDATE_STOCK);

        return $dAmount;
    }