teodoro 0.69.4 → 0.69.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 71e01b60935697f64014ebd63e964306013c5cbf5700dfcd56f0907acada2b73
4
- data.tar.gz: 77fc009384a50d438660f32a60208960c888a7bc802a4e17aaef22ef40f4b64e
3
+ metadata.gz: '096300f06d481c55252537b7a49779e46ca4bf7de5bb918a7c7eb7c46bd250fe'
4
+ data.tar.gz: f7ec8952876277bbc937e2bc923a7de9bd5a441f176df071f2d003d616f2e922
5
5
  SHA512:
6
- metadata.gz: 16ab0a3b327e8ff39d0c95907977527ef9c73316b8142e45a1a4df62a35da4b1bfc193ef489ff838be36c88dba89700eb5b8370374d3b2c635b6b54a948ba504
7
- data.tar.gz: 5d7c3a833bcf55c0f7dcfe6b5744d9d29c0b875c661e93b6186dae9f842147af3e6390da1b41c04b08b1f0083c5b86a00ef4e8bfaf6cb6991f754af320d43046
6
+ metadata.gz: 405a350c10b0db6f85da9fc9807b4738badfcf7ca50b2cc4dc2246240c43660869f3aaa1562f7a3fb2a288c032d48d98b5b96d808fabd72f47ea07639f28dc8a
7
+ data.tar.gz: 803455c3a24d46769573a9632d176715e62e0d50e99b6f925a162e78b59c1744b0f33e9f35fb44b5429001b826be591c632875cfd6904d287927eb4d4e4778e9
@@ -36,11 +36,11 @@ module Teodoro
36
36
  private
37
37
 
38
38
  def inclusao_de_arquivo?
39
- operacao == :inclusao
39
+ operacao == :inclusao || (operacao == :inclusao_atualizacao && !File.exist?(caminho))
40
40
  end
41
41
 
42
42
  def atualizacao_de_arquivo?
43
- operacao == :atualizacao
43
+ operacao == :atualizacao || (operacao == :inclusao_atualizacao && File.exist?(caminho))
44
44
  end
45
45
 
46
46
  def salvar_conteudo_do_arquivo_original
@@ -231,6 +231,7 @@ module Teodoro
231
231
  empresa: empresa,
232
232
  arquivo_xml: Obj.new(
233
233
  percentual: percentual,
234
+ versao_do_leiaute: versao_do_leiaute,
234
235
  leiaute_simplificado?: leiaute_simplificado?,
235
236
  evento: evento,
236
237
  recibo: recibo
@@ -149,7 +149,7 @@ module Teodoro
149
149
  contratos_de_trabalho.sum([]) do |contrato_de_trabalho| # rubocop:disable Metrics/BlockLength
150
150
  [
151
151
  Obj.new(
152
- operacao: :inclusao,
152
+ operacao: :inclusao_atualizacao,
153
153
  nome: [
154
154
  "TRA[#{trabalhador.cpf}]",
155
155
  contrato_de_trabalho.nome_do_arquivo_data_identificacao_do_contrato,
@@ -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, Metrics/PerceivedComplexity
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
- ["ideTrab_#{seq}_infoCRIRRF_#{irrf_seq}_infoRRA/ideAdv/tpInsc", irrf['infoRRA/ideAdv/tpInsc']],
72
- ["ideTrab_#{seq}_infoCRIRRF_#{irrf_seq}_infoRRA/ideAdv/nrInsc", irrf['infoRRA/ideAdv/nrInsc']],
73
- ["ideTrab_#{seq}_infoCRIRRF_#{irrf_seq}_infoRRA/ideAdv/vlrAdv", irrf['infoRRA/ideAdv/vlrAdv']],
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}_depDepen_#{deducao_seq}_tpRend", deducao['tpRend']],
77
- ["ideTrab_#{seq}_infoCRIRRF_#{irrf_seq}_depDepen_#{deducao_seq}_cpfDep", deducao['cpfDep']],
78
- ["ideTrab_#{seq}_infoCRIRRF_#{irrf_seq}_depDepen_#{deducao_seq}_vlrDeducao", deducao['vlrDeducao']]
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|
@@ -1,3 +1,3 @@
1
1
  module Teodoro
2
- VERSION = '0.69.4'.freeze
2
+ VERSION = '0.69.6'.freeze
3
3
  end
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
4
+ version: 0.69.6
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-05-26 00:00:00.000000000 Z
11
+ date: 2024-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -151,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
153
  requirements: []
154
- rubygems_version: 3.3.8
154
+ rubygems_version: 3.1.6
155
155
  signing_key:
156
156
  specification_version: 4
157
157
  summary: ''