singapore_cpf_calculator 1.1.1 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/build.yml +33 -0
  3. data/Gemfile +1 -0
  4. data/README.md +17 -5
  5. data/lib/singapore_cpf_calculator/age_group.rb +60 -15
  6. data/lib/singapore_cpf_calculator/base_calculator.rb +60 -8
  7. data/lib/singapore_cpf_calculator/cpf_contribution.rb +14 -3
  8. data/lib/singapore_cpf_calculator/null_contribution_calculator.rb +4 -2
  9. data/lib/singapore_cpf_calculator/requirements/group_55_years_and_below.rb +13 -0
  10. data/lib/singapore_cpf_calculator/requirements/group_above_65_to_70_years.rb +13 -0
  11. data/lib/singapore_cpf_calculator/requirements/group_above_70_years.rb +13 -0
  12. data/lib/singapore_cpf_calculator/requirements.rb +4 -0
  13. data/lib/singapore_cpf_calculator/residency_module_common.rb +5 -1
  14. data/lib/singapore_cpf_calculator/version.rb +1 -1
  15. data/lib/singapore_cpf_calculator/year_2012_to_2015_aw_ceiling_module.rb +7 -0
  16. data/lib/singapore_cpf_calculator/year_2014/base.rb +1 -0
  17. data/lib/singapore_cpf_calculator/year_2014/citizen_or_spr_3/citzen_or_spr3_base.rb +8 -0
  18. data/lib/singapore_cpf_calculator/year_2015/base.rb +1 -0
  19. data/lib/singapore_cpf_calculator/year_2015/citizen_or_spr_3/age_50_below_contribution_calculator.rb +1 -1
  20. data/lib/singapore_cpf_calculator/year_2015/citizen_or_spr_3/age_50_to_55_contribution_calculator.rb +1 -1
  21. data/lib/singapore_cpf_calculator/year_2015/citizen_or_spr_3/age_55_to_60_contribution_calculator.rb +1 -1
  22. data/lib/singapore_cpf_calculator/year_2015/citizen_or_spr_3/age_60_to_65_contribution_calculator.rb +1 -1
  23. data/lib/singapore_cpf_calculator/year_2015/citizen_or_spr_3/age_65_up_contribution_calculator.rb +1 -1
  24. data/lib/singapore_cpf_calculator/year_2015/citizen_or_spr_3/citizen_or_spr3_base.rb +9 -0
  25. data/lib/singapore_cpf_calculator/year_2015/citizen_or_spr_3.rb +1 -0
  26. data/lib/singapore_cpf_calculator/year_2015.rb +1 -1
  27. data/lib/singapore_cpf_calculator/year_2016/base.rb +21 -0
  28. data/lib/singapore_cpf_calculator/year_2016/citizen_or_spr_3/age_55_below_contribution_calculator.rb +32 -0
  29. data/lib/singapore_cpf_calculator/year_2016/citizen_or_spr_3/age_55_to_60_contribution_calculator.rb +32 -0
  30. data/lib/singapore_cpf_calculator/year_2016/citizen_or_spr_3/age_60_to_65_contribution_calculator.rb +32 -0
  31. data/lib/singapore_cpf_calculator/year_2016/citizen_or_spr_3/age_65_up_contribution_calculator.rb +32 -0
  32. data/lib/singapore_cpf_calculator/year_2016/citizen_or_spr_3/citizen_or_spr3_base.rb +9 -0
  33. data/lib/singapore_cpf_calculator/year_2016/citizen_or_spr_3.rb +34 -0
  34. data/lib/singapore_cpf_calculator/year_2016/spr_1_fg/age_55_below_contribution_calculator.rb +32 -0
  35. data/lib/singapore_cpf_calculator/year_2016/spr_1_fg/age_55_to_60_contribution_calculator.rb +32 -0
  36. data/lib/singapore_cpf_calculator/year_2016/spr_1_fg/age_60_to_65_contribution_calculator.rb +32 -0
  37. data/lib/singapore_cpf_calculator/year_2016/spr_1_fg/age_65_up_contribution_calculator.rb +32 -0
  38. data/lib/singapore_cpf_calculator/year_2016/spr_1_fg.rb +35 -0
  39. data/lib/singapore_cpf_calculator/year_2016/spr_1_gg/age_55_below_contribution_calculator.rb +32 -0
  40. data/lib/singapore_cpf_calculator/year_2016/spr_1_gg/age_55_to_60_contribution_calculator.rb +14 -0
  41. data/lib/singapore_cpf_calculator/year_2016/spr_1_gg/age_60_to_65_contribution_calculator.rb +32 -0
  42. data/lib/singapore_cpf_calculator/year_2016/spr_1_gg/age_65_up_contribution_calculator.rb +14 -0
  43. data/lib/singapore_cpf_calculator/year_2016/spr_1_gg.rb +34 -0
  44. data/lib/singapore_cpf_calculator/year_2016/spr_2_fg/age_55_below_contribution_calculator.rb +32 -0
  45. data/lib/singapore_cpf_calculator/year_2016/spr_2_fg/age_55_to_60_contribution_calculator.rb +32 -0
  46. data/lib/singapore_cpf_calculator/year_2016/spr_2_fg/age_60_to_65_contribution_calculator.rb +32 -0
  47. data/lib/singapore_cpf_calculator/year_2016/spr_2_fg/age_65_up_contribution_calculator.rb +32 -0
  48. data/lib/singapore_cpf_calculator/year_2016/spr_2_fg.rb +34 -0
  49. data/lib/singapore_cpf_calculator/year_2016/spr_2_gg/age_55_below_contribution_calculator.rb +32 -0
  50. data/lib/singapore_cpf_calculator/year_2016/spr_2_gg/age_55_to_60_contribution_calculator.rb +32 -0
  51. data/lib/singapore_cpf_calculator/year_2016/spr_2_gg/age_60_to_65_contribution_calculator.rb +32 -0
  52. data/lib/singapore_cpf_calculator/year_2016/spr_2_gg/age_65_up_contribution_calculator.rb +32 -0
  53. data/lib/singapore_cpf_calculator/year_2016/spr_2_gg.rb +34 -0
  54. data/lib/singapore_cpf_calculator/year_2016.rb +38 -0
  55. data/lib/singapore_cpf_calculator/year_2022/citizen_or_spr_3/age_55_below_contribution_calculator.rb +8 -0
  56. data/lib/singapore_cpf_calculator/year_2022/citizen_or_spr_3/age_55_to_60_contribution_calculator.rb +32 -0
  57. data/lib/singapore_cpf_calculator/year_2022/citizen_or_spr_3/age_60_to_65_contribution_calculator.rb +32 -0
  58. data/lib/singapore_cpf_calculator/year_2022/citizen_or_spr_3/age_65_to_70_contribution_calculator.rb +32 -0
  59. data/lib/singapore_cpf_calculator/year_2022/citizen_or_spr_3/age_70_up_contribution_calculator.rb +32 -0
  60. data/lib/singapore_cpf_calculator/year_2022/citizen_or_spr_3/citizen_or_spr3_base.rb +9 -0
  61. data/lib/singapore_cpf_calculator/year_2022/citizen_or_spr_3.rb +40 -0
  62. data/lib/singapore_cpf_calculator/year_2022/spr_1_fg/age_55_below_contribution_calculator.rb +11 -0
  63. data/lib/singapore_cpf_calculator/year_2022/spr_1_fg/age_55_to_60_contribution_calculator.rb +32 -0
  64. data/lib/singapore_cpf_calculator/year_2022/spr_1_fg/age_60_to_65_contribution_calculator.rb +32 -0
  65. data/lib/singapore_cpf_calculator/year_2022/spr_1_fg/age_65_to_70_contribution_calculator.rb +32 -0
  66. data/lib/singapore_cpf_calculator/year_2022/spr_1_fg/age_70_up_contribution_calculator.rb +32 -0
  67. data/lib/singapore_cpf_calculator/year_2022/spr_1_fg.rb +40 -0
  68. data/lib/singapore_cpf_calculator/year_2022/spr_1_gg/age_55_below_contribution_calculator.rb +11 -0
  69. data/lib/singapore_cpf_calculator/year_2022/spr_1_gg/age_55_to_60_contribution_calculator.rb +12 -0
  70. data/lib/singapore_cpf_calculator/year_2022/spr_1_gg/age_60_to_65_contribution_calculator.rb +11 -0
  71. data/lib/singapore_cpf_calculator/year_2022/spr_1_gg/age_65_up_contribution_calculator.rb +14 -0
  72. data/lib/singapore_cpf_calculator/year_2022/spr_1_gg.rb +34 -0
  73. data/lib/singapore_cpf_calculator/year_2022/spr_2_fg/age_55_below_contribution_calculator.rb +11 -0
  74. data/lib/singapore_cpf_calculator/year_2022/spr_2_fg/age_55_to_60_contribution_calculator.rb +32 -0
  75. data/lib/singapore_cpf_calculator/year_2022/spr_2_fg/age_60_to_65_contribution_calculator.rb +32 -0
  76. data/lib/singapore_cpf_calculator/year_2022/spr_2_fg/age_65_to_70_contribution_calculator.rb +32 -0
  77. data/lib/singapore_cpf_calculator/year_2022/spr_2_fg/age_70_up_contribution_calculator.rb +32 -0
  78. data/lib/singapore_cpf_calculator/year_2022/spr_2_fg.rb +40 -0
  79. data/lib/singapore_cpf_calculator/year_2022/spr_2_gg/age_55_below_contribution_calculator.rb +11 -0
  80. data/lib/singapore_cpf_calculator/year_2022/spr_2_gg/age_55_to_60_contribution_calculator.rb +11 -0
  81. data/lib/singapore_cpf_calculator/year_2022/spr_2_gg/age_60_to_65_contribution_calculator.rb +11 -0
  82. data/lib/singapore_cpf_calculator/year_2022/spr_2_gg/age_65_up_contribution_calculator.rb +11 -0
  83. data/lib/singapore_cpf_calculator/year_2022/spr_2_gg.rb +34 -0
  84. data/lib/singapore_cpf_calculator/year_2022.rb +35 -0
  85. data/lib/singapore_cpf_calculator.rb +36 -15
  86. data/singapore_cpf_calculator.gemspec +3 -4
  87. data/spec/acceptance/company_a.csv +1367 -1365
  88. data/spec/acceptance/company_a_spec.rb +6 -4
  89. data/spec/singapore_cpf_calculator/age_group_spec.rb +15 -3
  90. data/spec/singapore_cpf_calculator/year_2014/citizen_or_spr_3/age_50_below_contribution_calculator_spec.rb +10 -10
  91. data/spec/singapore_cpf_calculator/year_2015/citizen_or_spr_3_spec.rb +45 -10
  92. data/spec/singapore_cpf_calculator/year_2015/spr_1_fg_spec.rb +10 -10
  93. data/spec/singapore_cpf_calculator/year_2015/spr_1_gg_spec.rb +11 -11
  94. data/spec/singapore_cpf_calculator/year_2015/spr_2_fg_spec.rb +11 -11
  95. data/spec/singapore_cpf_calculator/year_2015/spr_2_gg/age_55_to_60_contribution_calculator_spec.rb +8 -8
  96. data/spec/singapore_cpf_calculator/year_2015/spr_2_gg_spec.rb +11 -11
  97. data/spec/singapore_cpf_calculator/year_2015_spec.rb +3 -3
  98. data/spec/singapore_cpf_calculator/year_2016/citizen_or_spr_3/age_55_below_contribution_calculator_spec.rb +63 -0
  99. data/spec/singapore_cpf_calculator/year_2016/citizen_or_spr_3/age_55_to_60_contribution_calculator_spec.rb +63 -0
  100. data/spec/singapore_cpf_calculator/year_2016/citizen_or_spr_3/age_60_to_65_contribution_calculator_spec.rb +63 -0
  101. data/spec/singapore_cpf_calculator/year_2016/citizen_or_spr_3/age_65_up_contribution_calculator_spec.rb +63 -0
  102. data/spec/singapore_cpf_calculator/year_2016/citizen_or_spr_3_spec.rb +224 -0
  103. data/spec/singapore_cpf_calculator/year_2016/spr_1_fg/age_55_below_contribution_calculator_spec.rb +63 -0
  104. data/spec/singapore_cpf_calculator/year_2016/spr_1_fg/age_55_to_60_contribution_calculator_spec.rb +63 -0
  105. data/spec/singapore_cpf_calculator/year_2016/spr_1_fg/age_60_to_65_contribution_calculator_spec.rb +63 -0
  106. data/spec/singapore_cpf_calculator/year_2016/spr_1_fg/age_65_up_contribution_calculator_spec.rb +63 -0
  107. data/spec/singapore_cpf_calculator/year_2016/spr_1_fg_spec.rb +158 -0
  108. data/spec/singapore_cpf_calculator/year_2016/spr_1_gg/age_55_below_contribution_calculator_spec.rb +63 -0
  109. data/spec/singapore_cpf_calculator/year_2016/spr_1_gg/age_55_to_60_contribution_calculator_spec.rb +63 -0
  110. data/spec/singapore_cpf_calculator/year_2016/spr_1_gg/age_60_to_65_contribution_calculator_spec.rb +63 -0
  111. data/spec/singapore_cpf_calculator/year_2016/spr_1_gg/age_65_up_contribution_calculator_spec.rb +63 -0
  112. data/spec/singapore_cpf_calculator/year_2016/spr_1_gg_spec.rb +158 -0
  113. data/spec/singapore_cpf_calculator/year_2016/spr_2_fg/age_55_below_contribution_calculator_spec.rb +63 -0
  114. data/spec/singapore_cpf_calculator/year_2016/spr_2_fg/age_55_to_60_contribution_calculator_spec.rb +63 -0
  115. data/spec/singapore_cpf_calculator/year_2016/spr_2_fg/age_60_to_65_contribution_calculator_spec.rb +63 -0
  116. data/spec/singapore_cpf_calculator/year_2016/spr_2_fg/age_65_up_contribution_calculator_spec.rb +63 -0
  117. data/spec/singapore_cpf_calculator/year_2016/spr_2_fg_spec.rb +158 -0
  118. data/spec/singapore_cpf_calculator/year_2016/spr_2_gg/age_55_below_contribution_calculator_spec.rb +63 -0
  119. data/spec/singapore_cpf_calculator/year_2016/spr_2_gg/age_55_to_60_contribution_calculator_spec.rb +63 -0
  120. data/spec/singapore_cpf_calculator/year_2016/spr_2_gg/age_60_to_65_contribution_calculator_spec.rb +63 -0
  121. data/spec/singapore_cpf_calculator/year_2016/spr_2_gg/age_65_up_contribution_calculator_spec.rb +63 -0
  122. data/spec/singapore_cpf_calculator/year_2016/spr_2_gg_spec.rb +158 -0
  123. data/spec/singapore_cpf_calculator/year_2016_spec.rb +187 -0
  124. data/spec/singapore_cpf_calculator/year_2022/citizen_or_spr_3/age_55_below_contribution_calculator_spec.rb +63 -0
  125. data/spec/singapore_cpf_calculator/year_2022/citizen_or_spr_3/age_55_to_60_contribution_calculator_spec.rb +63 -0
  126. data/spec/singapore_cpf_calculator/year_2022/citizen_or_spr_3/age_60_to_65_contribution_calculator_spec.rb +63 -0
  127. data/spec/singapore_cpf_calculator/year_2022/citizen_or_spr_3/age_65_to_70_contribution_calculator_spec.rb +63 -0
  128. data/spec/singapore_cpf_calculator/year_2022/citizen_or_spr_3/age_70_up_contribution_spec.rb +63 -0
  129. data/spec/singapore_cpf_calculator/year_2022/citizen_or_spr_3_spec.rb +242 -0
  130. data/spec/singapore_cpf_calculator/year_2022/spr_1_fg/age_55_below_contribution_calculator_spec.rb +63 -0
  131. data/spec/singapore_cpf_calculator/year_2022/spr_1_fg/age_55_to_60_contribution_calculator_spec.rb +63 -0
  132. data/spec/singapore_cpf_calculator/year_2022/spr_1_fg/age_60_to_65_contribution_calculator_spec.rb +63 -0
  133. data/spec/singapore_cpf_calculator/year_2022/spr_1_fg/age_65_to_70_contribution_calculator_spec.rb +63 -0
  134. data/spec/singapore_cpf_calculator/year_2022/spr_1_fg/age_70_up_contribution_calculator_spec.rb +63 -0
  135. data/spec/singapore_cpf_calculator/year_2022/spr_1_fg_spec.rb +176 -0
  136. data/spec/singapore_cpf_calculator/year_2022/spr_1_gg/age_55_below_contribution_calculator_spec.rb +63 -0
  137. data/spec/singapore_cpf_calculator/year_2022/spr_1_gg/age_55_to_60_contribution_calculator_spec.rb +63 -0
  138. data/spec/singapore_cpf_calculator/year_2022/spr_1_gg/age_60_to_65_contribution_calculator_spec.rb +63 -0
  139. data/spec/singapore_cpf_calculator/year_2022/spr_1_gg/age_65_up_contribution_calculator_spec.rb +63 -0
  140. data/spec/singapore_cpf_calculator/year_2022/spr_1_gg_spec.rb +158 -0
  141. data/spec/singapore_cpf_calculator/year_2022/spr_2_fg/age_55_below_contribution_calculator_spec.rb +63 -0
  142. data/spec/singapore_cpf_calculator/year_2022/spr_2_fg/age_55_to_60_contribution_calculator_spec.rb +63 -0
  143. data/spec/singapore_cpf_calculator/year_2022/spr_2_fg/age_60_to_65_contribution_calculator_spec.rb +63 -0
  144. data/spec/singapore_cpf_calculator/year_2022/spr_2_fg/age_65_to_70_contribution_calculator_spec.rb +63 -0
  145. data/spec/singapore_cpf_calculator/year_2022/spr_2_fg/age_70_up_contribution_calculator_spec.rb +63 -0
  146. data/spec/singapore_cpf_calculator/year_2022/spr_2_fg_spec.rb +176 -0
  147. data/spec/singapore_cpf_calculator/year_2022/spr_2_gg/age_55_below_contribution_calculator_spec.rb +63 -0
  148. data/spec/singapore_cpf_calculator/year_2022/spr_2_gg/age_55_to_60_contribution_calculator_spec.rb +63 -0
  149. data/spec/singapore_cpf_calculator/year_2022/spr_2_gg/age_60_to_65_contribution_calculator_spec.rb +63 -0
  150. data/spec/singapore_cpf_calculator/year_2022/spr_2_gg/age_65_up_contribution_calculator_spec.rb +63 -0
  151. data/spec/singapore_cpf_calculator/year_2022/spr_2_gg_spec.rb +158 -0
  152. data/spec/singapore_cpf_calculator/year_2022_spec.rb +192 -0
  153. data/spec/singapore_cpf_calculator_spec.rb +87 -2
  154. data/spec/spec_helper.rb +17 -10
  155. metadata +183 -23
  156. data/circle.yml +0 -3
@@ -0,0 +1,32 @@
1
+ module SingaporeCPFCalculator
2
+ module Year2016
3
+ module CitizenOrSPR3
4
+
5
+ # Payment calculator for Singapore's Central Provident Fund for employee's age 50 and below.
6
+ class Age55BelowContributionCalculator < CitizenOrSpr3Base
7
+
8
+ extend Requirements::Group55YearsAndBelow
9
+
10
+ private
11
+
12
+ def tc_rate_1
13
+ "0.17"
14
+ end
15
+
16
+ def tc_rate_2
17
+ "0.37"
18
+ end
19
+
20
+ def ec_rate
21
+ "0.20"
22
+ end
23
+
24
+ def adjustment_rate
25
+ "0.6"
26
+ end
27
+
28
+ end
29
+
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,32 @@
1
+ module SingaporeCPFCalculator
2
+ module Year2016
3
+ module CitizenOrSPR3
4
+
5
+ # Payment calculator for Singapore's Central Provident Fund for employee's age 55 to 60.
6
+ class Age55To60ContributionCalculator < CitizenOrSpr3Base
7
+
8
+ extend Requirements::GroupAbove55To60Years
9
+
10
+ private
11
+
12
+ def tc_rate_1
13
+ "0.13"
14
+ end
15
+
16
+ def tc_rate_2
17
+ "0.26"
18
+ end
19
+
20
+ def ec_rate
21
+ "0.13"
22
+ end
23
+
24
+ def adjustment_rate
25
+ "0.39"
26
+ end
27
+
28
+ end
29
+
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,32 @@
1
+ module SingaporeCPFCalculator
2
+ module Year2016
3
+ module CitizenOrSPR3
4
+
5
+ # Payment calculator for Singapore's Central Provident Fund for employee's age 60 to 65.
6
+ class Age60To65ContributionCalculator < CitizenOrSpr3Base
7
+
8
+ extend Requirements::GroupAbove60To65Years
9
+
10
+ private
11
+
12
+ def tc_rate_1
13
+ "0.09"
14
+ end
15
+
16
+ def tc_rate_2
17
+ "0.165"
18
+ end
19
+
20
+ def ec_rate
21
+ "0.075"
22
+ end
23
+
24
+ def adjustment_rate
25
+ "0.225"
26
+ end
27
+
28
+ end
29
+
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,32 @@
1
+ module SingaporeCPFCalculator
2
+ module Year2016
3
+ module CitizenOrSPR3
4
+
5
+ # Payment calculator for Singapore's Central Provident Fund for employee's age 65 and above.
6
+ class Age65UpContributionCalculator < CitizenOrSpr3Base
7
+
8
+ extend Requirements::GroupAbove65Years
9
+
10
+ private
11
+
12
+ def tc_rate_1
13
+ "0.075"
14
+ end
15
+
16
+ def tc_rate_2
17
+ "0.125"
18
+ end
19
+
20
+ def ec_rate
21
+ "0.05"
22
+ end
23
+
24
+ def adjustment_rate
25
+ "0.15"
26
+ end
27
+
28
+ end
29
+
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,9 @@
1
+ module SingaporeCPFCalculator
2
+ module Year2016
3
+ module CitizenOrSPR3
4
+ # Base calculator for citizen or spr3 in year 2016
5
+ class CitizenOrSpr3Base < Year2016::Base
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,34 @@
1
+ require_relative 'citizen_or_spr_3/citizen_or_spr3_base'
2
+ require_relative "citizen_or_spr_3/age_55_below_contribution_calculator"
3
+ require_relative "citizen_or_spr_3/age_55_to_60_contribution_calculator"
4
+ require_relative "citizen_or_spr_3/age_60_to_65_contribution_calculator"
5
+ require_relative "citizen_or_spr_3/age_65_up_contribution_calculator"
6
+
7
+ module SingaporeCPFCalculator
8
+ module Year2016
9
+
10
+ # Residency module for Singaporean Citizen and Permanent Residents on their 3rd year.
11
+ module CitizenOrSPR3
12
+
13
+ extend ResidencyModuleCommon
14
+ extend CitizenOrSPR3Common
15
+
16
+ class << self
17
+
18
+ private
19
+
20
+ def calculators
21
+ [
22
+ Age55BelowContributionCalculator,
23
+ Age55To60ContributionCalculator,
24
+ Age60To65ContributionCalculator,
25
+ Age65UpContributionCalculator,
26
+ ]
27
+ end
28
+
29
+ end
30
+
31
+ end
32
+
33
+ end
34
+ end
@@ -0,0 +1,32 @@
1
+ module SingaporeCPFCalculator
2
+ module Year2016
3
+ module SPR1FG
4
+
5
+ # Payment calculator for Singapore's Central Provident Fund for employee's age 50 and below.
6
+ class Age55BelowContributionCalculator < Year2016::Base
7
+
8
+ extend Requirements::Group55YearsAndBelow
9
+
10
+ private
11
+
12
+ def tc_rate_1
13
+ "0.17"
14
+ end
15
+
16
+ def tc_rate_2
17
+ "0.22"
18
+ end
19
+
20
+ def ec_rate
21
+ "0.05"
22
+ end
23
+
24
+ def adjustment_rate
25
+ "0.15"
26
+ end
27
+
28
+ end
29
+
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,32 @@
1
+ module SingaporeCPFCalculator
2
+ module Year2016
3
+ module SPR1FG
4
+
5
+ # Payment calculator for Singapore's Central Provident Fund for employee's age 55 to 60.
6
+ class Age55To60ContributionCalculator < Year2016::Base
7
+
8
+ extend Requirements::GroupAbove55To60Years
9
+
10
+ private
11
+
12
+ def tc_rate_1
13
+ "0.13"
14
+ end
15
+
16
+ def tc_rate_2
17
+ "0.18"
18
+ end
19
+
20
+ def ec_rate
21
+ "0.05"
22
+ end
23
+
24
+ def adjustment_rate
25
+ "0.15"
26
+ end
27
+
28
+ end
29
+
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,32 @@
1
+ module SingaporeCPFCalculator
2
+ module Year2016
3
+ module SPR1FG
4
+
5
+ # Payment calculator for Singapore's Central Provident Fund for employee's age 60 to 65.
6
+ class Age60To65ContributionCalculator < Year2016::Base
7
+
8
+ extend Requirements::GroupAbove60To65Years
9
+
10
+ private
11
+
12
+ def tc_rate_1
13
+ "0.09"
14
+ end
15
+
16
+ def tc_rate_2
17
+ "0.14"
18
+ end
19
+
20
+ def ec_rate
21
+ "0.05"
22
+ end
23
+
24
+ def adjustment_rate
25
+ "0.15"
26
+ end
27
+
28
+ end
29
+
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,32 @@
1
+ module SingaporeCPFCalculator
2
+ module Year2016
3
+ module SPR1FG
4
+
5
+ # Payment calculator for Singapore's Central Provident Fund for employee's age 65 and above.
6
+ class Age65UpContributionCalculator < Year2016::Base
7
+
8
+ extend Requirements::GroupAbove65Years
9
+
10
+ private
11
+
12
+ def tc_rate_1
13
+ "0.075"
14
+ end
15
+
16
+ def tc_rate_2
17
+ "0.125"
18
+ end
19
+
20
+ def ec_rate
21
+ "0.05"
22
+ end
23
+
24
+ def adjustment_rate
25
+ "0.15"
26
+ end
27
+
28
+ end
29
+
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,35 @@
1
+ require_relative "spr_1_fg/age_55_below_contribution_calculator"
2
+ require_relative "spr_1_fg/age_55_to_60_contribution_calculator"
3
+ require_relative "spr_1_fg/age_60_to_65_contribution_calculator"
4
+ require_relative "spr_1_fg/age_65_up_contribution_calculator"
5
+
6
+ module SingaporeCPFCalculator
7
+ module Year2016
8
+
9
+ # For Singapore Permanent Resident (SPR) on their first year with graduated (G, partial)
10
+ # employee contribution and full (F) employer contribution
11
+ module SPR1FG
12
+
13
+ extend ResidencyModuleCommon
14
+ extend SPR1FGCommon
15
+
16
+
17
+ class << self
18
+
19
+ private
20
+
21
+ def calculators
22
+ [
23
+ Age55BelowContributionCalculator,
24
+ Age55To60ContributionCalculator,
25
+ Age60To65ContributionCalculator,
26
+ Age65UpContributionCalculator,
27
+ ]
28
+ end
29
+
30
+ end
31
+
32
+ end
33
+
34
+ end
35
+ end
@@ -0,0 +1,32 @@
1
+ module SingaporeCPFCalculator
2
+ module Year2016
3
+ module SPR1GG
4
+
5
+ # Payment calculator for Singapore's Central Provident Fund for employee's age 50 and below.
6
+ class Age55BelowContributionCalculator < Year2016::Base
7
+
8
+ extend Requirements::Group55YearsAndBelow
9
+
10
+ private
11
+
12
+ def tc_rate_1
13
+ "0.04"
14
+ end
15
+
16
+ def tc_rate_2
17
+ "0.09"
18
+ end
19
+
20
+ def ec_rate
21
+ "0.05"
22
+ end
23
+
24
+ def adjustment_rate
25
+ "0.15"
26
+ end
27
+
28
+ end
29
+
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,14 @@
1
+ module SingaporeCPFCalculator
2
+ module Year2016
3
+ module SPR1GG
4
+
5
+ # Payment calculator for Singapore's Central Provident Fund for employee's age 55 to 60.
6
+ class Age55To60ContributionCalculator < Age55BelowContributionCalculator
7
+
8
+ extend Requirements::GroupAbove55To60Years
9
+
10
+ end
11
+
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,32 @@
1
+ module SingaporeCPFCalculator
2
+ module Year2016
3
+ module SPR1GG
4
+
5
+ # Payment calculator for Singapore's Central Provident Fund for employee's age 60 to 65.
6
+ class Age60To65ContributionCalculator < Year2016::Base
7
+
8
+ extend Requirements::GroupAbove60To65Years
9
+
10
+ private
11
+
12
+ def tc_rate_1
13
+ "0.035"
14
+ end
15
+
16
+ def tc_rate_2
17
+ "0.085"
18
+ end
19
+
20
+ def ec_rate
21
+ "0.05"
22
+ end
23
+
24
+ def adjustment_rate
25
+ "0.15"
26
+ end
27
+
28
+ end
29
+
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,14 @@
1
+ module SingaporeCPFCalculator
2
+ module Year2016
3
+ module SPR1GG
4
+
5
+ # Payment calculator for Singapore's Central Provident Fund for employee's age 65 and above.
6
+ class Age65UpContributionCalculator < Age60To65ContributionCalculator
7
+
8
+ extend Requirements::GroupAbove65Years
9
+
10
+ end
11
+
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,34 @@
1
+ require_relative "spr_1_gg/age_55_below_contribution_calculator"
2
+ require_relative "spr_1_gg/age_55_to_60_contribution_calculator"
3
+ require_relative "spr_1_gg/age_60_to_65_contribution_calculator"
4
+ require_relative "spr_1_gg/age_65_up_contribution_calculator"
5
+
6
+ module SingaporeCPFCalculator
7
+ module Year2016
8
+
9
+ # For Singapore Permanent Resident (SPR) on their first year with graduated (G, partial)
10
+ # employer contribution and graduated (G, partial) employee contribution
11
+ module SPR1GG
12
+
13
+ extend ResidencyModuleCommon
14
+ extend SPR1GGCommon
15
+
16
+ class << self
17
+
18
+ private
19
+
20
+ def calculators
21
+ [
22
+ Age55BelowContributionCalculator,
23
+ Age55To60ContributionCalculator,
24
+ Age60To65ContributionCalculator,
25
+ Age65UpContributionCalculator,
26
+ ]
27
+ end
28
+
29
+ end
30
+
31
+ end
32
+
33
+ end
34
+ end
@@ -0,0 +1,32 @@
1
+ module SingaporeCPFCalculator
2
+ module Year2016
3
+ module SPR2FG
4
+
5
+ # Payment calculator for Singapore's Central Provident Fund for employee's age 50 and below.
6
+ class Age55BelowContributionCalculator < Year2016::Base
7
+
8
+ extend Requirements::Group55YearsAndBelow
9
+
10
+ private
11
+
12
+ def tc_rate_1
13
+ "0.17"
14
+ end
15
+
16
+ def tc_rate_2
17
+ "0.32"
18
+ end
19
+
20
+ def ec_rate
21
+ "0.15"
22
+ end
23
+
24
+ def adjustment_rate
25
+ "0.45"
26
+ end
27
+
28
+ end
29
+
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,32 @@
1
+ module SingaporeCPFCalculator
2
+ module Year2016
3
+ module SPR2FG
4
+
5
+ # Payment calculator for Singapore's Central Provident Fund for employee's age 55 to 60.
6
+ class Age55To60ContributionCalculator < Year2016::Base
7
+
8
+ extend Requirements::GroupAbove55To60Years
9
+
10
+ private
11
+
12
+ def tc_rate_1
13
+ "0.13"
14
+ end
15
+
16
+ def tc_rate_2
17
+ "0.255"
18
+ end
19
+
20
+ def ec_rate
21
+ "0.125"
22
+ end
23
+
24
+ def adjustment_rate
25
+ "0.375"
26
+ end
27
+
28
+ end
29
+
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,32 @@
1
+ module SingaporeCPFCalculator
2
+ module Year2016
3
+ module SPR2FG
4
+
5
+ # Payment calculator for Singapore's Central Provident Fund for employee's age 60 to 65.
6
+ class Age60To65ContributionCalculator < Year2016::Base
7
+
8
+ extend Requirements::GroupAbove60To65Years
9
+
10
+ private
11
+
12
+ def tc_rate_1
13
+ "0.09"
14
+ end
15
+
16
+ def tc_rate_2
17
+ "0.165"
18
+ end
19
+
20
+ def ec_rate
21
+ "0.075"
22
+ end
23
+
24
+ def adjustment_rate
25
+ "0.225"
26
+ end
27
+
28
+ end
29
+
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,32 @@
1
+ module SingaporeCPFCalculator
2
+ module Year2016
3
+ module SPR2FG
4
+
5
+ # Payment calculator for Singapore's Central Provident Fund for employee's age 65 and above.
6
+ class Age65UpContributionCalculator < Year2016::Base
7
+
8
+ extend Requirements::GroupAbove65Years
9
+
10
+ private
11
+
12
+ def tc_rate_1
13
+ "0.075"
14
+ end
15
+
16
+ def tc_rate_2
17
+ "0.125"
18
+ end
19
+
20
+ def ec_rate
21
+ "0.05"
22
+ end
23
+
24
+ def adjustment_rate
25
+ "0.15"
26
+ end
27
+
28
+ end
29
+
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,34 @@
1
+ require_relative "spr_2_fg/age_55_below_contribution_calculator"
2
+ require_relative "spr_2_fg/age_55_to_60_contribution_calculator"
3
+ require_relative "spr_2_fg/age_60_to_65_contribution_calculator"
4
+ require_relative "spr_2_fg/age_65_up_contribution_calculator"
5
+
6
+ module SingaporeCPFCalculator
7
+ module Year2016
8
+
9
+ # For Singapore Permanent Resident (SPR) on their second year with graduated (G, partial)
10
+ # employee contribution and full (F) employer contribution
11
+ module SPR2FG
12
+
13
+ extend ResidencyModuleCommon
14
+ extend SPR2FGCommon
15
+
16
+ class << self
17
+
18
+ private
19
+
20
+ def calculators
21
+ [
22
+ Age55BelowContributionCalculator,
23
+ Age55To60ContributionCalculator,
24
+ Age60To65ContributionCalculator,
25
+ Age65UpContributionCalculator,
26
+ ]
27
+ end
28
+
29
+ end
30
+
31
+ end
32
+
33
+ end
34
+ end
@@ -0,0 +1,32 @@
1
+ module SingaporeCPFCalculator
2
+ module Year2016
3
+ module SPR2GG
4
+
5
+ # Payment calculator for Singapore's Central Provident Fund for employee's age 50 and below.
6
+ class Age55BelowContributionCalculator < Year2016::Base
7
+
8
+ extend Requirements::Group55YearsAndBelow
9
+
10
+ private
11
+
12
+ def tc_rate_1
13
+ "0.09"
14
+ end
15
+
16
+ def tc_rate_2
17
+ "0.24"
18
+ end
19
+
20
+ def ec_rate
21
+ "0.15"
22
+ end
23
+
24
+ def adjustment_rate
25
+ "0.45"
26
+ end
27
+
28
+ end
29
+
30
+ end
31
+ end
32
+ end