tax_jp 1.2.12 → 1.3.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.
@@ -14,7 +14,8 @@ class TaxJp::WithheldTaxes::MonthlyDbBuilder < TaxJp::DbBuilder
14
14
 
15
15
  CSV.foreach(filename, :col_sep => "\t") do |row|
16
16
  next if row[0].to_i == 0
17
- db.execute(insert_sql, [valid_from.to_s, valid_until.to_s] + row.map{|col| normalize_amount(col)})
17
+ values = row.map{|col| TaxJp::Utils.normalize_amount(col)}
18
+ db.execute(insert_sql, [valid_from.to_s, valid_until.to_s] + values)
18
19
  end
19
20
  end
20
21
  end
@@ -31,12 +32,8 @@ class TaxJp::WithheldTaxes::MonthlyDbBuilder < TaxJp::DbBuilder
31
32
  8.times do |i|
32
33
  ret << "dependent_#{i}, "
33
34
  end
34
- ret << 'sub_salary) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'
35
+ ret << 'sub_salary, extra_rate, sub_extra_rate) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'
35
36
  ret
36
37
  end
37
38
 
38
- def normalize_amount(amount)
39
- amount.to_s.gsub(',', '').to_i
40
- end
41
-
42
39
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tax_jp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.12
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ichylinux
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-12-31 00:00:00.000000000 Z
12
+ date: 2025-03-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bootstrap
@@ -209,7 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
209
209
  - !ruby/object:Gem::Version
210
210
  version: '0'
211
211
  requirements: []
212
- rubygems_version: 3.3.26
212
+ rubygems_version: 3.4.22
213
213
  signing_key:
214
214
  specification_version: 4
215
215
  summary: 税金計算ライブラリ