Skip to content

Commit

Permalink
修改所得稅起扣標準
Browse files Browse the repository at this point in the history
  • Loading branch information
jodeci committed Jun 13, 2024
1 parent 4749af3 commit 74412a3
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ gem 'pdf-toolkit'

gem 'rack'
gem 'nokogiri'
gem 'net-http'

group :development, :test do
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
Expand Down
4 changes: 4 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ GEM
mocha (2.0.4)
ruby2_keywords (>= 0.0.5)
msgpack (1.7.2)
net-http (0.4.1)
uri
net-imap (0.4.4)
date
net-protocol
Expand Down Expand Up @@ -312,6 +314,7 @@ GEM
execjs (>= 0.3.0, < 3)
unicode-display_width (2.5.0)
uniform_notifier (1.16.0)
uri (0.13.0)
web-console (4.2.1)
actionview (>= 6.0.0)
activemodel (>= 6.0.0)
Expand Down Expand Up @@ -352,6 +355,7 @@ DEPENDENCIES
kaminari
listen (>= 3.0.5, < 3.2)
mocha
net-http
nokogiri
pdf-toolkit
pg
Expand Down
6 changes: 5 additions & 1 deletion app/services/income_tax_service/exemption.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ def call
private

def exemption_by_date
if date >= Date.new(2018, 1, 1)
if date >= Date.new(2024, 1, 1)
88500
elsif date >= Date.new(2022, 1, 1)
86000
elsif date >= Date.new(2018, 1, 1)
84500
elsif date >= Date.new(2017, 1, 1)
73500
Expand Down
8 changes: 8 additions & 0 deletions test/services/income_tax_service/exemption_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@

module IncomeTaxService
class ExemptionTest < ActiveSupport::TestCase
def test_after_2024
assert_equal 88500, IncomeTaxService::Exemption.call(2024, 1)
end

def test_after_2022
assert_equal 86000, IncomeTaxService::Exemption.call(2022, 1)
end

def test_after_2018
assert_equal 84500, IncomeTaxService::Exemption.call(2018, 1)
end
Expand Down

0 comments on commit 74412a3

Please sign in to comment.