/** * @Author: ANH DUNG Jun 27, 2014 */ public static function SubCheckOne($property_type_id, $price) { $message = ''; $mProperty = ProPropertyType::model()->findByPk($property_type_id); if ($mProperty) { if (!empty($mProperty->price_min) && !empty($mProperty->price_max) && $mProperty->price_min > 0 && $mProperty->price_max > 0) { if (!Listing::validMinMaxPrice($mProperty, $price)) { $price_min = ProPropertyType::formatPriceMinMax($mProperty, 'price_min'); $price_max = ProPropertyType::formatPriceMinMax($mProperty, 'price_max'); $nameProperty = $mProperty->name; $message = "Sorry! Price outside acceptable range. For {$nameProperty}, must be <br>between {$price_min} and {$price_max}"; } } } return $message; }