public function getPriceObject($iPriceTypeID = null)
    {
        if (empty($iPriceTypeID)) {
            $obPriceModel = $this->main_price;
        } else {
            $obPriceModel = $this->price_link->where('price_type_id', $iPriceTypeID)->first();
        }

        return $obPriceModel;
    }
public function getPriceObject($iPriceTypeID = null)
    {
        if (empty($iPriceTypeID)) {
            $obPriceModel = $this->main_price;
        } else {
            $obPriceModel = $this->price_link->where('price_type_id', $iPriceTypeID)->first();
        }

        return $obPriceModel;
    }
public function getPriceObject ( $ iPriceTypeID = null ) { if ( empty ( $ iPriceTypeID ) ) { $ obPriceModel = $ this -> main_price ; } else { $ obPriceModel = $ this -> price_link -> where ( 'price_type_id' , $ iPriceTypeID ) -> first ( ) ; } return $ obPriceModel ; }
Get price object
@param int $iPriceTypeID
@return \Illuminate\Database\Eloquent\Model|Price|null
Get price object