sticutils 2.1.2 → 3.0.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: 23f6b3b69b60d4f154d3c6ec1dec5f5239b0eda384d4b51a1f4689f04a2581ef
4
- data.tar.gz: 730663c9f7643fc6fee19bd63e3ce526bf6222bc09564325a2f8fec40736a3d4
3
+ metadata.gz: d8bc0c743041a950b23004d3f5ab935714011a02b21ca99ffbbce4e9b8be6009
4
+ data.tar.gz: 635be2d9fce0353150d8cc1ee547412d227ab6913cb9842e17ac6db741213bab
5
5
  SHA512:
6
- metadata.gz: c36aa41471a6da09f5204b34377c07fb2bb150c5173c9a983ed61bf0ad7940d32436cd1a45b9284d9c495360547604ee96febfe9a1e5cf923bee1c7bf0bfea00
7
- data.tar.gz: 9604df92c4ef449eeb9603c842e1e58576072e15710056f7be7d5a21c95220e668db6b6cb78052ca8b049416e3aeadc8b0c223ae3e10ecacadac747d96e98d0f
6
+ metadata.gz: 25354d8c1d6de8b30031c726a337918257d730ed4e7a6a0d99274037462457bb4c51b8be6db4194dc62c7aa45be4cf66f5d9a1d69cc68e60e24744b6f70a4ea9
7
+ data.tar.gz: 0d7a85af849c5b58abbac353072f516cc6a27db802cb668658eaa2c03ba7c9c12f8b0688cf80e10d1ea1a0a447d3d4f86324d4d034e55ac6d1a5e84ea4facfc4
data/README.md CHANGED
@@ -4,6 +4,12 @@ Welcome to your new gem! In this directory, you'll find the files you need to be
4
4
 
5
5
  TODO: Delete this and the text above, and describe your gem
6
6
 
7
+ ## Requisitos
8
+
9
+ - **Rails >= 7.2** (o `has_many :dependentes` de `Gestorh::FolhaAgrupadaIdSeparado`
10
+ usa `foreign_key:` com array, API aceita a partir do Rails 7.2 e obrigatória no
11
+ Rails 8+, onde `query_constraints:` foi removido das associações).
12
+
7
13
  ## Installation
8
14
 
9
15
  Add this line to your application's Gemfile:
@@ -9,7 +9,7 @@ class Gestorh::FolhaAgrupadaIdSeparado < Gestorh::GestorhRecord
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]
12
+ has_many :dependentes, foreign_key: [:dpf_matriculatitular, :dpf_regfolha], primary_key: [:matricula, :folhas]
13
13
 
14
14
  def liquido_total
15
15
  rendimento_total - desconto_total
@@ -18,11 +18,17 @@ class Gestorh::FolhaAgrupadaIdSeparado < Gestorh::GestorhRecord
18
18
  def eventos_e_valores
19
19
  # .where.not('cdclassificacaoverba.cv_classificacao': 'DESCONTO_PREVIDENCIA_PUBLICA_IAPEP')
20
20
  Gestorh::MovimentoAcumulado.where(mv_regfolha: folhas, mv_matricula: matricula)
21
+ # CDVERBA LEFT JOIN CDTRU: verbas sem TRU (vb_tru nulo) devem permanecer
22
+ # na lista com codigo_tru/nome_tru nulos. O :tru entra como LEFT OUTER JOIN,
23
+ # enquanto :classificacao_verba continua INNER.
21
24
  .joins(verba: :classificacao_verba)
25
+ .left_outer_joins(verba: :tru)
22
26
  .select("mv_regfolha as folha_id",
23
27
  "mv_verba as codigo_evento",
28
+ "tru_codigo as codigo_tru",
24
29
  "mv_referencia as fator",
25
30
  "cdverba.vb_nome as nome_evento",
31
+ "tru_nome as nome_tru",
26
32
  "mv_dc as status",
27
33
  "mv_total as valor",
28
34
  "cdclassificacaoverba.cv_classificacao as tipo",
@@ -0,0 +1,5 @@
1
+ class Gestorh::Tru < Gestorh::GestorhRecord
2
+ self.table_name = 'gestor_rh.cdtru'
3
+
4
+ has_many :verbas, foreign_key: :vb_tru, primary_key: :tru_registro
5
+ end
@@ -2,4 +2,5 @@ class Gestorh::Verba < Gestorh::GestorhRecord
2
2
  self.table_name = 'gestor_rh.cdverba'
3
3
 
4
4
  has_one :classificacao_verba, foreign_key: :cv_verba, primary_key: :vb_codigo
5
+ belongs_to :tru, foreign_key: :vb_tru, primary_key: :tru_registro
5
6
  end
@@ -1,3 +1,3 @@
1
1
  module Sticutils
2
- VERSION = "2.1.2"
2
+ VERSION = "3.0.0"
3
3
  end
data/sticutils.gemspec CHANGED
@@ -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', '>= 7.2'
34
34
 
35
35
  spec.add_development_dependency "bundler", "~> 1.16"
36
36
  spec.add_development_dependency "rake", "~> 10.0"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sticutils
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.2
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ricardo Viana
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - ">="
17
17
  - !ruby/object:Gem::Version
18
- version: '5.0'
18
+ version: '7.2'
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - ">="
24
24
  - !ruby/object:Gem::Version
25
- version: '5.0'
25
+ version: '7.2'
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: bundler
28
28
  requirement: !ruby/object:Gem::Requirement
@@ -82,6 +82,7 @@ files:
82
82
  - app/models/gestorh/movimento_acumulado.rb
83
83
  - app/models/gestorh/movimento_posicao.rb
84
84
  - app/models/gestorh/nivel_salario.rb
85
+ - app/models/gestorh/tru.rb
85
86
  - app/models/gestorh/verba.rb
86
87
  - app/models/gestorh/vinculo.rb
87
88
  - app/models/intranet.rb