public function CheckActivateOrDeactivate($dNewStockValue = null)
    {
        if (null === $dNewStockValue) {
            $dNewStockValue = $this->getAvailableStock();
        }
        $isActive = 0;
        if ($this->fieldActive) {
            $isActive = 1;
        }
        $oStockMessage = &$this->GetFieldShopStockMessage();
        if ($oStockMessage) {
            if ($oStockMessage->fieldAutoActivateOnStock && $dNewStockValue > 0) {
                $isActive = 1;
            }
            if ($oStockMessage->fieldAutoDeactivateOnZeroStock && $dNewStockValue < 1) {
                $isActive = 0;
            }
        }

        return $isActive;
    }