singapore_cpf_calculator 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (163) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +22 -0
  3. data/.rspec +2 -0
  4. data/Gemfile +4 -0
  5. data/LICENSE.txt +22 -0
  6. data/README.md +97 -0
  7. data/Rakefile +2 -0
  8. data/circle.yml +3 -0
  9. data/lib/singapore_cpf_calculator.rb +125 -0
  10. data/lib/singapore_cpf_calculator/age_group.rb +71 -0
  11. data/lib/singapore_cpf_calculator/base_calculator.rb +114 -0
  12. data/lib/singapore_cpf_calculator/before_spr.rb +36 -0
  13. data/lib/singapore_cpf_calculator/citizen_or_spr_3_common.rb +27 -0
  14. data/lib/singapore_cpf_calculator/cpf_contribution.rb +28 -0
  15. data/lib/singapore_cpf_calculator/null_contribution_calculator.rb +17 -0
  16. data/lib/singapore_cpf_calculator/requirements.rb +10 -0
  17. data/lib/singapore_cpf_calculator/requirements/group_50_years_and_below.rb +13 -0
  18. data/lib/singapore_cpf_calculator/requirements/group_above_50_to_55_years.rb +13 -0
  19. data/lib/singapore_cpf_calculator/requirements/group_above_55_to_60_years.rb +13 -0
  20. data/lib/singapore_cpf_calculator/requirements/group_above_60_to_65_years.rb +13 -0
  21. data/lib/singapore_cpf_calculator/requirements/group_above_65_years.rb +13 -0
  22. data/lib/singapore_cpf_calculator/residency_module_common.rb +12 -0
  23. data/lib/singapore_cpf_calculator/spr_1_fg_common.rb +26 -0
  24. data/lib/singapore_cpf_calculator/spr_1_gg_common.rb +26 -0
  25. data/lib/singapore_cpf_calculator/spr_2_fg_common.rb +26 -0
  26. data/lib/singapore_cpf_calculator/spr_2_gg_common.rb +26 -0
  27. data/lib/singapore_cpf_calculator/spr_status.rb +52 -0
  28. data/lib/singapore_cpf_calculator/version.rb +3 -0
  29. data/lib/singapore_cpf_calculator/year_2014.rb +37 -0
  30. data/lib/singapore_cpf_calculator/year_2014/base.rb +17 -0
  31. data/lib/singapore_cpf_calculator/year_2014/citizen_or_spr_3.rb +35 -0
  32. data/lib/singapore_cpf_calculator/year_2014/citizen_or_spr_3/age_50_below_contribution_calculator.rb +32 -0
  33. data/lib/singapore_cpf_calculator/year_2014/citizen_or_spr_3/age_50_to_55_contribution_calculator.rb +33 -0
  34. data/lib/singapore_cpf_calculator/year_2014/citizen_or_spr_3/age_55_to_60_contribution_calculator.rb +32 -0
  35. data/lib/singapore_cpf_calculator/year_2014/citizen_or_spr_3/age_60_to_65_contribution_calculator.rb +32 -0
  36. data/lib/singapore_cpf_calculator/year_2014/citizen_or_spr_3/age_65_up_contribution_calculator.rb +32 -0
  37. data/lib/singapore_cpf_calculator/year_2014/spr_1_fg.rb +36 -0
  38. data/lib/singapore_cpf_calculator/year_2014/spr_1_fg/age_50_below_contribution_calculator.rb +33 -0
  39. data/lib/singapore_cpf_calculator/year_2014/spr_1_fg/age_50_to_55_contribution_calculator.rb +32 -0
  40. data/lib/singapore_cpf_calculator/year_2014/spr_1_fg/age_55_to_60_contribution_calculator.rb +32 -0
  41. data/lib/singapore_cpf_calculator/year_2014/spr_1_fg/age_60_to_65_contribution_calculator.rb +32 -0
  42. data/lib/singapore_cpf_calculator/year_2014/spr_1_fg/age_65_up_contribution_calculator.rb +32 -0
  43. data/lib/singapore_cpf_calculator/year_2014/spr_1_gg.rb +36 -0
  44. data/lib/singapore_cpf_calculator/year_2014/spr_1_gg/age_50_below_contribution_calculator.rb +32 -0
  45. data/lib/singapore_cpf_calculator/year_2014/spr_1_gg/age_50_to_55_contribution_calculator.rb +14 -0
  46. data/lib/singapore_cpf_calculator/year_2014/spr_1_gg/age_55_to_60_contribution_calculator.rb +14 -0
  47. data/lib/singapore_cpf_calculator/year_2014/spr_1_gg/age_60_to_65_contribution_calculator.rb +32 -0
  48. data/lib/singapore_cpf_calculator/year_2014/spr_1_gg/age_65_up_contribution_calculator.rb +32 -0
  49. data/lib/singapore_cpf_calculator/year_2014/spr_2_fg.rb +36 -0
  50. data/lib/singapore_cpf_calculator/year_2014/spr_2_fg/age_50_below_contribution_calculator.rb +32 -0
  51. data/lib/singapore_cpf_calculator/year_2014/spr_2_fg/age_50_to_55_contribution_calculator.rb +32 -0
  52. data/lib/singapore_cpf_calculator/year_2014/spr_2_fg/age_55_to_60_contribution_calculator.rb +32 -0
  53. data/lib/singapore_cpf_calculator/year_2014/spr_2_fg/age_60_to_65_contribution_calculator.rb +32 -0
  54. data/lib/singapore_cpf_calculator/year_2014/spr_2_fg/age_65_up_contribution_calculator.rb +32 -0
  55. data/lib/singapore_cpf_calculator/year_2014/spr_2_gg.rb +36 -0
  56. data/lib/singapore_cpf_calculator/year_2014/spr_2_gg/age_50_below_contribution_calculator.rb +32 -0
  57. data/lib/singapore_cpf_calculator/year_2014/spr_2_gg/age_50_to_55_contribution_calculator.rb +14 -0
  58. data/lib/singapore_cpf_calculator/year_2014/spr_2_gg/age_55_to_60_contribution_calculator.rb +32 -0
  59. data/lib/singapore_cpf_calculator/year_2014/spr_2_gg/age_60_to_65_contribution_calculator.rb +32 -0
  60. data/lib/singapore_cpf_calculator/year_2014/spr_2_gg/age_65_up_contribution_calculator.rb +32 -0
  61. data/lib/singapore_cpf_calculator/year_2015.rb +38 -0
  62. data/lib/singapore_cpf_calculator/year_2015/base.rb +17 -0
  63. data/lib/singapore_cpf_calculator/year_2015/citizen_or_spr_3.rb +35 -0
  64. data/lib/singapore_cpf_calculator/year_2015/citizen_or_spr_3/age_50_below_contribution_calculator.rb +32 -0
  65. data/lib/singapore_cpf_calculator/year_2015/citizen_or_spr_3/age_50_to_55_contribution_calculator.rb +32 -0
  66. data/lib/singapore_cpf_calculator/year_2015/citizen_or_spr_3/age_55_to_60_contribution_calculator.rb +32 -0
  67. data/lib/singapore_cpf_calculator/year_2015/citizen_or_spr_3/age_60_to_65_contribution_calculator.rb +32 -0
  68. data/lib/singapore_cpf_calculator/year_2015/citizen_or_spr_3/age_65_up_contribution_calculator.rb +32 -0
  69. data/lib/singapore_cpf_calculator/year_2015/spr_1_fg.rb +37 -0
  70. data/lib/singapore_cpf_calculator/year_2015/spr_1_fg/age_50_below_contribution_calculator.rb +32 -0
  71. data/lib/singapore_cpf_calculator/year_2015/spr_1_fg/age_50_to_55_contribution_calculator.rb +32 -0
  72. data/lib/singapore_cpf_calculator/year_2015/spr_1_fg/age_55_to_60_contribution_calculator.rb +32 -0
  73. data/lib/singapore_cpf_calculator/year_2015/spr_1_fg/age_60_to_65_contribution_calculator.rb +32 -0
  74. data/lib/singapore_cpf_calculator/year_2015/spr_1_fg/age_65_up_contribution_calculator.rb +32 -0
  75. data/lib/singapore_cpf_calculator/year_2015/spr_1_gg.rb +36 -0
  76. data/lib/singapore_cpf_calculator/year_2015/spr_1_gg/age_50_below_contribution_calculator.rb +32 -0
  77. data/lib/singapore_cpf_calculator/year_2015/spr_1_gg/age_50_to_55_contribution_calculator.rb +14 -0
  78. data/lib/singapore_cpf_calculator/year_2015/spr_1_gg/age_55_to_60_contribution_calculator.rb +14 -0
  79. data/lib/singapore_cpf_calculator/year_2015/spr_1_gg/age_60_to_65_contribution_calculator.rb +32 -0
  80. data/lib/singapore_cpf_calculator/year_2015/spr_1_gg/age_65_up_contribution_calculator.rb +14 -0
  81. data/lib/singapore_cpf_calculator/year_2015/spr_2_fg.rb +36 -0
  82. data/lib/singapore_cpf_calculator/year_2015/spr_2_fg/age_50_below_contribution_calculator.rb +32 -0
  83. data/lib/singapore_cpf_calculator/year_2015/spr_2_fg/age_50_to_55_contribution_calculator.rb +32 -0
  84. data/lib/singapore_cpf_calculator/year_2015/spr_2_fg/age_55_to_60_contribution_calculator.rb +32 -0
  85. data/lib/singapore_cpf_calculator/year_2015/spr_2_fg/age_60_to_65_contribution_calculator.rb +32 -0
  86. data/lib/singapore_cpf_calculator/year_2015/spr_2_fg/age_65_up_contribution_calculator.rb +32 -0
  87. data/lib/singapore_cpf_calculator/year_2015/spr_2_gg.rb +36 -0
  88. data/lib/singapore_cpf_calculator/year_2015/spr_2_gg/age_50_below_contribution_calculator.rb +32 -0
  89. data/lib/singapore_cpf_calculator/year_2015/spr_2_gg/age_50_to_55_contribution_calculator.rb +14 -0
  90. data/lib/singapore_cpf_calculator/year_2015/spr_2_gg/age_55_to_60_contribution_calculator.rb +32 -0
  91. data/lib/singapore_cpf_calculator/year_2015/spr_2_gg/age_60_to_65_contribution_calculator.rb +32 -0
  92. data/lib/singapore_cpf_calculator/year_2015/spr_2_gg/age_65_up_contribution_calculator.rb +32 -0
  93. data/lib/singapore_cpf_calculator/year_common.rb +29 -0
  94. data/singapore_cpf_calculator.gemspec +27 -0
  95. data/spec/acceptance/company_a.csv +1365 -0
  96. data/spec/acceptance/company_a_spec.rb +36 -0
  97. data/spec/singapore_cpf_calculator/age_group_spec.rb +65 -0
  98. data/spec/singapore_cpf_calculator/spr_status_spec.rb +48 -0
  99. data/spec/singapore_cpf_calculator/year_2014/citizen_or_spr_3/age_50_below_contribution_calculator_spec.rb +68 -0
  100. data/spec/singapore_cpf_calculator/year_2014/citizen_or_spr_3/age_50_to_55_contribution_calculator_spec.rb +68 -0
  101. data/spec/singapore_cpf_calculator/year_2014/citizen_or_spr_3/age_55_to_60_contribution_calculator_spec.rb +68 -0
  102. data/spec/singapore_cpf_calculator/year_2014/citizen_or_spr_3/age_60_to_65_contribution_calculator_spec.rb +68 -0
  103. data/spec/singapore_cpf_calculator/year_2014/citizen_or_spr_3/age_65_up_contribution_calculator_spec.rb +68 -0
  104. data/spec/singapore_cpf_calculator/year_2014/citizen_or_spr_3_spec.rb +176 -0
  105. data/spec/singapore_cpf_calculator/year_2014/spr_1_fg/age_50_below_contribution_calculator_spec.rb +73 -0
  106. data/spec/singapore_cpf_calculator/year_2014/spr_1_fg/age_50_to_55_contribution_calculator_spec.rb +73 -0
  107. data/spec/singapore_cpf_calculator/year_2014/spr_1_fg/age_55_to_60_contribution_calculator_spec.rb +73 -0
  108. data/spec/singapore_cpf_calculator/year_2014/spr_1_fg/age_60_to_65_contribution_calculator_spec.rb +73 -0
  109. data/spec/singapore_cpf_calculator/year_2014/spr_1_fg/age_65_up_contribution_calculator_spec.rb +73 -0
  110. data/spec/singapore_cpf_calculator/year_2014/spr_1_fg_spec.rb +176 -0
  111. data/spec/singapore_cpf_calculator/year_2014/spr_1_gg/age_50_below_contribution_calculator_spec.rb +73 -0
  112. data/spec/singapore_cpf_calculator/year_2014/spr_1_gg/age_50_to_55_contribution_calculator_spec.rb +73 -0
  113. data/spec/singapore_cpf_calculator/year_2014/spr_1_gg/age_55_to_60_contribution_calculator_spec.rb +73 -0
  114. data/spec/singapore_cpf_calculator/year_2014/spr_1_gg/age_60_to_65_contribution_calculator_spec.rb +73 -0
  115. data/spec/singapore_cpf_calculator/year_2014/spr_1_gg/age_65_up_contribution_calculator_spec.rb +73 -0
  116. data/spec/singapore_cpf_calculator/year_2014/spr_1_gg_spec.rb +176 -0
  117. data/spec/singapore_cpf_calculator/year_2014/spr_2_fg/age_50_below_contribution_calculator_spec.rb +73 -0
  118. data/spec/singapore_cpf_calculator/year_2014/spr_2_fg/age_50_to_55_contribution_calculator_spec.rb +73 -0
  119. data/spec/singapore_cpf_calculator/year_2014/spr_2_fg/age_55_to_60_contribution_calculator_spec.rb +73 -0
  120. data/spec/singapore_cpf_calculator/year_2014/spr_2_fg/age_60_to_65_contribution_calculator_spec.rb +73 -0
  121. data/spec/singapore_cpf_calculator/year_2014/spr_2_fg/age_65_up_contribution_calculator_spec.rb +73 -0
  122. data/spec/singapore_cpf_calculator/year_2014/spr_2_fg_spec.rb +176 -0
  123. data/spec/singapore_cpf_calculator/year_2014/spr_2_gg/age_50_below_contribution_calculator_spec.rb +73 -0
  124. data/spec/singapore_cpf_calculator/year_2014/spr_2_gg/age_50_to_55_contribution_calculator_spec.rb +73 -0
  125. data/spec/singapore_cpf_calculator/year_2014/spr_2_gg/age_55_to_60_contribution_calculator_spec.rb +73 -0
  126. data/spec/singapore_cpf_calculator/year_2014/spr_2_gg/age_60_to_65_contribution_calculator_spec.rb +73 -0
  127. data/spec/singapore_cpf_calculator/year_2014/spr_2_gg/age_65_up_contribution_calculator_spec.rb +73 -0
  128. data/spec/singapore_cpf_calculator/year_2014/spr_2_gg_spec.rb +176 -0
  129. data/spec/singapore_cpf_calculator/year_2014_spec.rb +183 -0
  130. data/spec/singapore_cpf_calculator/year_2015/citizen_or_spr_3/age_50_below_contribution_calculator_spec.rb +63 -0
  131. data/spec/singapore_cpf_calculator/year_2015/citizen_or_spr_3/age_50_to_55_contribution_calculator_spec.rb +63 -0
  132. data/spec/singapore_cpf_calculator/year_2015/citizen_or_spr_3/age_55_to_60_contribution_calculator_spec.rb +63 -0
  133. data/spec/singapore_cpf_calculator/year_2015/citizen_or_spr_3/age_60_to_65_contribution_calculator_spec.rb +63 -0
  134. data/spec/singapore_cpf_calculator/year_2015/citizen_or_spr_3/age_65_up_contribution_calculator_spec.rb +63 -0
  135. data/spec/singapore_cpf_calculator/year_2015/citizen_or_spr_3_spec.rb +176 -0
  136. data/spec/singapore_cpf_calculator/year_2015/spr_1_fg/age_50_below_contribution_calculator_spec.rb +63 -0
  137. data/spec/singapore_cpf_calculator/year_2015/spr_1_fg/age_50_to_55_contribution_calculator_spec.rb +63 -0
  138. data/spec/singapore_cpf_calculator/year_2015/spr_1_fg/age_55_to_60_contribution_calculator_spec.rb +63 -0
  139. data/spec/singapore_cpf_calculator/year_2015/spr_1_fg/age_60_to_65_contribution_calculator_spec.rb +63 -0
  140. data/spec/singapore_cpf_calculator/year_2015/spr_1_fg/age_65_up_contribution_calculator_spec.rb +63 -0
  141. data/spec/singapore_cpf_calculator/year_2015/spr_1_fg_spec.rb +176 -0
  142. data/spec/singapore_cpf_calculator/year_2015/spr_1_gg/age_50_below_contribution_calculator_spec.rb +63 -0
  143. data/spec/singapore_cpf_calculator/year_2015/spr_1_gg/age_50_to_55_contribution_calculator_spec.rb +63 -0
  144. data/spec/singapore_cpf_calculator/year_2015/spr_1_gg/age_55_to_60_contribution_calculator_spec.rb +63 -0
  145. data/spec/singapore_cpf_calculator/year_2015/spr_1_gg/age_60_to_65_contribution_calculator_spec.rb +63 -0
  146. data/spec/singapore_cpf_calculator/year_2015/spr_1_gg/age_65_up_contribution_calculator_spec.rb +63 -0
  147. data/spec/singapore_cpf_calculator/year_2015/spr_1_gg_spec.rb +176 -0
  148. data/spec/singapore_cpf_calculator/year_2015/spr_2_fg/age_50_below_contribution_calculator_spec.rb +63 -0
  149. data/spec/singapore_cpf_calculator/year_2015/spr_2_fg/age_50_to_55_contribution_calculator_spec.rb +63 -0
  150. data/spec/singapore_cpf_calculator/year_2015/spr_2_fg/age_55_to_60_contribution_calculator_spec.rb +63 -0
  151. data/spec/singapore_cpf_calculator/year_2015/spr_2_fg/age_60_to_65_contribution_calculator_spec.rb +63 -0
  152. data/spec/singapore_cpf_calculator/year_2015/spr_2_fg/age_65_up_contribution_calculator_spec.rb +63 -0
  153. data/spec/singapore_cpf_calculator/year_2015/spr_2_fg_spec.rb +176 -0
  154. data/spec/singapore_cpf_calculator/year_2015/spr_2_gg/age_50_below_contribution_calculator_spec.rb +63 -0
  155. data/spec/singapore_cpf_calculator/year_2015/spr_2_gg/age_50_to_55_contribution_calculator_spec.rb +63 -0
  156. data/spec/singapore_cpf_calculator/year_2015/spr_2_gg/age_55_to_60_contribution_calculator_spec.rb +63 -0
  157. data/spec/singapore_cpf_calculator/year_2015/spr_2_gg/age_60_to_65_contribution_calculator_spec.rb +63 -0
  158. data/spec/singapore_cpf_calculator/year_2015/spr_2_gg/age_65_up_contribution_calculator_spec.rb +63 -0
  159. data/spec/singapore_cpf_calculator/year_2015/spr_2_gg_spec.rb +176 -0
  160. data/spec/singapore_cpf_calculator/year_2015_spec.rb +187 -0
  161. data/spec/singapore_cpf_calculator_spec.rb +48 -0
  162. data/spec/spec_helper.rb +115 -0
  163. metadata +344 -0
@@ -0,0 +1,32 @@
1
+ module SingaporeCPFCalculator
2
+ module Year2014
3
+ module SPR1GG
4
+
5
+ # Payment calculator for Singapore's Central Provident Fund for employee's age 50 and below.
6
+ class Age50BelowContributionCalculator < Year2014::Base
7
+
8
+ extend Requirements::Group50YearsAndBelow
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 adjustment_rate
21
+ "0.15"
22
+ end
23
+
24
+ def ec_rate
25
+ "0.05"
26
+ end
27
+
28
+ end
29
+
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,14 @@
1
+ module SingaporeCPFCalculator
2
+ module Year2014
3
+ module SPR1GG
4
+
5
+ # Payment calculator for Singapore's Central Provident Fund for employee's age 50 to 55.
6
+ class Age50To55ContributionCalculator < Age50BelowContributionCalculator
7
+
8
+ extend Requirements::GroupAbove50To55Years
9
+
10
+ end
11
+
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ module SingaporeCPFCalculator
2
+ module Year2014
3
+ module SPR1GG
4
+
5
+ # Payment calculator for Singapore's Central Provident Fund for employee's age 55 to 60.
6
+ class Age55To60ContributionCalculator < Age50BelowContributionCalculator
7
+
8
+ extend Requirements::GroupAbove55To60Years
9
+
10
+ end
11
+
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,32 @@
1
+ module SingaporeCPFCalculator
2
+ module Year2014
3
+ module SPR1GG
4
+
5
+ # Payment calculator for Singapore's Central Provident Fund for employee's age 60 to 65.
6
+ class Age60To65ContributionCalculator < Year2014::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 adjustment_rate
21
+ "0.15"
22
+ end
23
+
24
+ def ec_rate
25
+ "0.05"
26
+ end
27
+
28
+ end
29
+
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,32 @@
1
+ module SingaporeCPFCalculator
2
+ module Year2014
3
+ module SPR1GG
4
+
5
+ # Payment calculator for Singapore's Central Provident Fund for employee's age 65 and above.
6
+ class Age65UpContributionCalculator < Year2014::Base
7
+
8
+ extend Requirements::GroupAbove65Years
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 adjustment_rate
21
+ "0.15"
22
+ end
23
+
24
+ def ec_rate
25
+ "0.05"
26
+ end
27
+
28
+ end
29
+
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,36 @@
1
+ require_relative "spr_2_fg/age_50_below_contribution_calculator"
2
+ require_relative "spr_2_fg/age_50_to_55_contribution_calculator"
3
+ require_relative "spr_2_fg/age_55_to_60_contribution_calculator"
4
+ require_relative "spr_2_fg/age_60_to_65_contribution_calculator"
5
+ require_relative "spr_2_fg/age_65_up_contribution_calculator"
6
+
7
+ module SingaporeCPFCalculator
8
+ module Year2014
9
+
10
+ # For Singapore Permanent Resident (SPR) on their second year with graduated (G, partial)
11
+ # employee contribution and full (F) employer contribution
12
+ module SPR2FG
13
+
14
+ extend ResidencyModuleCommon
15
+ extend SPR2FGCommon
16
+
17
+ class << self
18
+
19
+ private
20
+
21
+ def calculators
22
+ [
23
+ Age50BelowContributionCalculator,
24
+ Age50To55ContributionCalculator,
25
+ Age55To60ContributionCalculator,
26
+ Age60To65ContributionCalculator,
27
+ Age65UpContributionCalculator,
28
+ ]
29
+ end
30
+
31
+ end
32
+
33
+ end
34
+
35
+ end
36
+ end
@@ -0,0 +1,32 @@
1
+ module SingaporeCPFCalculator
2
+ module Year2014
3
+ module SPR2FG
4
+
5
+ # Payment calculator for Singapore's Central Provident Fund for employee's age 50 and below.
6
+ class Age50BelowContributionCalculator < Year2014::Base
7
+
8
+ extend Requirements::Group50YearsAndBelow
9
+
10
+ private
11
+
12
+ def tc_rate_1
13
+ "0.16"
14
+ end
15
+
16
+ def tc_rate_2
17
+ "0.31"
18
+ end
19
+
20
+ def adjustment_rate
21
+ "0.45"
22
+ end
23
+
24
+ def ec_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 Year2014
3
+ module SPR2FG
4
+
5
+ # Payment calculator for Singapore's Central Provident Fund for employee's age 50 to 55.
6
+ class Age50To55ContributionCalculator < Year2014::Base
7
+
8
+ extend Requirements::GroupAbove50To55Years
9
+
10
+ private
11
+
12
+ def tc_rate_1
13
+ "0.14"
14
+ end
15
+
16
+ def tc_rate_2
17
+ "0.29"
18
+ end
19
+
20
+ def adjustment_rate
21
+ "0.45"
22
+ end
23
+
24
+ def ec_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 Year2014
3
+ module SPR2FG
4
+
5
+ # Payment calculator for Singapore's Central Provident Fund for employee's age 55 to 60.
6
+ class Age55To60ContributionCalculator < Year2014::Base
7
+
8
+ extend Requirements::GroupAbove55To60Years
9
+
10
+ private
11
+
12
+ def tc_rate_1
13
+ "0.105"
14
+ end
15
+
16
+ def tc_rate_2
17
+ "0.23"
18
+ end
19
+
20
+ def adjustment_rate
21
+ "0.375"
22
+ end
23
+
24
+ def ec_rate
25
+ "0.125"
26
+ end
27
+
28
+ end
29
+
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,32 @@
1
+ module SingaporeCPFCalculator
2
+ module Year2014
3
+ module SPR2FG
4
+
5
+ # Payment calculator for Singapore's Central Provident Fund for employee's age 60 to 65.
6
+ class Age60To65ContributionCalculator < Year2014::Base
7
+
8
+ extend Requirements::GroupAbove60To65Years
9
+
10
+ private
11
+
12
+ def tc_rate_1
13
+ "0.07"
14
+ end
15
+
16
+ def tc_rate_2
17
+ "0.145"
18
+ end
19
+
20
+ def adjustment_rate
21
+ "0.225"
22
+ end
23
+
24
+ def ec_rate
25
+ "0.075"
26
+ end
27
+
28
+ end
29
+
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,32 @@
1
+ module SingaporeCPFCalculator
2
+ module Year2014
3
+ module SPR2FG
4
+
5
+ # Payment calculator for Singapore's Central Provident Fund for employee's age 65 and above.
6
+ class Age65UpContributionCalculator < Year2014::Base
7
+
8
+ extend Requirements::GroupAbove65Years
9
+
10
+ private
11
+
12
+ def tc_rate_1
13
+ "0.065"
14
+ end
15
+
16
+ def tc_rate_2
17
+ "0.115"
18
+ end
19
+
20
+ def adjustment_rate
21
+ "0.15"
22
+ end
23
+
24
+ def ec_rate
25
+ "0.05"
26
+ end
27
+
28
+ end
29
+
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,36 @@
1
+ require_relative "spr_2_gg/age_50_below_contribution_calculator"
2
+ require_relative "spr_2_gg/age_50_to_55_contribution_calculator"
3
+ require_relative "spr_2_gg/age_55_to_60_contribution_calculator"
4
+ require_relative "spr_2_gg/age_60_to_65_contribution_calculator"
5
+ require_relative "spr_2_gg/age_65_up_contribution_calculator"
6
+
7
+ module SingaporeCPFCalculator
8
+ module Year2014
9
+
10
+ # For Singapore Permanent Resident (SPR) on their first year with graduated (G, partial)
11
+ # employer contribution and graduated (G, partial) employee contribution
12
+ module SPR2GG
13
+
14
+ extend ResidencyModuleCommon
15
+ extend SPR2GGCommon
16
+
17
+ class << self
18
+
19
+ private
20
+
21
+ def calculators
22
+ [
23
+ Age50BelowContributionCalculator,
24
+ Age50To55ContributionCalculator,
25
+ Age55To60ContributionCalculator,
26
+ Age60To65ContributionCalculator,
27
+ Age65UpContributionCalculator,
28
+ ]
29
+ end
30
+
31
+ end
32
+
33
+ end
34
+
35
+ end
36
+ end
@@ -0,0 +1,32 @@
1
+ module SingaporeCPFCalculator
2
+ module Year2014
3
+ module SPR2GG
4
+
5
+ # Payment calculator for Singapore's Central Provident Fund for employee's age 50 and below.
6
+ class Age50BelowContributionCalculator < Year2014::Base
7
+
8
+ extend Requirements::Group50YearsAndBelow
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 adjustment_rate
21
+ "0.45"
22
+ end
23
+
24
+ def ec_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 Year2014
3
+ module SPR2GG
4
+
5
+ # Payment calculator for Singapore's Central Provident Fund for employee's age 50 to 55.
6
+ class Age50To55ContributionCalculator < Age50BelowContributionCalculator
7
+
8
+ extend Requirements::GroupAbove50To55Years
9
+
10
+ end
11
+
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,32 @@
1
+ module SingaporeCPFCalculator
2
+ module Year2014
3
+ module SPR2GG
4
+
5
+ # Payment calculator for Singapore's Central Provident Fund for employee's age 55 to 60.
6
+ class Age55To60ContributionCalculator < Year2014::Base
7
+
8
+ extend Requirements::GroupAbove55To60Years
9
+
10
+ private
11
+
12
+ def tc_rate_1
13
+ "0.06"
14
+ end
15
+
16
+ def tc_rate_2
17
+ "0.185"
18
+ end
19
+
20
+ def adjustment_rate
21
+ "0.375"
22
+ end
23
+
24
+ def ec_rate
25
+ "0.125"
26
+ end
27
+
28
+ end
29
+
30
+ end
31
+ end
32
+ end