sticutils 1.0.6 → 1.4.0

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: d4df4ff63dd990c48d4022e44c7dda0c8197a974e2a354f5e7ce082c3358c227
4
- data.tar.gz: 628a666fc385409e2ced846264a866b3ca4141554b2e5c1afc656e26522ce2cf
3
+ metadata.gz: 3407eeffb328dacf6769505456923db576f3be18b7741cb9a051504455764b40
4
+ data.tar.gz: 47264381861cf5477e1aa1863227b7bbb5aa223441701fded41727321a3e0a55
5
5
  SHA512:
6
- metadata.gz: d74fa4ae4aceba578b589264dbdfae90a709f7075605690c82ec76170d7a3871e6cbf1a8c88ac8d90ca6d815046b068772dbd1dfe0235f84802801bcf93d6908
7
- data.tar.gz: 319fe3b415864ba932ec16af5cb23f2a12010c30e1464aa90f0f7979e9ca40b65ad54c21b4c36d4e503b922cd20f607eea2e6c1a63b51b4b551b213547b6b0b8
6
+ metadata.gz: 9d42edd0652fae198ecb97fa7d3234ba0186ada044933df4321c85e6e5989bd111868d9f53f5b66e60ed45563e9868e0386dd1d90836a3f018dde587054fe7dd
7
+ data.tar.gz: 3e61304e7405208a6508baa199a716fa5473f69884f4eb8b33ffdf522ce73ccbe0aa75bf5944a5f237f84b739ea6f20f7b10ca70c2f67ab144f063dacf11814e
@@ -0,0 +1,4 @@
1
+ class Gestorh::Ferias < Gestorh::GestorhRecord
2
+ self.table_name = 'gestor_rh.cdferias'
3
+ belongs_to :funcionario, foreign_key: :fe_matricula, primary_key: :fn_matricula
4
+ end
@@ -75,14 +75,14 @@ class Gestorh::FolhaAgrupada < Gestorh::GestorhRecord
75
75
  # diarias
76
76
  def diarias
77
77
  if Object.const_defined?('DailyRate')
78
- DailyRate.where(cpf: numeric_cpf, date: [Date.new(self.ano, self.mes)..Date.new(self.ano, self.mes).at_end_of_month])
78
+ DailyRate.where(cpf: [cpf, numeric_cpf], date: [Date.new(self.ano, self.mes)..Date.new(self.ano, self.mes).at_end_of_month])
79
79
  .sum(:pago)
80
80
  end
81
81
  end
82
82
 
83
83
  def diarias_positivas
84
84
  if Object.const_defined?('DailyRate')
85
- DailyRate.where(cpf: numeric_cpf,
85
+ DailyRate.where(cpf: [cpf, numeric_cpf],
86
86
  pago: [0..Float::INFINITY], date: [Date.new(self.ano, self.mes)..Date.new(self.ano, self.mes).at_end_of_month])
87
87
  .sum(:pago)
88
88
  end
@@ -90,7 +90,7 @@ class Gestorh::FolhaAgrupada < Gestorh::GestorhRecord
90
90
 
91
91
  def diarias_negativas
92
92
  if Object.const_defined?('DailyRate')
93
- DailyRate.where(cpf: numeric_cpf,
93
+ DailyRate.where(cpf: [cpf, numeric_cpf],
94
94
  pago: [-Float::INFINITY..0], date: [Date.new(self.ano, self.mes)..Date.new(self.ano, self.mes).at_end_of_month])
95
95
  .sum(:pago)
96
96
  end
@@ -4,4 +4,5 @@ class Gestorh::Funcionario < Gestorh::GestorhRecord
4
4
  has_many :movimento_acumulados, foreign_key: :mv_matricula, primary_key: :fn_matricula
5
5
  has_many :folhas, through: :movimento_acumulados
6
6
  has_many :ferias, foreign_key: :fe_matricula, primary_key: :fn_matricula, class_name: 'Gestorh::Ferias'
7
+ belongs_to :vinculo, foreign_key: :fn_vinculo
7
8
  end
@@ -1,3 +1,5 @@
1
1
  class Gestorh::Vinculo < Gestorh::GestorhRecord
2
2
  self.table_name = 'gestor_rh.cdvinculo'
3
+
4
+ has_many :funcionarios, foreign_key: :fn_vinculo
3
5
  end
@@ -35,4 +35,6 @@ class Intranet::GlobalOrgao < Intranet::IntranetRecord
35
35
  has_many :tjpi_vinculos_ensino, :class_name => 'TjpiVinculo', foreign_key: :instituicaoDeEnsino_id
36
36
  has_many :tjpi_vinculos_atuais, :class_name => 'TjpiVinculo', foreign_key: :lotacaoAtual_id
37
37
  has_many :tjpi_vinculos_origem, :class_name => 'TjpiVinculo', foreign_key: :orgaoOrigem_id
38
+
39
+ has_many :global_contatos, through: :global_orgao_contatos
38
40
  end
@@ -1,3 +1,3 @@
1
1
  module Sticutils
2
- VERSION = "1.0.6"
2
+ VERSION = "1.4.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sticutils
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ricardo Viana
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-24 00:00:00.000000000 Z
11
+ date: 2021-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -68,6 +68,7 @@ files:
68
68
  - app/models/gestorh.rb
69
69
  - app/models/gestorh/banco.rb
70
70
  - app/models/gestorh/classificacao_verba.rb
71
+ - app/models/gestorh/ferias.rb
71
72
  - app/models/gestorh/folha.rb
72
73
  - app/models/gestorh/folha_agrupada.rb
73
74
  - app/models/gestorh/folha_agrupada_id_separado.rb
@@ -265,7 +266,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
265
266
  - !ruby/object:Gem::Version
266
267
  version: '0'
267
268
  requirements: []
268
- rubygems_version: 3.0.3
269
+ rubygems_version: 3.1.6
269
270
  signing_key:
270
271
  specification_version: 4
271
272
  summary: Utilidades para aplicações rails da STIC