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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a99645469acca17aa9b47092ded7c4c1b8f671b7
4
- data.tar.gz: e76caff248fc86acd6f1838453f498b54c4ec8d8
3
+ metadata.gz: 4a8224a7ca2446e1de50cfb235832791681bea69
4
+ data.tar.gz: 608f725e4d94a3b7cb22fa64a974b857863141fe
5
5
  SHA512:
6
- metadata.gz: c9b2f62717b2e700b7954cad69fd1561d6b3808d6d2294e6621e23be2bf89dab4e3b653761e96072668d026a3b804846dd16d22706b62562ec1140b1b594d7d3
7
- data.tar.gz: 7a745f9940a81427f6fdd053bd2de9817b39f0d6a6315197d63a17b534516d01212715077e5e4680ad99b8c71796efe90f29612238205fc723075f2e9093cb98
6
+ metadata.gz: a8dfc35abafb0705391b5f87672a6af12c0d8da71ae32eba0a52868b7d52e00f6e68ce2933d20161f2ac297ce77f6d762393280629354b1c68bcea4ab13e33f2
7
+ data.tar.gz: 721b76230f9a7bc4214818522cc2de0be2416608ba45042ebd36c09d3d9414f7c30a2af3781fd7a86d7139176cca89af34678870e325891c2135de1e5f926bf4
@@ -1,7 +1,7 @@
1
1
  module Train
2
2
  module Tax
3
3
  module Calculator
4
- VERSION = "1.1.0"
4
+ VERSION = "1.1.1"
5
5
  end
6
6
  end
7
7
  end
@@ -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 >= 666_667.00
54
+ if income >= HIGHEST_BRACKET
49
55
 
50
- 200_833.33 + ((income - 666_667.00) * 0.35)
56
+ 200_833.33 + ((income - HIGHEST_BRACKET) * 0.35)
51
57
 
52
- elsif income >= 166_667.00
58
+ elsif income >= HIGHER_BRACKET
53
59
 
54
- 40_833.33 + ((income - 166_667.00) * 0.32)
60
+ 40_833.33 + ((income - HIGHER_BRACKET) * 0.32)
55
61
 
56
- elsif income >= 66_667.00
62
+ elsif income >= HIGH_BRACKET
57
63
 
58
- 10_833.33 + ((income - 66_667.00) * 0.30)
64
+ 10_833.33 + ((income - HIGH_BRACKET) * 0.30)
59
65
 
60
- elsif income >= 33_333.00
66
+ elsif income >= LOW_BRACKET
61
67
 
62
- 2_500.00 + ((income - 33_333.00) * 0.25)
68
+ 2_500.00 + ((income - LOW_BRACKET) * 0.25)
63
69
 
64
- elsif income >= 20_833.00
70
+ elsif income >= LOWEST_BRACKET
65
71
 
66
- 0.00 + ((income - 20_833.00) * 0.20)
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.0
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