train-tax-calculator 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/train/tax/calculator/version.rb +1 -1
- data/lib/train/tax/calculator.rb +16 -10
- data/train-tax-calculator.gemspec +1 -1
- metadata +2 -3
- data/train-tax-calculator-1.0.0.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a8224a7ca2446e1de50cfb235832791681bea69
|
4
|
+
data.tar.gz: 608f725e4d94a3b7cb22fa64a974b857863141fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8dfc35abafb0705391b5f87672a6af12c0d8da71ae32eba0a52868b7d52e00f6e68ce2933d20161f2ac297ce77f6d762393280629354b1c68bcea4ab13e33f2
|
7
|
+
data.tar.gz: 721b76230f9a7bc4214818522cc2de0be2416608ba45042ebd36c09d3d9414f7c30a2af3781fd7a86d7139176cca89af34678870e325891c2135de1e5f926bf4
|
data/lib/train/tax/calculator.rb
CHANGED
@@ -44,26 +44,32 @@ module Train
|
|
44
44
|
|
45
45
|
private
|
46
46
|
|
47
|
+
HIGHEST_BRACKET = 666_667.00
|
48
|
+
HIGHER_BRACKET = 166_667.00
|
49
|
+
HIGH_BRACKET = 66_667.00
|
50
|
+
LOW_BRACKET = 33_333.00
|
51
|
+
LOWEST_BRACKET = 20_833.00
|
52
|
+
|
47
53
|
def self.compute_withholding_for(income)
|
48
|
-
if income >=
|
54
|
+
if income >= HIGHEST_BRACKET
|
49
55
|
|
50
|
-
200_833.33 + ((income -
|
56
|
+
200_833.33 + ((income - HIGHEST_BRACKET) * 0.35)
|
51
57
|
|
52
|
-
elsif income >=
|
58
|
+
elsif income >= HIGHER_BRACKET
|
53
59
|
|
54
|
-
40_833.33 + ((income -
|
60
|
+
40_833.33 + ((income - HIGHER_BRACKET) * 0.32)
|
55
61
|
|
56
|
-
elsif income >=
|
62
|
+
elsif income >= HIGH_BRACKET
|
57
63
|
|
58
|
-
10_833.33 + ((income -
|
64
|
+
10_833.33 + ((income - HIGH_BRACKET) * 0.30)
|
59
65
|
|
60
|
-
elsif income >=
|
66
|
+
elsif income >= LOW_BRACKET
|
61
67
|
|
62
|
-
2_500.00 + ((income -
|
68
|
+
2_500.00 + ((income - LOW_BRACKET) * 0.25)
|
63
69
|
|
64
|
-
elsif income >=
|
70
|
+
elsif income >= LOWEST_BRACKET
|
65
71
|
|
66
|
-
0.00 + ((income -
|
72
|
+
0.00 + ((income - LOWEST_BRACKET) * 0.20)
|
67
73
|
|
68
74
|
else
|
69
75
|
|
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["markchav3z@gmail.com"]
|
11
11
|
|
12
12
|
spec.summary = %q{TRAIN Tax Calculator for PH 2018}
|
13
|
-
spec.description = %q{Computes withholding tax}
|
13
|
+
spec.description = %q{Computes withholding tax and net income}
|
14
14
|
spec.homepage = "https://markjoelchavez.com"
|
15
15
|
|
16
16
|
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: train-tax-calculator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Chavez
|
@@ -52,7 +52,7 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.0'
|
55
|
-
description: Computes withholding tax
|
55
|
+
description: Computes withholding tax and net income
|
56
56
|
email:
|
57
57
|
- markchav3z@gmail.com
|
58
58
|
executables: []
|
@@ -74,7 +74,6 @@ files:
|
|
74
74
|
- lib/train/tax/calculator/philhealth.rb
|
75
75
|
- lib/train/tax/calculator/sss.rb
|
76
76
|
- lib/train/tax/calculator/version.rb
|
77
|
-
- train-tax-calculator-1.0.0.gem
|
78
77
|
- train-tax-calculator.gemspec
|
79
78
|
homepage: https://markjoelchavez.com
|
80
79
|
licenses: []
|
Binary file
|