teodoro 0.69.5 → 0.69.7
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/teodoro/arquivo_xml.rb +1 -0
- data/lib/teodoro/empresa/contratos_de_emprego.rb +3 -3
- data/lib/teodoro/empresa/contratos_de_trabalho_sem_vinculo.rb +2 -1
- data/lib/teodoro/leiaute/arquivo_s2230.rb +15 -11
- data/lib/teodoro/leiaute/arquivo_s2500.rb +10 -24
- data/lib/teodoro/leiaute/arquivo_s2501.rb +16 -8
- data/lib/teodoro/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0f91a118f613534e4a2329f7f57a96ea4247e58f61e9762c12ea83a0d8583061
|
|
4
|
+
data.tar.gz: a45082f0a8fba9176a69e0daee400a568a9e26a45e699d00f3e37935d61cf832
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 97c373a61a1c44fce2ed41b9dc0bf368dd8b0848e05eded15edcb7d7c4c4086e98b5a39e6e75dc2cb69171dddfbf761fe5f5e8943a2ecf59e91da41a02f79027
|
|
7
|
+
data.tar.gz: 59c357a58592635e43fe58b91f62f5f8e1f59b5407e85add1e45a7c85f31229dd9da677b7c280ac24eeae4ee7f99a03c0ffe11ecd06352b51d2df86e11708b34
|
data/lib/teodoro/arquivo_xml.rb
CHANGED
|
@@ -12,18 +12,18 @@ module Teodoro
|
|
|
12
12
|
public
|
|
13
13
|
|
|
14
14
|
def registrar_admissao(admissao:, inicio_de_afastamento:)
|
|
15
|
-
contratos_por_matricula[admissao.matricula_do_trabalhador] =
|
|
15
|
+
contratos_por_matricula[admissao.matricula_do_trabalhador.downcase] =
|
|
16
16
|
Contrato.new(admissao: admissao, inicio_de_afastamento: inicio_de_afastamento)
|
|
17
17
|
trabalhadores << admissao.trabalhador
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
def registrar_alteracao_contratual(alteracao_contratual)
|
|
21
|
-
contratos_por_matricula[alteracao_contratual.matricula_do_trabalhador]
|
|
21
|
+
contratos_por_matricula[alteracao_contratual.matricula_do_trabalhador.downcase]
|
|
22
22
|
.registrar_alteracao_contratual(alteracao_contratual)
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
def [](matricula)
|
|
26
|
-
contratos_por_matricula[matricula]
|
|
26
|
+
contratos_por_matricula[matricula.downcase]
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
def *(cpf_do_trabalhador:, data:)
|
|
@@ -17,7 +17,8 @@ module Teodoro
|
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
def [](cpf_do_trabalhador:, matricula_do_trabalhador:, categoria_do_trabalhador:, data:)
|
|
20
|
-
return contratos.find { _1.matricula_do_trabalhador == matricula_do_trabalhador } if
|
|
20
|
+
return contratos.find { _1.matricula_do_trabalhador.downcase == matricula_do_trabalhador.downcase } if
|
|
21
|
+
matricula_do_trabalhador
|
|
21
22
|
|
|
22
23
|
contratos
|
|
23
24
|
.select do |contrato|
|
|
@@ -74,19 +74,11 @@ module Teodoro
|
|
|
74
74
|
end
|
|
75
75
|
|
|
76
76
|
def empregado?
|
|
77
|
-
|
|
77
|
+
!trabalhador_sem_vinculo?
|
|
78
78
|
end
|
|
79
79
|
|
|
80
|
-
def
|
|
81
|
-
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
def matricula_do_trabalhador
|
|
85
|
-
@matricula_do_trabalhador ||= evento['ideVinculo/matricula']
|
|
86
|
-
end
|
|
87
|
-
|
|
88
|
-
def contratos_de_emprego
|
|
89
|
-
empresa.contratos_de_emprego
|
|
80
|
+
def trabalhador_sem_vinculo?
|
|
81
|
+
contrato_de_trabalho_sem_vinculo
|
|
90
82
|
end
|
|
91
83
|
|
|
92
84
|
def contrato_de_trabalho_sem_vinculo
|
|
@@ -106,6 +98,10 @@ module Teodoro
|
|
|
106
98
|
@cpf_do_trabalhador ||= evento['ideVinculo/cpfTrab']
|
|
107
99
|
end
|
|
108
100
|
|
|
101
|
+
def matricula_do_trabalhador
|
|
102
|
+
@matricula_do_trabalhador ||= evento['ideVinculo/matricula']
|
|
103
|
+
end
|
|
104
|
+
|
|
109
105
|
def categoria_do_trabalhador
|
|
110
106
|
@categoria_do_trabalhador ||= evento['ideVinculo/codCateg']
|
|
111
107
|
end
|
|
@@ -114,6 +110,14 @@ module Teodoro
|
|
|
114
110
|
@data_de_termino_do_afastamento ||= termino_do_afastamento['dtTermAfast']
|
|
115
111
|
end
|
|
116
112
|
|
|
113
|
+
def contrato_de_emprego
|
|
114
|
+
@contrato_de_emprego ||= contratos_de_emprego[matricula_do_trabalhador]
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
def contratos_de_emprego
|
|
118
|
+
empresa.contratos_de_emprego
|
|
119
|
+
end
|
|
120
|
+
|
|
117
121
|
def dados_dos_arquivos_data # rubocop:disable Metrics/MethodLength, Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
|
118
122
|
[
|
|
119
123
|
Obj.new(
|
|
@@ -5,6 +5,12 @@ module Teodoro
|
|
|
5
5
|
|
|
6
6
|
private
|
|
7
7
|
|
|
8
|
+
def processar_inclusao
|
|
9
|
+
return if arquivo_xml.versao_do_leiaute == '_S_01_01_00'
|
|
10
|
+
|
|
11
|
+
super
|
|
12
|
+
end
|
|
13
|
+
|
|
8
14
|
def dados_dos_arquivos_data
|
|
9
15
|
[
|
|
10
16
|
Obj.new(
|
|
@@ -23,7 +29,7 @@ module Teodoro
|
|
|
23
29
|
@cpf_do_trabalhador ||= evento['ideTrab/cpfTrab']
|
|
24
30
|
end
|
|
25
31
|
|
|
26
|
-
def itens_do_conteudo # rubocop:disable Metrics/MethodLength, Metrics/AbcSize, Metrics/CyclomaticComplexity
|
|
32
|
+
def itens_do_conteudo # rubocop:disable Metrics/MethodLength, Metrics/AbcSize, Metrics/CyclomaticComplexity
|
|
27
33
|
[
|
|
28
34
|
# rubocop:disable Layout/LineLength
|
|
29
35
|
['Id', id_do_evento],
|
|
@@ -46,13 +52,6 @@ module Teodoro
|
|
|
46
52
|
['ideTrab/cpfTrab', cpf_do_trabalhador],
|
|
47
53
|
['ideTrab/nmTrab', evento['ideTrab/nmTrab']],
|
|
48
54
|
['ideTrab/dtNascto', evento['ideTrab/dtNascto']],
|
|
49
|
-
*evento.*('ideTrab/dependente').map.with_index(1) do |dependente, seq|
|
|
50
|
-
[
|
|
51
|
-
["ideTrab/dependente_#{seq}_cpfDep", dependente['cpfDep']],
|
|
52
|
-
["ideTrab/dependente_#{seq}_tpDep", dependente['tpDep']],
|
|
53
|
-
["ideTrab/dependente_#{seq}_descDep", dependente['descDep']]
|
|
54
|
-
]
|
|
55
|
-
end.sum([]),
|
|
56
55
|
*evento.*('ideTrab/infoContr').map.with_index(1) do |contrato_de_trabalho, seq| # rubocop:disable Metrics/BlockLength
|
|
57
56
|
[
|
|
58
57
|
["ideTrab/infoContr_#{seq}_tpContr", contrato_de_trabalho['tpContr']],
|
|
@@ -62,7 +61,6 @@ module Teodoro
|
|
|
62
61
|
["ideTrab/infoContr_#{seq}_indCateg", contrato_de_trabalho['indCateg']],
|
|
63
62
|
["ideTrab/infoContr_#{seq}_indNatAtiv", contrato_de_trabalho['indNatAtiv']],
|
|
64
63
|
["ideTrab/infoContr_#{seq}_indMotDeslig", contrato_de_trabalho['indMotDeslig']],
|
|
65
|
-
["ideTrab/infoContr_#{seq}_indUnic", contrato_de_trabalho['indUnic']],
|
|
66
64
|
["ideTrab/infoContr_#{seq}_matricula", contrato_de_trabalho['matricula']],
|
|
67
65
|
["ideTrab/infoContr_#{seq}_codCateg", contrato_de_trabalho['codCateg']],
|
|
68
66
|
["ideTrab/infoContr_#{seq}_dtInicio", contrato_de_trabalho['dtInicio']],
|
|
@@ -119,13 +117,6 @@ module Teodoro
|
|
|
119
117
|
["ideTrab/infoContr_#{seq}_ideEstab/nrInsc", contrato_de_trabalho['ideEstab/nrInsc']],
|
|
120
118
|
["ideTrab/infoContr_#{seq}_ideEstab/infoVlr/compIni", contrato_de_trabalho['ideEstab/infoVlr/compIni']],
|
|
121
119
|
["ideTrab/infoContr_#{seq}_ideEstab/infoVlr/compFim", contrato_de_trabalho['ideEstab/infoVlr/compFim']],
|
|
122
|
-
["ideTrab/infoContr_#{seq}_ideEstab/infoVlr/repercProc", contrato_de_trabalho['ideEstab/infoVlr/repercProc']],
|
|
123
|
-
["ideTrab/infoContr_#{seq}_ideEstab/infoVlr/vrRemun", contrato_de_trabalho['ideEstab/infoVlr/vrRemun']],
|
|
124
|
-
["ideTrab/infoContr_#{seq}_ideEstab/infoVlr/vrAPI", contrato_de_trabalho['ideEstab/infoVlr/vrAPI']],
|
|
125
|
-
["ideTrab/infoContr_#{seq}_ideEstab/infoVlr/vr13API", contrato_de_trabalho['ideEstab/infoVlr/vr13API']],
|
|
126
|
-
["ideTrab/infoContr_#{seq}_ideEstab/infoVlr/vrInden", contrato_de_trabalho['ideEstab/infoVlr/vrInden']],
|
|
127
|
-
["ideTrab/infoContr_#{seq}_ideEstab/infoVlr/vrBaseIndenFGTS", contrato_de_trabalho['ideEstab/infoVlr/vrBaseIndenFGTS']],
|
|
128
|
-
["ideTrab/infoContr_#{seq}_ideEstab/infoVlr/pagDiretoResc", contrato_de_trabalho['ideEstab/infoVlr/pagDiretoResc']],
|
|
129
120
|
["ideTrab/infoContr_#{seq}_ideEstab/infoVlr/indReperc", contrato_de_trabalho['ideEstab/infoVlr/indReperc']],
|
|
130
121
|
["ideTrab/infoContr_#{seq}_ideEstab/infoVlr/indenSD", contrato_de_trabalho['ideEstab/infoVlr/indenSD']],
|
|
131
122
|
["ideTrab/infoContr_#{seq}_ideEstab/infoVlr/indenAbono", contrato_de_trabalho['ideEstab/infoVlr/indenAbono']],
|
|
@@ -139,17 +130,12 @@ module Teodoro
|
|
|
139
130
|
["ideTrab/infoContr_#{seq}_ideEstab/infoVlr/idePeriodo_#{periodo_seq}_baseCalculo/perRef", periodo['perRef']],
|
|
140
131
|
["ideTrab/infoContr_#{seq}_ideEstab/infoVlr/idePeriodo_#{periodo_seq}_baseCalculo/vrBcCpMensal", periodo['baseCalculo/vrBcCpMensal']],
|
|
141
132
|
["ideTrab/infoContr_#{seq}_ideEstab/infoVlr/idePeriodo_#{periodo_seq}_baseCalculo/vrBcCp13", periodo['baseCalculo/vrBcCp13']],
|
|
142
|
-
["ideTrab/infoContr_#{seq}_ideEstab/infoVlr/idePeriodo_#{periodo_seq}_baseCalculo/vrBcFgts", periodo['baseCalculo/vrBcFgts']],
|
|
143
|
-
["ideTrab/infoContr_#{seq}_ideEstab/infoVlr/idePeriodo_#{periodo_seq}_baseCalculo/vrBcFgts13", periodo['baseCalculo/vrBcFgts13']],
|
|
144
133
|
["ideTrab/infoContr_#{seq}_ideEstab/infoVlr/idePeriodo_#{periodo_seq}_baseCalculo/infoAgNocivo/grauExp", periodo['baseCalculo/infoAgNocivo/grauExp']],
|
|
145
|
-
["ideTrab/infoContr_#{seq}_ideEstab/infoVlr/idePeriodo_#{periodo_seq}_infoFGTS/vrBcFgtsGuia", periodo['infoFGTS/vrBcFgtsGuia']],
|
|
146
|
-
["ideTrab/infoContr_#{seq}_ideEstab/infoVlr/idePeriodo_#{periodo_seq}_infoFGTS/vrBcFgts13Guia", periodo['infoFGTS/vrBcFgts13Guia']],
|
|
147
|
-
["ideTrab/infoContr_#{seq}_ideEstab/infoVlr/idePeriodo_#{periodo_seq}_infoFGTS/pagDireto", periodo['infoFGTS/pagDireto']],
|
|
148
|
-
["ideTrab/infoContr_#{seq}_ideEstab/infoVlr/idePeriodo_#{periodo_seq}_baseMudCateg/codCateg", periodo['baseMudCateg/codCateg']],
|
|
149
|
-
["ideTrab/infoContr_#{seq}_ideEstab/infoVlr/idePeriodo_#{periodo_seq}_baseMudCateg/vrBcCPrev", periodo['baseMudCateg/vrBcCPrev']],
|
|
150
134
|
["ideTrab/infoContr_#{seq}_ideEstab/infoVlr/idePeriodo_#{periodo_seq}_infoFGTS/vrBcFGTSProcTrab", periodo['infoFGTS/vrBcFGTSProcTrab']],
|
|
151
135
|
["ideTrab/infoContr_#{seq}_ideEstab/infoVlr/idePeriodo_#{periodo_seq}_infoFGTS/vrBcFGTSSefip", periodo['infoFGTS/vrBcFGTSSefip']],
|
|
152
|
-
["ideTrab/infoContr_#{seq}_ideEstab/infoVlr/idePeriodo_#{periodo_seq}_infoFGTS/vrBcFGTSDecAnt", periodo['infoFGTS/vrBcFGTSDecAnt']]
|
|
136
|
+
["ideTrab/infoContr_#{seq}_ideEstab/infoVlr/idePeriodo_#{periodo_seq}_infoFGTS/vrBcFGTSDecAnt", periodo['infoFGTS/vrBcFGTSDecAnt']],
|
|
137
|
+
["ideTrab/infoContr_#{seq}_ideEstab/infoVlr/idePeriodo_#{periodo_seq}_baseMudCateg/codCateg", periodo['baseMudCateg/codCateg']],
|
|
138
|
+
["ideTrab/infoContr_#{seq}_ideEstab/infoVlr/idePeriodo_#{periodo_seq}_baseMudCateg/vrBcCPrev", periodo['baseMudCateg/vrBcCPrev']]
|
|
153
139
|
]
|
|
154
140
|
end.sum([])
|
|
155
141
|
# rubocop:enable Layout/LineLength
|
|
@@ -5,6 +5,12 @@ module Teodoro
|
|
|
5
5
|
|
|
6
6
|
private
|
|
7
7
|
|
|
8
|
+
def processar_inclusao
|
|
9
|
+
return if arquivo_xml.versao_do_leiaute == '_S_01_01_00'
|
|
10
|
+
|
|
11
|
+
super
|
|
12
|
+
end
|
|
13
|
+
|
|
8
14
|
def dados_dos_arquivos_data
|
|
9
15
|
[
|
|
10
16
|
Obj.new(
|
|
@@ -42,8 +48,6 @@ module Teodoro
|
|
|
42
48
|
["ideTrab_#{seq}_calcTrib_#{periodo_seq}_perRef", periodo['perRef']],
|
|
43
49
|
["ideTrab_#{seq}_calcTrib_#{periodo_seq}_vrBcCpMensal", periodo['vrBcCpMensal']],
|
|
44
50
|
["ideTrab_#{seq}_calcTrib_#{periodo_seq}_vrBcCp13", periodo['vrBcCp13']],
|
|
45
|
-
["ideTrab_#{seq}_calcTrib_#{periodo_seq}_vrRendIRRF", periodo['vrRendIRRF']],
|
|
46
|
-
["ideTrab_#{seq}_calcTrib_#{periodo_seq}_vrRendIRRF13", periodo['vrRendIRRF13']],
|
|
47
51
|
*periodo.*('infoCRContrib').map.with_index(1) do |contribuicao, contribuicao_seq|
|
|
48
52
|
[
|
|
49
53
|
["ideTrab_#{seq}_calcTrib_#{periodo_seq}_infoCRContrib_#{contribuicao_seq}_tpCR", contribuicao['tpCR']],
|
|
@@ -68,14 +72,18 @@ module Teodoro
|
|
|
68
72
|
["ideTrab_#{seq}_infoCRIRRF_#{irrf_seq}_infoRRA/qtdMesesRRA", irrf['infoRRA/qtdMesesRRA']],
|
|
69
73
|
["ideTrab_#{seq}_infoCRIRRF_#{irrf_seq}_infoRRA/despProcJud/vlrDespCustas", irrf['infoRRA/despProcJud/vlrDespCustas']],
|
|
70
74
|
["ideTrab_#{seq}_infoCRIRRF_#{irrf_seq}_infoRRA/despProcJud/vlrDespAdvogados", irrf['infoRRA/despProcJud/vlrDespAdvogados']],
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
75
|
+
*irrf.*('infoRRA/ideAdv').map.with_index(1) do |advogado, advogado_seq|
|
|
76
|
+
[
|
|
77
|
+
["ideTrab_#{seq}_infoCRIRRF_#{irrf_seq}_infoRRA/ideAdv_#{advogado_seq}_tpInsc", advogado['tpInsc']],
|
|
78
|
+
["ideTrab_#{seq}_infoCRIRRF_#{irrf_seq}_infoRRA/ideAdv_#{advogado_seq}_nrInsc", advogado['nrInsc']],
|
|
79
|
+
["ideTrab_#{seq}_infoCRIRRF_#{irrf_seq}_infoRRA/ideAdv_#{advogado_seq}_vlrAdv", advogado['vlrAdv']]
|
|
80
|
+
]
|
|
81
|
+
end.sum([]),
|
|
74
82
|
*irrf.*('dedDepen').map.with_index(1) do |deducao, deducao_seq|
|
|
75
83
|
[
|
|
76
|
-
["ideTrab_#{seq}_infoCRIRRF_#{irrf_seq}
|
|
77
|
-
["ideTrab_#{seq}_infoCRIRRF_#{irrf_seq}
|
|
78
|
-
["ideTrab_#{seq}_infoCRIRRF_#{irrf_seq}
|
|
84
|
+
["ideTrab_#{seq}_infoCRIRRF_#{irrf_seq}_dedDepen_#{deducao_seq}_tpRend", deducao['tpRend']],
|
|
85
|
+
["ideTrab_#{seq}_infoCRIRRF_#{irrf_seq}_dedDepen_#{deducao_seq}_cpfDep", deducao['cpfDep']],
|
|
86
|
+
["ideTrab_#{seq}_infoCRIRRF_#{irrf_seq}_dedDepen_#{deducao_seq}_vlrDeducao", deducao['vlrDeducao']]
|
|
79
87
|
]
|
|
80
88
|
end.sum([]),
|
|
81
89
|
*irrf.*('penAlim').map.with_index(1) do |beneficiario, beneficiario_seq|
|
data/lib/teodoro/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: teodoro
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.69.
|
|
4
|
+
version: 0.69.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Fortes Tecnologia
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-
|
|
11
|
+
date: 2024-07-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: nokogiri
|