sticutils 2.1.0 → 2.1.1

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: 7d11917684a5fcdc8f98d0724c97a16aa4c33b690764b4f15205313a297b0599
4
- data.tar.gz: c3dcd5e1bece67ce2e56023d56ce1e585aa922cf67645032e48ce22a69d62159
3
+ metadata.gz: 81652f5712e52d72d71776d3442576f0e84af8f7aaf957f852e9bcb57315aff6
4
+ data.tar.gz: e72320b98d8f435903428baa9257578ab4e9b575d9ed9bc145a2f3330cf8c71a
5
5
  SHA512:
6
- metadata.gz: da5e07e75d266cbb2172985c16f0c442c83fb7820ae59e08280716864ca7a4bdd8161b2337cdf923ac14935a8e5490e005474d321576d173e77efb054d72c9c7
7
- data.tar.gz: b3c17c4e504ba78e2d916308c181ab5c64dd36f51f67d04a245731662d1de3ada3112ded097fc3ffff07685674c955cad40443f05f92ccea1f78e2576473869a
6
+ metadata.gz: fc06929876557da7694c05c7444c7f63a463185949a6f0e5a238290180bbf14423bdcc8e5cc4612fd695655dee4bad973d21ebb21cc39f6899261e76ec10ce01
7
+ data.tar.gz: 49e1af6d082cfb2557509b5199b8880fae8e84e25ff9bff1e6654bce76976298864f359e849b759c842149859221e3b5386d4ee988d0b2fbd0f1e9846ca7158e
@@ -0,0 +1,4 @@
1
+ class Gestorh::Dependente < Gestorh::GestorhRecord
2
+ self.table_name = "gestor_rh.cddependentefolha"
3
+ belongs_to :funcionario, foreign_key: :dpf_matriculatitular, primary_key: :fn_matricula
4
+ end
@@ -1,16 +1,18 @@
1
1
  class Gestorh::FolhaAgrupadaIdSeparado < Gestorh::GestorhRecord
2
- self.table_name = 'public.folhas_agrupadas_gestorh_folha_id_separado'
2
+ self.table_name = "public.folhas_agrupadas_gestorh_folha_id_separado"
3
3
 
4
4
  belongs_to :funcionario, foreign_key: :matricula, primary_key: :fn_matricula
5
5
 
6
6
  belongs_to :vinculo, foreign_key: :mvps_vinculo, primary_key: :vc_codigo
7
7
  belongs_to :funcao, foreign_key: :mvps_funcao, primary_key: :fc_codigo
8
- belongs_to :cargo, foreign_key: :mvps_cargo, primary_key: :fc_codigo, class_name: 'Gestorh::Funcao'
8
+ belongs_to :cargo, foreign_key: :mvps_cargo, primary_key: :fc_codigo, class_name: "Gestorh::Funcao"
9
9
  belongs_to :lotacao, foreign_key: :mvps_reglotacao, primary_key: :lt_registro
10
10
  belongs_to :nivel_salario, foreign_key: :mvps_nivelsalario, primary_key: :ns_registro
11
11
 
12
+ has_many :dependentes, query_constraints: [:dpf_matriculatitular, :dpf_regfolha], primary_key: [:matricula, :folhas]
13
+
12
14
  def liquido_total
13
- self.rendimento_total - self.desconto_total
15
+ rendimento_total - desconto_total
14
16
  end
15
17
 
16
18
  def eventos_e_valores
@@ -32,60 +34,62 @@ class Gestorh::FolhaAgrupadaIdSeparado < Gestorh::GestorhRecord
32
34
  end
33
35
 
34
36
  def remuneracao_paradigma
35
- if Date.new(ano, mes, 1) < Date.new(2013,7,1)
36
- self.eventos_e_valores.select{|x| x.tipo == 'RENDIMENTO_REMUNERACAO' && x.status == 'C'}
37
+ if Date.new(ano, mes, 1) < Date.new(2013, 7, 1)
38
+ eventos_e_valores.select { |x| x.tipo == "RENDIMENTO_REMUNERACAO" && x.status == "C" }
37
39
  else
38
40
  []
39
41
  end
40
42
  end
41
43
 
42
44
  def vantagens_pessoais
43
- self.eventos_e_valores.select{|x| x.tipo == 'RENDIMENTO_VANTAGENS_PESSOAIS' && x.status == 'C'}
45
+ eventos_e_valores.select { |x| x.tipo == "RENDIMENTO_VANTAGENS_PESSOAIS" && x.status == "C" }
44
46
  end
45
47
 
46
48
  def subsidios
47
- if Date.new(ano, mes, 1) < Date.new(2013,7,1)
49
+ if Date.new(ano, mes, 1) < Date.new(2013, 7, 1)
48
50
  []
49
51
  else
50
- self.eventos_e_valores.select{|x| (x.tipo == 'RENDIMENTO_SUBSIDIO_DIFERENCA_FUNCAO' || x.tipo == 'RENDIMENTO_REMUNERACAO') && x.status == 'C'}
52
+ eventos_e_valores.select { |x| (x.tipo == "RENDIMENTO_SUBSIDIO_DIFERENCA_FUNCAO" || x.tipo == "RENDIMENTO_REMUNERACAO") && x.status == "C" }
51
53
  end
52
54
  end
53
55
 
54
56
  def indenizacoes
55
- self.eventos_e_valores.select{|x| x.tipo == 'RENDIMENTO_INDENIZACOES' && x.status == 'C' }
57
+ eventos_e_valores.select { |x| x.tipo == "RENDIMENTO_INDENIZACOES" && x.status == "C" }
56
58
  end
57
59
 
58
60
  def vantagens_eventuais
59
- self.eventos_e_valores.select{|x| x.tipo == 'RENDIMENTO_VANTAGENS_EVENTUAIS' && x.status == 'C'}
61
+ eventos_e_valores.select { |x| x.tipo == "RENDIMENTO_VANTAGENS_EVENTUAIS" && x.status == "C" }
60
62
  end
61
63
 
62
64
  def gratificacoes
63
- self.eventos_e_valores.select{|x| x.tipo == 'RENDIMENTO_GRATIFICACOES' && x.status == 'C'}
65
+ eventos_e_valores.select { |x| x.tipo == "RENDIMENTO_GRATIFICACOES" && x.status == "C" }
64
66
  end
65
67
 
66
68
  # sobrou da show
67
69
  def subsidio_vantagens_pessoais
68
- self.eventos_e_valores.select{|x| x.tipo == 'RENDIMENTO_VANTAGENS_EVENTUAIS' || x.tipo == 'RENDIMENTO_VANTAGENS_PESSOAIS'}
70
+ eventos_e_valores.select { |x| x.tipo == "RENDIMENTO_VANTAGENS_EVENTUAIS" || x.tipo == "RENDIMENTO_VANTAGENS_PESSOAIS" }
69
71
  end
70
72
 
71
73
  def subsidio_vantagens_pessoais_eventuais
72
- self.eventos_e_valores.select{|x| x.tipo == 'RENDIMENTO_SUBSIDIO_DIFERENCA_FUNCAO' ||
73
- x.tipo == 'RENDIMENTO_VANTAGENS_PESSOAIS' || (x.tipo == 'RENDIMENTO_VANTAGENS_EVENTUAIS' && x.status == 'C')}
74
+ eventos_e_valores.select { |x|
75
+ x.tipo == "RENDIMENTO_SUBSIDIO_DIFERENCA_FUNCAO" ||
76
+ x.tipo == "RENDIMENTO_VANTAGENS_PESSOAIS" || (x.tipo == "RENDIMENTO_VANTAGENS_EVENTUAIS" && x.status == "C")
77
+ }
74
78
  end
75
79
 
76
80
  # diarias
77
81
  def diarias
78
- self.daily_rates.where(date: [Date.new(self.ano, self.mes)..Date.new(self.ano, self.mes).at_end_of_month])
82
+ daily_rates.where(date: [Date.new(ano, mes)..Date.new(ano, mes).at_end_of_month])
79
83
  .sum(:pago)
80
84
  end
81
85
 
82
86
  def diarias_positivas
83
- 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])
84
- .sum(:pago)
87
+ daily_rates.where(pago: [0..Float::INFINITY], date: [Date.new(ano, mes)..Date.new(ano, mes).at_end_of_month])
88
+ .sum(:pago)
85
89
  end
86
90
 
87
91
  def diarias_negativas
88
- 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
- .sum(:pago)
92
+ daily_rates.where(pago: [-Float::INFINITY..0], date: [Date.new(ano, mes)..Date.new(ano, mes).at_end_of_month])
93
+ .sum(:pago)
90
94
  end
91
95
  end
@@ -1,3 +1,3 @@
1
1
  module Sticutils
2
- VERSION = "2.1.0"
2
+ VERSION = "2.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sticutils
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ricardo Viana
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2024-07-03 00:00:00.000000000 Z
10
+ date: 2025-04-15 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rails
@@ -68,6 +67,7 @@ files:
68
67
  - app/models/gestorh.rb
69
68
  - app/models/gestorh/banco.rb
70
69
  - app/models/gestorh/classificacao_verba.rb
70
+ - app/models/gestorh/dependente.rb
71
71
  - app/models/gestorh/ferias.rb
72
72
  - app/models/gestorh/folha.rb
73
73
  - app/models/gestorh/folha_agrupada.rb
@@ -260,7 +260,6 @@ homepage: http://gitlab.tjpi.jus.br/
260
260
  licenses:
261
261
  - MIT
262
262
  metadata: {}
263
- post_install_message:
264
263
  rdoc_options: []
265
264
  require_paths:
266
265
  - lib
@@ -275,8 +274,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
275
274
  - !ruby/object:Gem::Version
276
275
  version: '0'
277
276
  requirements: []
278
- rubygems_version: 3.5.14
279
- signing_key:
277
+ rubygems_version: 3.6.5
280
278
  specification_version: 4
281
279
  summary: Utilidades para aplicações rails da STIC
282
280
  test_files: []