protected function determineParentTariff()
    {
        if ($this->tariff === null) {
            if (!empty($this->parent_id)) {
                return $this->parent_id;
            }

            return null;
        }

        if ($this->tariff->parent_id !== null) {
            return $this->tariff->parent_id;
        }

        return $this->tariff->id;
    }