public function getMarginPercent()
    {
        if (0 < $this->margin && 0 < $this->revenue) {
            return round($this->margin * 100 / $this->revenue, 1);
        }

        return 0;
    }
public function getMarginPercent()
    {
        if (0 < $this->margin && 0 < $this->revenue) {
            return round($this->margin * 100 / $this->revenue, 1);
        }

        return 0;
    }
Returns the margin in percentage.

@return float|int