#PrecisionHelper
module PrecisionHelper

	def get_precision_delimiter
		value_set = nil

		setting = PrintSetting.find_by_unique_code("CloseCashierPdf")
		if setting.nil?
			star_setting = PrintSetting.find_by_unique_code("CloseCashierStarPdf")
			 if star_setting.nil?
				 value_set = PrintSetting.find_by_unique_code("CloseCashierCustomisePdf")
			 else
			 	value_set = star_setting
			 end
		else
			value_set = setting
		end

		if !value_set.nil? 
			@precision_value =  value_set.precision.to_i > 0 ? value_set.precision : 0 
			@delimiter_value =  value_set.delimiter ? "," : ""
		end

		return @precision_value, @delimiter_value
	end
	
end
