Fix bug.
This commit is contained in:
parent
12eea8b58e
commit
2de6ba54ae
|
@ -1,6 +1,7 @@
|
||||||
module Admin::PropertyHiresHelper
|
module Admin::PropertyHiresHelper
|
||||||
data = File.open(File.join(File.dirname(__FILE__), '../../../config', 'list.yml')).read
|
data = File.open(File.join(File.dirname(__FILE__), '../../../config', 'list.yml')).read
|
||||||
$property_list = YAML::load(ERB.new(data).result(binding)).symbolize_keys
|
$property_list = YAML::load(ERB.new(data).result(binding)).symbolize_keys
|
||||||
|
include OrbitBackendHelper
|
||||||
def check_for_availability(stime, etime, pid, interval=nil, recurring_end_date=nil, time_setting_id=nil)
|
def check_for_availability(stime, etime, pid, interval=nil, recurring_end_date=nil, time_setting_id=nil)
|
||||||
property = Property.find(pid)
|
property = Property.find(pid)
|
||||||
return {"success" => false, "msg" => I18n.t("property_hire.values_are_not_ok",:default=>"Values are not ok.")} if property.nil? || stime.blank? || etime.blank?
|
return {"success" => false, "msg" => I18n.t("property_hire.values_are_not_ok",:default=>"Values are not ok.")} if property.nil? || stime.blank? || etime.blank?
|
||||||
|
|
Loading…
Reference in New Issue