sticutils 0.3.0 → 0.3.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: 6a140877c20d6d2895095a96b365f3b4fc1e7e209c6582702e504fc367f04784
4
- data.tar.gz: f4399eb9a412b83aa059e5c8b881d319bcb86dc40d4afca3c439cc3b8e5cd1e6
3
+ metadata.gz: 9685a388dbf49b4183b5e8498f66c88637c93265c8f5e2dd4d64d1b529a2d22b
4
+ data.tar.gz: 410f2e22828e4169e986951bcb053119f709bb95e481fcf1ea13c983340bf78b
5
5
  SHA512:
6
- metadata.gz: 8cb9bf385e60ef4f1c6825210f95161f40c30310a1047f00655640f943e99121d54e1618dd903e5371cc2b7a6c217c86d3c8d87d73dcf7bc51e9f911913d0ffd
7
- data.tar.gz: b225de798d99c4b13a26450a33a29753e7c570cd09dbf50f36a9167a642b281bae57423fc851c3c7b4bff2341b51a52cf8d3b5df5052ba4fb4e78fbf66c53c51
6
+ metadata.gz: cbf2d7be030c980e7d8eee96f73754c0fb8077d2be75a45aafcb752736cd206efc7bfc68dfd3f70a2c35ce27d41510842446a2d99db7c7a050eafaeabcd3bd9a
7
+ data.tar.gz: f4838559e41529c83383a8a4b2c8f1fb0fb9857f58438c2fe62a75f49d84ac0a4e4cc7c0f567291741504df0b5a1c28842a4ecb92cba730145bb8508651615d2
@@ -65,10 +65,16 @@ class Gestorh::FolhaAgrupada < Gestorh::GestorhRecord
65
65
  x.tipo == 'RENDIMENTO_VANTAGENS_PESSOAIS' || (x.tipo == 'RENDIMENTO_VANTAGENS_EVENTUAIS' && x.status == 'C')}
66
66
  end
67
67
 
68
+ def subsidio_com_gratificacao
69
+ self.subsidios.pluck(:valor).sum
70
+ end
71
+
68
72
  # diarias
69
73
  def diarias
70
- self.daily_rates.where(date: [Date.new(self.ano, self.mes)..Date.new(self.ano, self.mes).at_end_of_month])
71
- .sum(:pago)
74
+ if Object.const_defined?('DailyRate')
75
+ DailyRate.where(cpf: numeric_cpf, date: [Date.new(self.ano, self.mes)..Date.new(self.ano, self.mes).at_end_of_month])
76
+ .sum(:pago)
77
+ end
72
78
  end
73
79
 
74
80
  def diarias_positivas
@@ -9,10 +9,8 @@ class Intranet::TjpiVinculo < Intranet::IntranetRecord
9
9
  has_many :tjpi_exerciciofuncaos, :class_name => 'TjpiExerciciofuncao', :foreign_key => :vinculo_id
10
10
  has_many :tjpi_exerciciolotacaos, :class_name => 'TjpiExerciciolotacao'
11
11
  has_many :tjpi_gestorexcepcionals, :class_name => 'TjpiGestorexcepcional'
12
- has_many :tjpi_previnculados, :class_name => 'TjpiPrevinculado'
13
12
  has_many :tjpi_progressaocarreiras, :class_name => 'TjpiProgressaocarreira'
14
13
  has_many :tjpi_vinculados, :class_name => 'TjpiVinculado'
15
- belongs_to :tjpi_previnculado, :class_name => 'TjpiPrevinculado', :foreign_key => :cadastro_id
16
14
  belongs_to :tjpi_cargo, :class_name => 'TjpiCargo', :foreign_key => :cargo_id
17
15
  belongs_to :tjpi_terceirizacao_contrato, :class_name => 'TjpiTerceirizacaoContrato', :foreign_key => :contratoTerceirizacao_id
18
16
  belongs_to :tjpi_areaestagio, :class_name => 'TjpiAreaestagio', :foreign_key => :areaEstagio_id
@@ -35,6 +33,9 @@ class Intranet::TjpiVinculo < Intranet::IntranetRecord
35
33
  belongs_to :procurador, class_name: 'GlobalPrepessoafisica', foreign_key: :procurador_id
36
34
  belongs_to :conta_bancaria, class_name: 'GlobalContabancaria', foreign_key: :contaBancaria_id
37
35
 
36
+ has_many :tjpi_previnculados, class_name: 'TjpiPrevinculado'
37
+ belongs_to :tjpi_previnculado, class_name: 'TjpiPrevinculado', foreign_key: :cadastro_id
38
+
38
39
  has_many :tjpi_contrachequeagrupados, class_name: "TjpiContrachequeagrupado", foreign_key: :matricula, primary_key: :matricula
39
40
  has_many :tjpi_contrachequelegados, class_name: "TjpiContrachequelegado", foreign_key: :matricula, primary_key: :matricula
40
41
  end
@@ -1,3 +1,3 @@
1
1
  module Sticutils
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
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: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ricardo Viana
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-11-08 00:00:00.000000000 Z
11
+ date: 2020-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails