public function setDiscount($discount)
    {
        $discount = (float) $discount;

        if ($discount > 1) {
            $discount = min(max($discount, 0), 100);
            $discount = $discount / 100;
        }

        $this->set('discount', $discount);
    }