teodoro 0.20.0 → 0.21.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b0711c726cf30a674a566c3be017b6e7b34f833731f2bd94b32bd52a29050a79
4
- data.tar.gz: d3972075c53b9d904449854a8eed94827c2b2721d0259804a9ed4e42fb70b8f7
3
+ metadata.gz: 7f6d1cb72b2f2d9ba141e62ea0d5d1195ecc3e7e10ef974a4e666efc5d52311c
4
+ data.tar.gz: cd199f34ea509baf467dae352949e7af8bf2e395724392ada7277efae4b5c349
5
5
  SHA512:
6
- metadata.gz: 614a7a3ce3a0a1c803b9486fc5939119e3b660c8a97865e4b65280e33a6f9053195c5770bcf385d05c42a854f6153304ff9a0750e1ae947b8e8188557e3603de
7
- data.tar.gz: 653f5270a7229c5340c05d52a6772c7af798c651ac027018a522a4d1f5907d7ebddc48e599e0b39e0d03c33f0ff1330ee5a8a9326f80ff1ef4a0ac1efdca2764
6
+ metadata.gz: f66632a17de07360b7d6157656a2dc1e25634d9088638b9ed64c7a763871709ebe0cbfbfa64e5d3c2f8ab2cea7295e3024f7a680abb71b68f6eb09cc0add8885
7
+ data.tar.gz: '09e2a64099c45fd66c1c089f8ed8b3d22cc5a46fc7c076eff4089998f613aad8d72d6e5c90d90f9a7e45f2ac924e414e5c7682122412837bdc4b863f6406e9b9'
data/lib/teodoro.rb CHANGED
@@ -12,7 +12,7 @@ require_relative 'teodoro/empresa'
12
12
  require_relative 'teodoro/obj'
13
13
 
14
14
  module Teodoro
15
- VERSION = '0.20.0'.freeze
15
+ VERSION = '0.21.0'.freeze
16
16
 
17
17
  CBOs = __FILE__
18
18
  .then { File.dirname(_1) }
@@ -37,8 +37,8 @@ module Teodoro
37
37
  ['FimValidade', fim_da_validade, :mes_ano],
38
38
  ['TipoCaepf', evento['infoEstab/*/dadosEstab/infoCaepf/tpCaepf']],
39
39
  ['CnaePreponderanteCodigoDescricaoAutoComplete'],
40
- ['CnaePreponderante', evento['infoEstab/*/dadosEstab/cnaePrep']],
41
- ['CnaePreponderantePreenchido'],
40
+ ['CnaePreponderante', cnae_preponderante],
41
+ ['CnaePreponderantePreenchido', cnae_preponderante],
42
42
  ['AliquotaRat', evento['infoEstab/*/dadosEstab/aliqGilrat/aliqRat']],
43
43
  ['Fap', evento['infoEstab/*/dadosEstab/aliqGilrat/fap'], :decimal],
44
44
  ['AliquotaRatAjustada', evento['infoEstab/*/dadosEstab/aliqGilrat/aliqRatAjust'], :decimal],
@@ -58,6 +58,10 @@ module Teodoro
58
58
  ['VerProc', versao_do_processo_de_emissao_do_evento]
59
59
  ]
60
60
  end
61
+
62
+ def cnae_preponderante
63
+ @cnae_preponderante ||= evento['infoEstab/*/dadosEstab/cnaePrep']
64
+ end
61
65
  end
62
66
  end
63
67
  end
@@ -44,8 +44,8 @@ module Teodoro
44
44
  de_acordo_com_a_versao_do_leiaute['DadosRubrica_CodigoIncidenciaIR'],
45
45
  ['DadosRubrica_CodigoIncidenciaFGTS', evento['infoRubrica/*/dadosRubrica/codIncFGTS']],
46
46
  ['DadosRubrica_CodigoIncidenciaSindical', evento['infoRubrica/*/dadosRubrica/codIncSIND']],
47
- ['IdEventoXml'],
48
- ['NrReciboEventoOriginal'],
47
+ ['IdEventoXml', id_do_evento],
48
+ ['NrReciboEventoOriginal', numero_do_recibo],
49
49
  ['DescricaoProcEmi', processo_de_emissao_do_evento],
50
50
  ['VerProc', versao_do_processo_de_emissao_do_evento],
51
51
  ['hd_ProcessoFGTS'],
@@ -32,8 +32,8 @@ module Teodoro
32
32
  ['DadosFuncao_CodigoCBO', evento['infoFuncao/*/dadosFuncao/codCBO']],
33
33
  ['DadosFuncao_CodigoCBO_TEXT'],
34
34
  ['DadosFuncao_DescricaoCBO'],
35
- ['IdEventoXml'],
36
- ['NrReciboEventoOriginal'],
35
+ ['IdEventoXml', id_do_evento],
36
+ ['NrReciboEventoOriginal', numero_do_recibo],
37
37
  ['DescricaoProcEmi', processo_de_emissao_do_evento],
38
38
  ['VerProc', versao_do_processo_de_emissao_do_evento]
39
39
  ]
@@ -46,8 +46,8 @@ module Teodoro
46
46
  ['InfoSuspensaoTela_IndicativoDeposito'],
47
47
  ['temItemInformacaoSuspensao'],
48
48
  ['commandArgument'],
49
- ['IdEventoXml'],
50
- ['NrReciboEventoOriginal'],
49
+ ['IdEventoXml', id_do_evento],
50
+ ['NrReciboEventoOriginal', numero_do_recibo],
51
51
  ['DescricaoProcEmi', processo_de_emissao_do_evento],
52
52
  ['VerProc', versao_do_processo_de_emissao_do_evento],
53
53
  ['IdEdicaoInfoSusp'],
@@ -15,7 +15,7 @@ module Teodoro
15
15
  ['Nome'],
16
16
  ['DataNascimento', evento['infoRegPrelim/dtNascto'], :data],
17
17
  ['DataAdmissao', evento['infoRegPrelim/dtAdm'], :data],
18
- ['IdEvento']
18
+ ['IdEvento', id_do_evento]
19
19
  ]
20
20
  )
21
21
  ]
@@ -117,7 +117,7 @@ module Teodoro
117
117
  # rubocop:disable Layout/LineLength
118
118
  ['ESX_CPF', cpf_do_trabalhador],
119
119
  ['ESX_MATRICULA', matricula_do_trabalhador],
120
- ['ESX_DATAADMISSAO'],
120
+ ['ESX_DATAADMISSAO', empregado? ? data_de_admissao : data_de_inicio_do_contrato_de_trabalho, :data],
121
121
  %w[ESX_SEMVINCULO 0],
122
122
  ['ESX_INICIO', data_de_inicio_do_afastamento, :data_aaaammdd],
123
123
  (['ESX_TERMINO', data_de_termino_do_afastamento, :data_aaaammdd] if termino_do_afastamento?),
@@ -137,8 +137,8 @@ module Teodoro
137
137
  ['CodMotivoAfastamentoRetif'],
138
138
  ['TipoEventoCadastro'],
139
139
  ['IdEventoAfastamento'],
140
- (['DataFim'] if termino_do_afastamento?),
141
- ['DataInicio'],
140
+ (['DataFim', data_de_termino_do_afastamento, :data] if termino_do_afastamento?),
141
+ ['DataInicio', data_de_inicio_do_afastamento, :data],
142
142
  ['CodigoMotivo', codigo_do_motivo_de_afastamento],
143
143
  ['Motivo'],
144
144
  ['ExibirBotoes'],
@@ -50,7 +50,7 @@ module Teodoro
50
50
  ['ESX_CPF', cpf_do_trabalhador],
51
51
  ['ESX_MATRICULA', matricula_do_trabalhador],
52
52
  %w[ESX_SEMVINCULO 0],
53
- ['ESX_DATAADMISSAO'],
53
+ ['ESX_DATAADMISSAO', data_de_admissao, :data],
54
54
  ['ESX_DATADESLIGAMENTO', data_de_desligamento, :data],
55
55
  ['ESX_INFOWEB_RESCISAO_IDEDMDEV', identificador_do_demonstrativo],
56
56
  ['ESX_INFOWEB_RESCISAO_RECIBO', numero_do_recibo],
@@ -56,7 +56,7 @@ module Teodoro
56
56
  ['ESX_CATEGORIA', categoria_do_trabalhador],
57
57
  %w[ESX_SEMVINCULO 1],
58
58
  ['ESX_DATAADMISSAO', data_de_inicio, :data],
59
- ['IdEventoXml'],
59
+ ['IdEventoXml', id_do_evento],
60
60
  ['NrReciboEventoOriginal'],
61
61
  ['EventoAdmissao_NrRecibo'],
62
62
  ['EventoAdmissao_InformacoesInicio_IndicativoCadastramentoInicial', evento['infoTSVInicio/cadIni']],
@@ -34,8 +34,8 @@ module Teodoro
34
34
  ['TipoPlano'],
35
35
  ['JustificativaProrrogacao'],
36
36
  ['MotivoAlteracao'],
37
- ['IdEventoXml'],
38
- ['NrReciboEventoOriginal'],
37
+ ['IdEventoXml', id_do_evento],
38
+ ['NrReciboEventoOriginal', numero_do_recibo],
39
39
  ['UrlRetorno'],
40
40
  ['idContrato'],
41
41
  ['SomenteLeitura'],
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: teodoro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.0
4
+ version: 0.21.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Clavius Tales