sticutils 0.2.9 → 1.0.2

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: ba13dd16d46e2a0ec703f07e2e663a422c7c314797c395458d7324b0b4619ca8
4
- data.tar.gz: 02aeae63260cf66db9a94a87a5fbceb5efcadccc87fc1cb5313be3768b536b1c
3
+ metadata.gz: 778d5218c62fb43b73f98a959aef885b679a77528a79fcc7903e527164041ff4
4
+ data.tar.gz: 642af963287a2d3abebe8bd180322c6ed8c0cc64b18cf4004e7c8186bbf03cf8
5
5
  SHA512:
6
- metadata.gz: a698b73a85eea43cb6ade5b94284e60117ed4ee8b6e29f113f773cd0d8525e6749a21083ac884a66501d4f7460356e62f026d1704bb876e024eb7912c4b2e9ba
7
- data.tar.gz: d34692200d674b65abe1fc944e491a03e0a4f4d92106c88bb7d249b156d62d28d20a555c59695fba4b1462c4101d87fff86c274b8c237a5ee87dcfd92709f3b3
6
+ metadata.gz: e1ed8d6d2318beef3302f748fe21b036f6f07d3ca54bde0649be30611eae49798918d1fec752baabf2425e536287c10f8d6fc34be166229d9761df1c420a06ee
7
+ data.tar.gz: 139e9d1d93a331e0703022a88b93a7cc253cf1daf431c13b42763a5a6b661669022dbf543436b6818395a37a1b7615a4bd1d43446cdfe8a3b91ff510fe39fd1d
@@ -0,0 +1,5 @@
1
+ class Gestorh::ClassificacaoVerba < Gestorh::GestorhRecord
2
+ self.table_name = 'gestor_rh.cdclassificacaoverba'
3
+
4
+ belongs_to :verba, foreign_key: :cv_verba, primary_key: :vb_codigo
5
+ end
@@ -65,19 +65,31 @@ 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
75
- self.daily_rates.where(pago: [0..Float::INFINITY], date: [Date.new(self.ano, self.mes)..Date.new(self.ano, self.mes).at_end_of_month])
81
+ if Object.const_defined?('DailyRate')
82
+ DailyRate.where(cpf: numeric_cpf,
83
+ pago: [0..Float::INFINITY], date: [Date.new(self.ano, self.mes)..Date.new(self.ano, self.mes).at_end_of_month])
76
84
  .sum(:pago)
85
+ end
77
86
  end
78
-
87
+
79
88
  def diarias_negativas
80
- self.daily_rates.where(pago: [-Float::INFINITY..0], date: [Date.new(self.ano, self.mes)..Date.new(self.ano, self.mes).at_end_of_month])
89
+ if Object.const_defined?('DailyRate')
90
+ DailyRate.where(cpf: numeric_cpf,
91
+ pago: [-Float::INFINITY..0], date: [Date.new(self.ano, self.mes)..Date.new(self.ano, self.mes).at_end_of_month])
81
92
  .sum(:pago)
93
+ end
82
94
  end
83
95
  end
@@ -1,3 +1,5 @@
1
1
  class Gestorh::Verba < Gestorh::GestorhRecord
2
2
  self.table_name = 'gestor_rh.cdverba'
3
+
4
+ has_one :classificacao_verba, foreign_key: :cv_verba, primary_key: :vb_codigo
3
5
  end
@@ -1,15 +1,14 @@
1
1
  class Intranet::LegislacaoDocumentocomprobatorio < Intranet::IntranetRecord
2
2
  self.table_name = 'legislacao_documentocomprobatorio'
3
3
 
4
- has_many :ferias_ferias, :class_name => 'FeriasFeria'
5
- has_many :ferias_fracaos, :class_name => 'FeriasFracao'
6
- belongs_to :legislacao_norma, :class_name => 'LegislacaoNorma', :foreign_key => :norma_id
7
- has_many :tjpi_cargo_embasamentos, :class_name => 'TjpiCargoEmbasamento'
8
- has_many :tjpi_carreiras, :class_name => 'TjpiCarreira'
9
- has_many :tjpi_declaracaoprevinculados, :class_name => 'TjpiDeclaracaoprevinculado'
10
- has_many :tjpi_declaracaoprevinculados, :class_name => 'TjpiDeclaracaoprevinculado'
11
- has_many :tjpi_exerciciofuncaos, :class_name => 'TjpiExerciciofuncao'
12
- has_many :tjpi_exerciciofuncaos, :class_name => 'TjpiExerciciofuncao'
13
- has_many :tjpi_funcao_embasamentos, :class_name => 'TjpiFuncaoEmbasamento'
14
- has_many :tjpi_vinculo_documentos, :class_name => 'TjpiVinculoDocumento', :foreign_key => :documentos_id
4
+ has_many :ferias_ferias, class_name: 'FeriasFeria', foreign_key: :documentoComprobatorio_id
5
+ has_many :ferias_fracaos, class_name: 'FeriasFracao', foreign_key: :DocumentoFerias_id
6
+ belongs_to :legislacao_norma, class_name: 'LegislacaoNorma', foreign_key: :norma_id
7
+ has_many :tjpi_cargo_embasamentos, class_name: 'TjpiCargoEmbasamento', foreign_key: :embasamento_id
8
+ has_many :tjpi_carreiras, class_name: 'TjpiCarreira', foreign_key: :documentoComprobatorio_id
9
+ has_many :tjpi_declaracaoprevinculados, class_name: 'TjpiDeclaracaoprevinculado', foreign_key: :comprovante_id
10
+ has_many :tjpi_exerciciofuncaos, class_name: 'TjpiExerciciofuncao', foreign_key: :documentoNomeacao_id
11
+ has_many :tjpi_exerciciofuncaos, class_name: 'TjpiExerciciofuncao', foreign_key: :documentoExoneracao_id
12
+ has_many :tjpi_funcao_embasamentos, class_name: 'TjpiFuncaoEmbasamento', foreign_key: :embasamento_id
13
+ has_many :tjpi_vinculo_documentos, class_name: 'TjpiVinculoDocumento', foreign_key: :documentos_id
15
14
  end
@@ -2,5 +2,4 @@ class Intranet::TjpiCampodeclaracaoprevinculado < Intranet::IntranetRecord
2
2
  self.table_name = 'tjpi_campodeclaracaoprevinculado'
3
3
 
4
4
  belongs_to :tjpi_declaracaoprevinculado, :class_name => 'TjpiDeclaracaoprevinculado', :foreign_key => :declaracao_id
5
- belongs_to :tjpi_declaracaoprevinculado, :class_name => 'TjpiDeclaracaoprevinculado', :foreign_key => :declaracao_id
6
5
  end
@@ -1,9 +1,7 @@
1
1
  class Intranet::TjpiDeclaracaoprevinculado < Intranet::IntranetRecord
2
2
  self.table_name = 'tjpi_declaracaoprevinculado'
3
3
 
4
- has_many :tjpi_campodeclaracaoprevinculados, :class_name => 'TjpiCampodeclaracaoprevinculado'
5
- has_many :tjpi_campodeclaracaoprevinculados, :class_name => 'TjpiCampodeclaracaoprevinculado'
6
- belongs_to :legislacao_documentocomprobatorio, :class_name => 'LegislacaoDocumentocomprobatorio', :foreign_key => :comprovante_id
7
- belongs_to :legislacao_documentocomprobatorio, :class_name => 'LegislacaoDocumentocomprobatorio', :foreign_key => :comprovante_id
8
- has_many :tjpi_previnculado_declaracoes, :class_name => 'TjpiPrevinculadoDeclaraco'
4
+ has_many :tjpi_campodeclaracaoprevinculados, :class_name => 'TjpiCampodeclaracaoprevinculado', foreign_key: :declaracao_id
5
+ belongs_to :legislacao_documentocomprobatorio, :class_name => 'LegislacaoDocumentocomprobatorio', foreign_key: :comprovante_id
6
+ has_many :tjpi_previnculado_declaracoes, :class_name => 'TjpiPrevinculadoDeclaracao', foreign_key: :declaracoes_id
9
7
  end
@@ -1,6 +1,6 @@
1
1
  class Intranet::TjpiFuncaoEmbasamento < Intranet::IntranetRecord
2
2
  self.table_name = 'tjpi_funcao_embasamento'
3
3
 
4
- belongs_to :legislacao_documentocomprobatorio, :class_name => 'LegislacaoDocumentocomprobatorio', :foreign_key => :embasamento_id
5
- belongs_to :tjpi_funcao, :class_name => 'TjpiFuncao', :foreign_key => :funcao_id
4
+ belongs_to :legislacao_documentocomprobatorio, :class_name => 'LegislacaoDocumentocomprobatorio', foreign_key: :embasamento_id
5
+ belongs_to :tjpi_funcao, :class_name => 'TjpiFuncao', foreign_key: :funcao_id
6
6
  end
@@ -12,7 +12,7 @@ class Intranet::TjpiPrevinculado < Intranet::IntranetRecord
12
12
  has_many :tjpi_vinculados, :class_name => 'TjpiVinculado'
13
13
  has_many :tjpi_vinculos, :class_name => 'TjpiVinculo'
14
14
 
15
- has_many :tjpi_previnculado_declaracoes, class_name: 'TjpiPrevinculadoDeclaraco', foreign_key: :preVinculado_id
15
+ has_many :tjpi_previnculado_declaracoes, class_name: 'TjpiPrevinculadoDeclaracao', foreign_key: :preVinculado_id
16
16
  belongs_to :tjpi_previnculadointervencao_ultima, class_name: 'TjpiPrevinculadointervencao', foreign_key: :intervencao_id
17
17
  belongs_to :tjpi_previnculadointervencao_anterior, class_name: 'TjpiPrevinculadointervencao', foreign_key: :anterior_id
18
18
  has_many :tjpi_previnculadointervencoes, class_name: 'TjpiPrevinculadointervencao', foreign_key: :preVinculado_id
@@ -1,4 +1,4 @@
1
- class Intranet::TjpiPrevinculadoDeclaraco < Intranet::IntranetRecord
1
+ class Intranet::TjpiPrevinculadoDeclaracao < Intranet::IntranetRecord
2
2
  self.table_name = 'tjpi_previnculado_declaracoes'
3
3
 
4
4
  belongs_to :tjpi_previnculado, :class_name => 'TjpiPrevinculado', :foreign_key => :preVinculado_id
@@ -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.2.9"
2
+ VERSION = "1.0.2"
3
3
  end
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
30
30
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
31
31
  spec.require_paths = ["lib"]
32
32
 
33
- spec.add_dependency 'rails', '~> 5.0'
33
+ spec.add_dependency 'rails', '~> 6.0'
34
34
 
35
35
  spec.add_development_dependency "bundler", "~> 1.16"
36
36
  spec.add_development_dependency "rake", "~> 10.0"
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.2.9
4
+ version: 1.0.2
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-07 00:00:00.000000000 Z
11
+ date: 2020-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '5.0'
19
+ version: '6.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '5.0'
26
+ version: '6.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -67,6 +67,7 @@ files:
67
67
  - Rakefile
68
68
  - app/models/gestorh.rb
69
69
  - app/models/gestorh/banco.rb
70
+ - app/models/gestorh/classificacao_verba.rb
70
71
  - app/models/gestorh/folha.rb
71
72
  - app/models/gestorh/folha_agrupada.rb
72
73
  - app/models/gestorh/folha_agrupada_id_separado.rb
@@ -206,7 +207,7 @@ files:
206
207
  - app/models/intranet/tjpi_predependente.rb
207
208
  - app/models/intranet/tjpi_previnculado.rb
208
209
  - app/models/intranet/tjpi_previnculado_anexo.rb
209
- - app/models/intranet/tjpi_previnculado_declaraco.rb
210
+ - app/models/intranet/tjpi_previnculado_declaracao.rb
210
211
  - app/models/intranet/tjpi_previnculado_manifestaco.rb
211
212
  - app/models/intranet/tjpi_previnculadointervencao.rb
212
213
  - app/models/intranet/tjpi_previnculadopendencium.rb