Entity/OfferElement.php
public function setDiscountValue($discountValue, $fromRate = false)
    {
        $this->discountValue = $discountValue;

        if ($this->getTotalPrice() > 0) {
            if ($fromRate == false)
                $this->setDiscountRate(($this->discountValue / $this->getTotalPrice()), true);

            $this->calculateTotalPrice();
        }

        return $this;
    }
public function setDiscountValue($discountValue, $fromRate = false)
    {
        $this->discountValue = $discountValue;

        if ($this->getTotalPrice() > 0) {
            if ($fromRate == false)
                $this->setDiscountRate(($this->discountValue / $this->getTotalPrice()), true);

            $this->calculateTotalPrice();
        }

        return $this;
    }
Set discountValue

@param float $discountValue

@return OfferElement