teodoro 0.57.0 → 0.57.1

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: 56a0a9ea08c727e51af1ad7ab25e85f6f44d242d3e56df6546c20af507a3a30b
4
- data.tar.gz: 2be796ade8a85a2cfb60d5bd481dd6001334bccb74cc60a6d23270d050c602ea
3
+ metadata.gz: 880e4d79d6fc127eecb7e93ed8ccfad69f6e467c5505cb1a0924cc65a55e2ae5
4
+ data.tar.gz: a5a886c7cfc931ed1ed2177015a7f40ca55c975432f437ccf6bbee2609444ff6
5
5
  SHA512:
6
- metadata.gz: b4656a0a0368f47fc95fa17ac979dcdd3713e10215483d2f128d94a30390994bb367e47450936bf038e804bbbb3186db22b011d9a6f7422803f76b5ea870f718
7
- data.tar.gz: 8405d84219846d91dd01a98436b7cb6b61d16656e0a3295a63b825556ce0c5fc3ee1eaf1bdb48eef5af6167ad8ce693209c0efab8e83fe4b826a23e5a952be23
6
+ metadata.gz: 2622f92fe7db10ca9fd630a7621a2db8cc54da64330d30c6d0e2dfa4480d26032be9c6892e2c31bf8b6709341313ca49f0cba39e75b70fd13d37f5bed1651285
7
+ data.tar.gz: cd825b593a05f90e5af026ad03be1b48fa207a24c69581c8c5218a9ab21c9b428e6e23df5e4c6179c5d5408b022d93f2756b8df141c2a0faa9e8a829e151cd0d
@@ -8,8 +8,7 @@ module Teodoro
8
8
  if retificado?
9
9
  processar_retificacao
10
10
  else
11
- registrar_arquivos_data
12
- salvar_arquivos_data
11
+ processar_inclusao
13
12
  end
14
13
  end
15
14
 
@@ -35,6 +34,11 @@ module Teodoro
35
34
  arquivo_xml_de_retificacao.processar
36
35
  end
37
36
 
37
+ def processar_inclusao
38
+ registrar_arquivos_data
39
+ salvar_arquivos_data
40
+ end
41
+
38
42
  def registrar_arquivos_data
39
43
  arquivos_data.each do |arquivo_data|
40
44
  empresa.arquivos_data.registrar(
@@ -5,6 +5,19 @@ module Teodoro
5
5
 
6
6
  private
7
7
 
8
+ def processar_inclusao
9
+ validar_existencia_do_contrato_de_trabalho if leiaute_simplificado?
10
+
11
+ super
12
+ end
13
+
14
+ def validar_existencia_do_contrato_de_trabalho
15
+ return if empresa.trabalhadores[cpf_do_trabalhador]
16
+
17
+ puts '', Rainbow('Erro! Evento de início de contrato de trabalho inexistente.').red
18
+ exit
19
+ end
20
+
8
21
  def salvar_arquivos_data
9
22
  super
10
23
 
@@ -1,3 +1,3 @@
1
1
  module Teodoro
2
- VERSION = '0.57.0'.freeze
2
+ VERSION = '0.57.1'.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.57.0
4
+ version: 0.57.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fortes Tecnologia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-14 00:00:00.000000000 Z
11
+ date: 2023-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri