luca-jp 0.21.0 → 0.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/luca/jp/version.rb +1 -1
- data/lib/luca_salary/dict/code.tsv +1 -0
- data/lib/luca_salary/jp/insurance.rb +6 -0
- data/lib/luca_salary/jp/version.rb +1 -1
- data/lib/luca_salary/jp.rb +5 -2
- metadata +3 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e14614450e2a789f2916917c82d5880564b3dffac3bfe048985355524d694cff
|
|
4
|
+
data.tar.gz: 15afce8b06b47a274f49c193a6a07d63bd51142cd0f75ebd2867ec810634ce9a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6ddf267d281261f5c7b5592d72c62138de1358beea55c3784a3c1b46fada17a041761aa4b3bc502281f9b5251e030bdee0a23f8107583fc7d9103501f688490d
|
|
7
|
+
data.tar.gz: c3844bf9f63c61186d479ac9fddce83846e61c12465b06ae210af3e829dc419a6d372aa8124939c7adc493c2804f74be5b99c1e23588ae9c7cd03be3f139318a
|
data/lib/luca/jp/version.rb
CHANGED
|
@@ -30,6 +30,12 @@ class InsuranceJP < LucaRecord::Base
|
|
|
30
30
|
round6(select_health_insurance(rank).dig(category))
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
+
def childcare_salary(rank)
|
|
34
|
+
return nil if @date < Date.new(2026, 4, 1) # 徴収開始日
|
|
35
|
+
|
|
36
|
+
round6(select_health_insurance(rank).dig('childcare_salary'))
|
|
37
|
+
end
|
|
38
|
+
|
|
33
39
|
def pension_salary(rank)
|
|
34
40
|
round6(select_pension(rank).dig('pension_salary'))
|
|
35
41
|
end
|
data/lib/luca_salary/jp.rb
CHANGED
|
@@ -26,7 +26,8 @@ class LucaSalary::Jp < LucaSalary::Base
|
|
|
26
26
|
介護保険?(profile['birth_date'])
|
|
27
27
|
)
|
|
28
28
|
h['202'] = @insurance.pension_salary(pension_rank(profile))
|
|
29
|
-
|
|
29
|
+
h['206'] = @insurance.childcare_salary(insurance_rank(profile))
|
|
30
|
+
tax_base = self.class.sum_code(h, '1', income_tax_exception) - ['201', '202', '204', '205', '206'].map{ |cd| h[cd] }.compact.sum
|
|
30
31
|
h['203'] = JpNationalTax::IncomeTax.calc_kouran(tax_base, Date.today, 配偶者控除, 扶養控除)
|
|
31
32
|
h['211'] = resident_tax(profile)
|
|
32
33
|
select_code(profile, '3').each { |k, v| h[k] = v }
|
|
@@ -46,7 +47,7 @@ class LucaSalary::Jp < LucaSalary::Base
|
|
|
46
47
|
p['916'] = 配偶者控除の金額(給与等の金額, profile['spouse'], date)
|
|
47
48
|
p['917'] = 配偶者特別控除の金額(給与等の金額, profile['spouse'], date)
|
|
48
49
|
p['918'] = 扶養控除の金額(profile['family'], date)
|
|
49
|
-
p['912'] = ['201', '202', '204', '205'].map{ |cd| p[cd] }.compact.sum
|
|
50
|
+
p['912'] = ['201', '202', '204', '205', '206'].map{ |cd| p[cd] }.compact.sum
|
|
50
51
|
課税給与所得金額 = 給与等の金額 - ['911', '912', '916', '917', '918'].map{ |cd| p[cd] }.compact.sum
|
|
51
52
|
p['941'] = (課税給与所得金額 / 1000).floor * 1000
|
|
52
53
|
p['961'] = JpNationalTax::IncomeTax.year_tax(p['941'], date)
|
|
@@ -99,6 +100,8 @@ class LucaSalary::Jp < LucaSalary::Base
|
|
|
99
100
|
end
|
|
100
101
|
|
|
101
102
|
def self.扶養控除対象者の数(family, date)
|
|
103
|
+
return 0 if family.nil?
|
|
104
|
+
|
|
102
105
|
family.map { |person| 各家族の扶養控除の額(person, date) > 0 ? 1 : 0 }.sum
|
|
103
106
|
end
|
|
104
107
|
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: luca-jp
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.21.
|
|
4
|
+
version: 0.21.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chuma Takahiro
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: lucabook
|
|
@@ -222,7 +221,6 @@ metadata:
|
|
|
222
221
|
homepage_uri: https://github.com/chumaltd/luca-jp
|
|
223
222
|
source_code_uri: https://github.com/chumaltd/luca-jp
|
|
224
223
|
changelog_uri: https://github.com/chumaltd/luca-jp/CHANGELOG.md
|
|
225
|
-
post_install_message:
|
|
226
224
|
rdoc_options: []
|
|
227
225
|
require_paths:
|
|
228
226
|
- lib
|
|
@@ -237,8 +235,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
237
235
|
- !ruby/object:Gem::Version
|
|
238
236
|
version: '0'
|
|
239
237
|
requirements: []
|
|
240
|
-
rubygems_version: 3.
|
|
241
|
-
signing_key:
|
|
238
|
+
rubygems_version: 3.6.7
|
|
242
239
|
specification_version: 4
|
|
243
240
|
summary: JP tax extension for Luca
|
|
244
241
|
test_files: []
|