teodoro 0.40.3 → 0.41.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: 29ec7f364493911d10565a2501b275843a19f6bd18a345d96ad595a2c02fa615
4
- data.tar.gz: 1962eedd713cf5d5d0402fecfd675ee95f93047914625e358d578396320555ac
3
+ metadata.gz: 0306567351770b2d4d6868a6e34f04876852d469bb9dde794d738149504a9833
4
+ data.tar.gz: b2f8e523645bb854c826f7cafe4dca306d786b5c1a61750f3c90426e823ae768
5
5
  SHA512:
6
- metadata.gz: c850788fc616fc813fbdd3659026cdfb057afa316c21bc61e4d32b0a79e03bf2b50d0a258cfad904ba6a2c1cb8dc02b53552c8a102dc2320bfd8dea41c83f614
7
- data.tar.gz: a822530efec002f1147d9313801dfb1aa657e1b269e924e70dfd6c5ce01dacab147a4472044b6043fa78df7a6274ea7313d60f5d9bd707ce84429291b5cda100
6
+ metadata.gz: 8aca39763cb2ab2c49de94eea5b7088c538eebbb85bfb43e23253064c49d939bb4b2d9ee0b7f6d61c3d55b540765ebd2a7512acb8a06329b171b577e729e282d
7
+ data.tar.gz: 972cd08e24427a183a9b9419b6b0ec93f533248fb728ef7b22a82dd24ea1ae432ec0e14dadce1ae6a7cee737545aa7a87f81da032a97f88cf0b09c0935198d95
@@ -73,7 +73,7 @@ module Teodoro
73
73
  data_aaaammdd: proc { _1.delete('-') if _1 },
74
74
  decimal: proc { _1.tr('.', ',') if _1 },
75
75
  mes_ano: proc { "#{_1[-2..]}/#{_1[0..3]}" if _1 },
76
- vazio: proc { nil }
76
+ vazio: proc {}
77
77
  }.freeze
78
78
 
79
79
  private
@@ -395,7 +395,24 @@ module Teodoro
395
395
  end
396
396
 
397
397
  def opcao_pelo_fgts
398
- @opcao_pelo_fgts ||= evento['vinculo/infoRegimeTrab/infoCeletista/FGTS'] ? 1 : 2
398
+ @opcao_pelo_fgts ||= optante_pelo_fgts? ? 1 : 2
399
+ end
400
+
401
+ def optante_pelo_fgts?
402
+ data_de_admissao >= (empregado_domestico? ? '2015-10-01' : '1988-10-05') ||
403
+ evento['vinculo/infoRegimeTrab/infoCeletista/FGTS']
404
+ end
405
+
406
+ def data_de_admissao
407
+ evento['vinculo/infoRegimeTrab/infoCeletista/dtAdm']
408
+ end
409
+
410
+ def empregado_domestico?
411
+ categoria_do_trabalhador == '104'
412
+ end
413
+
414
+ def categoria_do_trabalhador
415
+ evento['vinculo/infoContrato/codCateg']
399
416
  end
400
417
 
401
418
  def data_de_opcao_pelo_fgts
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.40.3'.freeze
15
+ VERSION = '0.41.0'.freeze
16
16
 
17
17
  CBOs = __FILE__
18
18
  .then { File.dirname(_1) }
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.40.3
4
+ version: 0.41.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Clavius Tales
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-14 00:00:00.000000000 Z
11
+ date: 2021-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri