sticutils 1.0.2 → 1.0.3

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: 778d5218c62fb43b73f98a959aef885b679a77528a79fcc7903e527164041ff4
4
- data.tar.gz: 642af963287a2d3abebe8bd180322c6ed8c0cc64b18cf4004e7c8186bbf03cf8
3
+ metadata.gz: 40acdd41da3e6ce18afad2fae3733e99d2c539c4dd845a272830f0fb29f5aeb6
4
+ data.tar.gz: f66502769017b85070d10d2647905d8c225d5824afcefc88aa2dbbed04022fb3
5
5
  SHA512:
6
- metadata.gz: e1ed8d6d2318beef3302f748fe21b036f6f07d3ca54bde0649be30611eae49798918d1fec752baabf2425e536287c10f8d6fc34be166229d9761df1c420a06ee
7
- data.tar.gz: 139e9d1d93a331e0703022a88b93a7cc253cf1daf431c13b42763a5a6b661669022dbf543436b6818395a37a1b7615a4bd1d43446cdfe8a3b91ff510fe39fd1d
6
+ metadata.gz: 8a3cbb843827e20e182dbedb13ac50dfd39471fe490cbafe727c9646163e9fd628331881241aa97f9b0b9ae89406565b4c8c6bbf18d37bacdc79afe52faba7a8
7
+ data.tar.gz: 2cb50c52b31dc35705f86057634b7c5a21efa3699e7ff39826bb4364276b07484085354689a375fec13017d734d445be6930877f56ca44d0943ea3299279b533
@@ -14,13 +14,15 @@ class Gestorh::FolhaAgrupada < Gestorh::GestorhRecord
14
14
  end
15
15
 
16
16
  def eventos_e_valores
17
+ # .where.not('cdclassificacaoverba.cv_classificacao': 'DESCONTO_PREVIDENCIA_PUBLICA_IAPEP')
17
18
  Gestorh::MovimentoAcumulado.where(mv_regfolha: self.folhas, mv_matricula: self.matricula)
18
- .joins(:evento_folha_pagamento)
19
- .where.not('evento_folha_pagamentos.tipo': 'DESCONTO_PREVIDENCIA_PUBLICA_IAPEP')
19
+ .joins(verba: :classificacao_verba)
20
20
  .select('mv_regfolha as folha_id', 'mv_verba as codigo_evento',
21
- 'evento_folha_pagamentos.descricao as nome_evento',
22
- 'mv_dc as status', 'mv_total as valor', 'evento_folha_pagamentos.tipo')
21
+ 'cdverba.vb_nome as nome_evento',
22
+ 'mv_dc as status', 'mv_total as valor',
23
+ 'cdclassificacaoverba.cv_classificacao as tipo')
23
24
  .to_a
25
+ .uniq{|x| [x.codigo_evento, x.status, x.valor] } # uniq temporario para remover verbas com 2 classificacoes
24
26
  end
25
27
 
26
28
  def remuneracao_paradigma
@@ -14,13 +14,15 @@ class Gestorh::FolhaAgrupadaIdSeparado < Gestorh::GestorhRecord
14
14
  end
15
15
 
16
16
  def eventos_e_valores
17
+ # .where.not('cdclassificacaoverba.cv_classificacao': 'DESCONTO_PREVIDENCIA_PUBLICA_IAPEP')
17
18
  Gestorh::MovimentoAcumulado.where(mv_regfolha: self.folhas, mv_matricula: self.matricula)
18
- .joins(:evento_folha_pagamento)
19
- .where.not('evento_folha_pagamentos.tipo': 'DESCONTO_PREVIDENCIA_PUBLICA_IAPEP')
19
+ .joins(verba: :classificacao_verba)
20
20
  .select('mv_regfolha as folha_id', 'mv_verba as codigo_evento',
21
- 'evento_folha_pagamentos.descricao as nome_evento',
22
- 'mv_dc as status', 'mv_total as valor', 'evento_folha_pagamentos.tipo')
21
+ 'cdverba.vb_nome as nome_evento',
22
+ 'mv_dc as status', 'mv_total as valor',
23
+ 'cdclassificacaoverba.cv_classificacao as tipo')
23
24
  .to_a
25
+ .uniq{|x| [x.codigo_evento, x.status, x.valor] } # uniq temporario para remover verbas com 2 classificacoes
24
26
  end
25
27
 
26
28
  def remuneracao_paradigma
@@ -4,6 +4,4 @@ class Gestorh::MovimentoAcumulado < Gestorh::GestorhRecord
4
4
  belongs_to :verba, foreign_key: :mv_verba, primary_key: :vb_codigo
5
5
  belongs_to :funcionario, foreign_key: :mv_matricula, primary_key: :fn_matricula
6
6
  belongs_to :folha, foreign_key: :mv_regfolha, primary_key: :fp_registro
7
-
8
- belongs_to :evento_folha_pagamento, foreign_key: :mv_verba, primary_key: :codigo, class_name: 'Transparencia::EventoFolhaPagamento'
9
7
  end
@@ -1,3 +1,3 @@
1
1
  module Sticutils
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
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.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ricardo Viana
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-11-18 00:00:00.000000000 Z
11
+ date: 2020-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -239,9 +239,6 @@ files:
239
239
  - app/models/intranet/tjpi_vinculadoemfolha.rb
240
240
  - app/models/intranet/tjpi_vinculo.rb
241
241
  - app/models/intranet/tjpi_vinculo_documento.rb
242
- - app/models/transparencia.rb
243
- - app/models/transparencia/evento_folha_pagamento.rb
244
- - app/models/transparencia/transparencia_record.rb
245
242
  - bin/console
246
243
  - bin/setup
247
244
  - lib/sticutils.rb
@@ -1,2 +0,0 @@
1
- module Transparencia
2
- end
@@ -1,3 +0,0 @@
1
- class Transparencia::EventoFolhaPagamento < Transparencia::TransparenciaRecord
2
- has_many :folha_pagamento_detalhadas
3
- end
@@ -1,4 +0,0 @@
1
- class Transparencia::TransparenciaRecord < ActiveRecord::Base
2
- self.abstract_class = true
3
- self.establish_connection :transparencia
4
- end