module SingaporeCharitableDonations::Calculators::SINDA::Year2014Calculator
Singapore Indian Development Association Fund contribution calculator for the year 2014.
Public Class Methods
applies_to?(date, type)
click to toggle source
@param [Date] date to be considered for calculation @param [String] type of charitable contribution @return [TrueClass, FalseClass]
# File lib/singapore_charitable_donations/calculators/sinda/year_2014_calculator.rb, line 28 def applies_to?(date, type) date.year == 2014 && type == 'SINDA' end
calculate(total_wages)
click to toggle source
@param [BigDecimal] total_wage @return [BigDecimal] contribution amount
# File lib/singapore_charitable_donations/calculators/sinda/year_2014_calculator.rb, line 12 def calculate(total_wages) case when total_wages <= 600.00 BigDecimal "1.00" when total_wages <= 1_500.00 BigDecimal "3.00" when total_wages <= 2_500.00 BigDecimal "5.00" else # > 2_500.00 BigDecimal "7.00" end end