singapore_cpf_calculator 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +22 -0
- data/.rspec +2 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +97 -0
- data/Rakefile +2 -0
- data/circle.yml +3 -0
- data/lib/singapore_cpf_calculator.rb +125 -0
- data/lib/singapore_cpf_calculator/age_group.rb +71 -0
- data/lib/singapore_cpf_calculator/base_calculator.rb +114 -0
- data/lib/singapore_cpf_calculator/before_spr.rb +36 -0
- data/lib/singapore_cpf_calculator/citizen_or_spr_3_common.rb +27 -0
- data/lib/singapore_cpf_calculator/cpf_contribution.rb +28 -0
- data/lib/singapore_cpf_calculator/null_contribution_calculator.rb +17 -0
- data/lib/singapore_cpf_calculator/requirements.rb +10 -0
- data/lib/singapore_cpf_calculator/requirements/group_50_years_and_below.rb +13 -0
- data/lib/singapore_cpf_calculator/requirements/group_above_50_to_55_years.rb +13 -0
- data/lib/singapore_cpf_calculator/requirements/group_above_55_to_60_years.rb +13 -0
- data/lib/singapore_cpf_calculator/requirements/group_above_60_to_65_years.rb +13 -0
- data/lib/singapore_cpf_calculator/requirements/group_above_65_years.rb +13 -0
- data/lib/singapore_cpf_calculator/residency_module_common.rb +12 -0
- data/lib/singapore_cpf_calculator/spr_1_fg_common.rb +26 -0
- data/lib/singapore_cpf_calculator/spr_1_gg_common.rb +26 -0
- data/lib/singapore_cpf_calculator/spr_2_fg_common.rb +26 -0
- data/lib/singapore_cpf_calculator/spr_2_gg_common.rb +26 -0
- data/lib/singapore_cpf_calculator/spr_status.rb +52 -0
- data/lib/singapore_cpf_calculator/version.rb +3 -0
- data/lib/singapore_cpf_calculator/year_2014.rb +37 -0
- data/lib/singapore_cpf_calculator/year_2014/base.rb +17 -0
- data/lib/singapore_cpf_calculator/year_2014/citizen_or_spr_3.rb +35 -0
- data/lib/singapore_cpf_calculator/year_2014/citizen_or_spr_3/age_50_below_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2014/citizen_or_spr_3/age_50_to_55_contribution_calculator.rb +33 -0
- data/lib/singapore_cpf_calculator/year_2014/citizen_or_spr_3/age_55_to_60_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2014/citizen_or_spr_3/age_60_to_65_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2014/citizen_or_spr_3/age_65_up_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2014/spr_1_fg.rb +36 -0
- data/lib/singapore_cpf_calculator/year_2014/spr_1_fg/age_50_below_contribution_calculator.rb +33 -0
- data/lib/singapore_cpf_calculator/year_2014/spr_1_fg/age_50_to_55_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2014/spr_1_fg/age_55_to_60_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2014/spr_1_fg/age_60_to_65_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2014/spr_1_fg/age_65_up_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2014/spr_1_gg.rb +36 -0
- data/lib/singapore_cpf_calculator/year_2014/spr_1_gg/age_50_below_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2014/spr_1_gg/age_50_to_55_contribution_calculator.rb +14 -0
- data/lib/singapore_cpf_calculator/year_2014/spr_1_gg/age_55_to_60_contribution_calculator.rb +14 -0
- data/lib/singapore_cpf_calculator/year_2014/spr_1_gg/age_60_to_65_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2014/spr_1_gg/age_65_up_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2014/spr_2_fg.rb +36 -0
- data/lib/singapore_cpf_calculator/year_2014/spr_2_fg/age_50_below_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2014/spr_2_fg/age_50_to_55_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2014/spr_2_fg/age_55_to_60_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2014/spr_2_fg/age_60_to_65_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2014/spr_2_fg/age_65_up_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2014/spr_2_gg.rb +36 -0
- data/lib/singapore_cpf_calculator/year_2014/spr_2_gg/age_50_below_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2014/spr_2_gg/age_50_to_55_contribution_calculator.rb +14 -0
- data/lib/singapore_cpf_calculator/year_2014/spr_2_gg/age_55_to_60_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2014/spr_2_gg/age_60_to_65_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2014/spr_2_gg/age_65_up_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2015.rb +38 -0
- data/lib/singapore_cpf_calculator/year_2015/base.rb +17 -0
- data/lib/singapore_cpf_calculator/year_2015/citizen_or_spr_3.rb +35 -0
- data/lib/singapore_cpf_calculator/year_2015/citizen_or_spr_3/age_50_below_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2015/citizen_or_spr_3/age_50_to_55_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2015/citizen_or_spr_3/age_55_to_60_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2015/citizen_or_spr_3/age_60_to_65_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2015/citizen_or_spr_3/age_65_up_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2015/spr_1_fg.rb +37 -0
- data/lib/singapore_cpf_calculator/year_2015/spr_1_fg/age_50_below_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2015/spr_1_fg/age_50_to_55_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2015/spr_1_fg/age_55_to_60_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2015/spr_1_fg/age_60_to_65_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2015/spr_1_fg/age_65_up_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2015/spr_1_gg.rb +36 -0
- data/lib/singapore_cpf_calculator/year_2015/spr_1_gg/age_50_below_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2015/spr_1_gg/age_50_to_55_contribution_calculator.rb +14 -0
- data/lib/singapore_cpf_calculator/year_2015/spr_1_gg/age_55_to_60_contribution_calculator.rb +14 -0
- data/lib/singapore_cpf_calculator/year_2015/spr_1_gg/age_60_to_65_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2015/spr_1_gg/age_65_up_contribution_calculator.rb +14 -0
- data/lib/singapore_cpf_calculator/year_2015/spr_2_fg.rb +36 -0
- data/lib/singapore_cpf_calculator/year_2015/spr_2_fg/age_50_below_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2015/spr_2_fg/age_50_to_55_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2015/spr_2_fg/age_55_to_60_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2015/spr_2_fg/age_60_to_65_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2015/spr_2_fg/age_65_up_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2015/spr_2_gg.rb +36 -0
- data/lib/singapore_cpf_calculator/year_2015/spr_2_gg/age_50_below_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2015/spr_2_gg/age_50_to_55_contribution_calculator.rb +14 -0
- data/lib/singapore_cpf_calculator/year_2015/spr_2_gg/age_55_to_60_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2015/spr_2_gg/age_60_to_65_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_2015/spr_2_gg/age_65_up_contribution_calculator.rb +32 -0
- data/lib/singapore_cpf_calculator/year_common.rb +29 -0
- data/singapore_cpf_calculator.gemspec +27 -0
- data/spec/acceptance/company_a.csv +1365 -0
- data/spec/acceptance/company_a_spec.rb +36 -0
- data/spec/singapore_cpf_calculator/age_group_spec.rb +65 -0
- data/spec/singapore_cpf_calculator/spr_status_spec.rb +48 -0
- data/spec/singapore_cpf_calculator/year_2014/citizen_or_spr_3/age_50_below_contribution_calculator_spec.rb +68 -0
- data/spec/singapore_cpf_calculator/year_2014/citizen_or_spr_3/age_50_to_55_contribution_calculator_spec.rb +68 -0
- data/spec/singapore_cpf_calculator/year_2014/citizen_or_spr_3/age_55_to_60_contribution_calculator_spec.rb +68 -0
- data/spec/singapore_cpf_calculator/year_2014/citizen_or_spr_3/age_60_to_65_contribution_calculator_spec.rb +68 -0
- data/spec/singapore_cpf_calculator/year_2014/citizen_or_spr_3/age_65_up_contribution_calculator_spec.rb +68 -0
- data/spec/singapore_cpf_calculator/year_2014/citizen_or_spr_3_spec.rb +176 -0
- data/spec/singapore_cpf_calculator/year_2014/spr_1_fg/age_50_below_contribution_calculator_spec.rb +73 -0
- data/spec/singapore_cpf_calculator/year_2014/spr_1_fg/age_50_to_55_contribution_calculator_spec.rb +73 -0
- data/spec/singapore_cpf_calculator/year_2014/spr_1_fg/age_55_to_60_contribution_calculator_spec.rb +73 -0
- data/spec/singapore_cpf_calculator/year_2014/spr_1_fg/age_60_to_65_contribution_calculator_spec.rb +73 -0
- data/spec/singapore_cpf_calculator/year_2014/spr_1_fg/age_65_up_contribution_calculator_spec.rb +73 -0
- data/spec/singapore_cpf_calculator/year_2014/spr_1_fg_spec.rb +176 -0
- data/spec/singapore_cpf_calculator/year_2014/spr_1_gg/age_50_below_contribution_calculator_spec.rb +73 -0
- data/spec/singapore_cpf_calculator/year_2014/spr_1_gg/age_50_to_55_contribution_calculator_spec.rb +73 -0
- data/spec/singapore_cpf_calculator/year_2014/spr_1_gg/age_55_to_60_contribution_calculator_spec.rb +73 -0
- data/spec/singapore_cpf_calculator/year_2014/spr_1_gg/age_60_to_65_contribution_calculator_spec.rb +73 -0
- data/spec/singapore_cpf_calculator/year_2014/spr_1_gg/age_65_up_contribution_calculator_spec.rb +73 -0
- data/spec/singapore_cpf_calculator/year_2014/spr_1_gg_spec.rb +176 -0
- data/spec/singapore_cpf_calculator/year_2014/spr_2_fg/age_50_below_contribution_calculator_spec.rb +73 -0
- data/spec/singapore_cpf_calculator/year_2014/spr_2_fg/age_50_to_55_contribution_calculator_spec.rb +73 -0
- data/spec/singapore_cpf_calculator/year_2014/spr_2_fg/age_55_to_60_contribution_calculator_spec.rb +73 -0
- data/spec/singapore_cpf_calculator/year_2014/spr_2_fg/age_60_to_65_contribution_calculator_spec.rb +73 -0
- data/spec/singapore_cpf_calculator/year_2014/spr_2_fg/age_65_up_contribution_calculator_spec.rb +73 -0
- data/spec/singapore_cpf_calculator/year_2014/spr_2_fg_spec.rb +176 -0
- data/spec/singapore_cpf_calculator/year_2014/spr_2_gg/age_50_below_contribution_calculator_spec.rb +73 -0
- data/spec/singapore_cpf_calculator/year_2014/spr_2_gg/age_50_to_55_contribution_calculator_spec.rb +73 -0
- data/spec/singapore_cpf_calculator/year_2014/spr_2_gg/age_55_to_60_contribution_calculator_spec.rb +73 -0
- data/spec/singapore_cpf_calculator/year_2014/spr_2_gg/age_60_to_65_contribution_calculator_spec.rb +73 -0
- data/spec/singapore_cpf_calculator/year_2014/spr_2_gg/age_65_up_contribution_calculator_spec.rb +73 -0
- data/spec/singapore_cpf_calculator/year_2014/spr_2_gg_spec.rb +176 -0
- data/spec/singapore_cpf_calculator/year_2014_spec.rb +183 -0
- data/spec/singapore_cpf_calculator/year_2015/citizen_or_spr_3/age_50_below_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2015/citizen_or_spr_3/age_50_to_55_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2015/citizen_or_spr_3/age_55_to_60_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2015/citizen_or_spr_3/age_60_to_65_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2015/citizen_or_spr_3/age_65_up_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2015/citizen_or_spr_3_spec.rb +176 -0
- data/spec/singapore_cpf_calculator/year_2015/spr_1_fg/age_50_below_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2015/spr_1_fg/age_50_to_55_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2015/spr_1_fg/age_55_to_60_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2015/spr_1_fg/age_60_to_65_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2015/spr_1_fg/age_65_up_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2015/spr_1_fg_spec.rb +176 -0
- data/spec/singapore_cpf_calculator/year_2015/spr_1_gg/age_50_below_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2015/spr_1_gg/age_50_to_55_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2015/spr_1_gg/age_55_to_60_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2015/spr_1_gg/age_60_to_65_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2015/spr_1_gg/age_65_up_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2015/spr_1_gg_spec.rb +176 -0
- data/spec/singapore_cpf_calculator/year_2015/spr_2_fg/age_50_below_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2015/spr_2_fg/age_50_to_55_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2015/spr_2_fg/age_55_to_60_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2015/spr_2_fg/age_60_to_65_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2015/spr_2_fg/age_65_up_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2015/spr_2_fg_spec.rb +176 -0
- data/spec/singapore_cpf_calculator/year_2015/spr_2_gg/age_50_below_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2015/spr_2_gg/age_50_to_55_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2015/spr_2_gg/age_55_to_60_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2015/spr_2_gg/age_60_to_65_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2015/spr_2_gg/age_65_up_contribution_calculator_spec.rb +63 -0
- data/spec/singapore_cpf_calculator/year_2015/spr_2_gg_spec.rb +176 -0
- data/spec/singapore_cpf_calculator/year_2015_spec.rb +187 -0
- data/spec/singapore_cpf_calculator_spec.rb +48 -0
- data/spec/spec_helper.rb +115 -0
- metadata +344 -0
@@ -0,0 +1,35 @@
|
|
1
|
+
require_relative "citizen_or_spr_3/age_50_below_contribution_calculator"
|
2
|
+
require_relative "citizen_or_spr_3/age_50_to_55_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 Year2014
|
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
|
+
Age50BelowContributionCalculator,
|
23
|
+
Age50To55ContributionCalculator,
|
24
|
+
Age55To60ContributionCalculator,
|
25
|
+
Age60To65ContributionCalculator,
|
26
|
+
Age65UpContributionCalculator,
|
27
|
+
]
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
end
|
data/lib/singapore_cpf_calculator/year_2014/citizen_or_spr_3/age_50_below_contribution_calculator.rb
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
module SingaporeCPFCalculator
|
2
|
+
module Year2014
|
3
|
+
module CitizenOrSPR3
|
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.36"
|
18
|
+
end
|
19
|
+
|
20
|
+
def adjustment_rate
|
21
|
+
"0.6"
|
22
|
+
end
|
23
|
+
|
24
|
+
def ec_rate
|
25
|
+
"0.20"
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/lib/singapore_cpf_calculator/year_2014/citizen_or_spr_3/age_50_to_55_contribution_calculator.rb
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
module SingaporeCPFCalculator
|
2
|
+
module Year2014
|
3
|
+
module CitizenOrSPR3
|
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.325"
|
18
|
+
end
|
19
|
+
|
20
|
+
def adjustment_rate
|
21
|
+
"0.555"
|
22
|
+
end
|
23
|
+
|
24
|
+
def ec_rate
|
25
|
+
"0.185"
|
26
|
+
end
|
27
|
+
|
28
|
+
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
data/lib/singapore_cpf_calculator/year_2014/citizen_or_spr_3/age_55_to_60_contribution_calculator.rb
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
module SingaporeCPFCalculator
|
2
|
+
module Year2014
|
3
|
+
module CitizenOrSPR3
|
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.235"
|
18
|
+
end
|
19
|
+
|
20
|
+
def adjustment_rate
|
21
|
+
"0.39"
|
22
|
+
end
|
23
|
+
|
24
|
+
def ec_rate
|
25
|
+
"0.13"
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/lib/singapore_cpf_calculator/year_2014/citizen_or_spr_3/age_60_to_65_contribution_calculator.rb
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
module SingaporeCPFCalculator
|
2
|
+
module Year2014
|
3
|
+
module CitizenOrSPR3
|
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
|
data/lib/singapore_cpf_calculator/year_2014/citizen_or_spr_3/age_65_up_contribution_calculator.rb
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
module SingaporeCPFCalculator
|
2
|
+
module Year2014
|
3
|
+
module CitizenOrSPR3
|
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_1_fg/age_50_below_contribution_calculator"
|
2
|
+
require_relative "spr_1_fg/age_50_to_55_contribution_calculator"
|
3
|
+
require_relative "spr_1_fg/age_55_to_60_contribution_calculator"
|
4
|
+
require_relative "spr_1_fg/age_60_to_65_contribution_calculator"
|
5
|
+
require_relative "spr_1_fg/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
|
+
# employee contribution and full (F) employer contribution
|
12
|
+
module SPR1FG
|
13
|
+
|
14
|
+
extend ResidencyModuleCommon
|
15
|
+
extend SPR1FGCommon
|
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,33 @@
|
|
1
|
+
module SingaporeCPFCalculator
|
2
|
+
module Year2014
|
3
|
+
module SPR1FG
|
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.21"
|
18
|
+
end
|
19
|
+
|
20
|
+
def adjustment_rate
|
21
|
+
"0.15"
|
22
|
+
end
|
23
|
+
|
24
|
+
def ec_rate
|
25
|
+
"0.05"
|
26
|
+
end
|
27
|
+
|
28
|
+
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module SingaporeCPFCalculator
|
2
|
+
module Year2014
|
3
|
+
module SPR1FG
|
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
|
+
private
|
11
|
+
|
12
|
+
def tc_rate_1
|
13
|
+
"0.14"
|
14
|
+
end
|
15
|
+
|
16
|
+
def tc_rate_2
|
17
|
+
"0.19"
|
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 SPR1FG
|
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.155"
|
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 SPR1FG
|
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.12"
|
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 SPR1FG
|
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_1_gg/age_50_below_contribution_calculator"
|
2
|
+
require_relative "spr_1_gg/age_50_to_55_contribution_calculator"
|
3
|
+
require_relative "spr_1_gg/age_55_to_60_contribution_calculator"
|
4
|
+
require_relative "spr_1_gg/age_60_to_65_contribution_calculator"
|
5
|
+
require_relative "spr_1_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 SPR1GG
|
13
|
+
|
14
|
+
extend ResidencyModuleCommon
|
15
|
+
extend SPR1GGCommon
|
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
|