lucasalary 0.5.0 → 0.6.0
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/CHANGELOG.md +5 -0
- data/lib/luca_salary/monthly.rb +2 -2
- data/lib/luca_salary/total.rb +3 -3
- data/lib/luca_salary/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d28cd1e6534f228ea827a320c439f6e7a2ab67850ff0a169112ad3631ee822f3
|
4
|
+
data.tar.gz: 9333ee5fe244056cc45b0e8aaa188347be9c1e04137ca866550811dc0a4b7dcf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9fac7f7e67b4c07f2273ec4a2b04b4dab01a292ff180b6a9a1f66685cda874a8319c6758ceb48ec5e9b116935fba02c0e07c9fd03f143c8208e1550a2c32048
|
7
|
+
data.tar.gz: 4253f665b92b82f5851db0391e7e011c8218e543afc5d9a49498ffa3bdab35a41d3e6f2f2b0731fa7ab3c73c0f89d638567721bb5ad1b29a7b33bd3040871d52
|
data/CHANGELOG.md
CHANGED
data/lib/luca_salary/monthly.rb
CHANGED
@@ -25,12 +25,12 @@ module LucaSalary
|
|
25
25
|
country = @driver.new(@pjdir, @config, @date)
|
26
26
|
# TODO: handle retirement
|
27
27
|
LucaSalary::Profile.all do |profile|
|
28
|
-
current_profile = parse_current(profile)
|
28
|
+
current_profile = parse_current(Profile.find_secure(profile['id']))
|
29
29
|
if self.class.search(@date.year, @date.month, @date.day, current_profile['id']).count > 0
|
30
30
|
puts "payment record already exists: #{current_profile['id']}"
|
31
31
|
return nil
|
32
32
|
end
|
33
|
-
h = country.calc_payment(current_profile)
|
33
|
+
h = country.calc_payment(current_profile, @date)
|
34
34
|
h['profile_id'] = current_profile['id']
|
35
35
|
self.class.create(h, date: @date, codes: Array(current_profile['id']))
|
36
36
|
end
|
data/lib/luca_salary/total.rb
CHANGED
@@ -29,17 +29,17 @@ module LucaSalary
|
|
29
29
|
payment, _count = accumulate(slips)
|
30
30
|
payment['id'] = id
|
31
31
|
date = Date.new(year, 12, 31)
|
32
|
-
payment = local_convert(payment, date)
|
32
|
+
payment = local_convert(Profile.find_secure(id), payment, date)
|
33
33
|
upsert(payment, basedir: "payments/total/#{year}#{LucaSupport::Code.encode_month(12)}")
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
|
-
def self.local_convert(payment, date)
|
37
|
+
def self.local_convert(profile, payment, date)
|
38
38
|
return payment if CONFIG['country'].nil?
|
39
39
|
|
40
40
|
require "luca_salary/#{CONFIG['country'].downcase}"
|
41
41
|
klass = Kernel.const_get("LucaSalary::#{CONFIG['country'].capitalize}")
|
42
|
-
klass.year_total(payment, date)
|
42
|
+
klass.year_total(profile, payment, date)
|
43
43
|
rescue NameError
|
44
44
|
return payment
|
45
45
|
end
|
data/lib/luca_salary/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lucasalary
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chuma Takahiro
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lucarecord
|
@@ -96,7 +96,7 @@ metadata:
|
|
96
96
|
homepage_uri: https://github.com/chumaltd/luca/tree/master/lucasalary
|
97
97
|
source_code_uri: https://github.com/chumaltd/luca/tree/master/lucasalary
|
98
98
|
changelog_uri: https://github.com/chumaltd/luca/tree/master/lucasalary/CHANGELOG.md
|
99
|
-
post_install_message:
|
99
|
+
post_install_message:
|
100
100
|
rdoc_options: []
|
101
101
|
require_paths:
|
102
102
|
- lib
|
@@ -112,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
112
112
|
version: '0'
|
113
113
|
requirements: []
|
114
114
|
rubygems_version: 3.4.10
|
115
|
-
signing_key:
|
115
|
+
signing_key:
|
116
116
|
specification_version: 4
|
117
117
|
summary: Salary calculation framework
|
118
118
|
test_files: []
|