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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9b7d7394cf2864fb65e6b575cb233dbac9939ccaff36fcf27c78bc9feb1e6da7
4
- data.tar.gz: 67663785b91e181476b8fa12209ba8bdd0cddae11916e58b7695729cf05c3ecd
3
+ metadata.gz: e14614450e2a789f2916917c82d5880564b3dffac3bfe048985355524d694cff
4
+ data.tar.gz: 15afce8b06b47a274f49c193a6a07d63bd51142cd0f75ebd2867ec810634ce9a
5
5
  SHA512:
6
- metadata.gz: eccbca739cb53247f7e984ea6a84a87ec74cbf8796c0347dd763c8e61a83bd12bc3290968fae0d45a9e8633301e9f54057308dd0e1877c2190e467db11b64f47
7
- data.tar.gz: 18e49a30a3a67b9fb2896a13d3f62fa75320c6f64a12654894f6f22ead17a13d1c9338c0902c92bd7370e2b648ed364292e28e220fe571c54058a47131dc4c26
6
+ metadata.gz: 6ddf267d281261f5c7b5592d72c62138de1358beea55c3784a3c1b46fada17a041761aa4b3bc502281f9b5251e030bdee0a23f8107583fc7d9103501f688490d
7
+ data.tar.gz: c3844bf9f63c61186d479ac9fddce83846e61c12465b06ae210af3e829dc419a6d372aa8124939c7adc493c2804f74be5b99c1e23588ae9c7cd03be3f139318a
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Luca
4
4
  module Jp
5
- VERSION = '0.21.0'
5
+ VERSION = '0.21.1'
6
6
  end
7
7
  end
@@ -40,6 +40,7 @@ code label acct_label
40
40
  203 所得税 所得税源泉給与
41
41
  204 雇用保険料 預り金
42
42
  205 介護保険料 法定福利費
43
+ 206 子育て支援金 法定福利費
43
44
  211 住民税 住民税
44
45
  3 その他控除額
45
46
  311 社宅本人負担分 雑収入
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LucaSalaryJp
4
- VERSION = '0.2.2'
4
+ VERSION = '0.3.0'
5
5
  end
@@ -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
- tax_base = self.class.sum_code(h, '1', income_tax_exception) - h['201'] - h['202']
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.0
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: 2026-01-30 00:00:00.000000000 Z
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.4.20
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: []