sticutils 0.3.0 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/gestorh/classificacao_verba.rb +5 -0
- data/app/models/gestorh/folha_agrupada.rb +24 -10
- data/app/models/gestorh/folha_agrupada_id_separado.rb +6 -4
- data/app/models/gestorh/movimento_acumulado.rb +0 -2
- data/app/models/gestorh/verba.rb +2 -0
- data/app/models/intranet/tjpi_vinculo.rb +3 -2
- data/lib/sticutils/version.rb +1 -1
- data/sticutils.gemspec +1 -1
- metadata +5 -7
- data/app/models/transparencia.rb +0 -2
- data/app/models/transparencia/evento_folha_pagamento.rb +0 -3
- data/app/models/transparencia/transparencia_record.rb +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40acdd41da3e6ce18afad2fae3733e99d2c539c4dd845a272830f0fb29f5aeb6
|
4
|
+
data.tar.gz: f66502769017b85070d10d2647905d8c225d5824afcefc88aa2dbbed04022fb3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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(:
|
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
|
-
'
|
22
|
-
'mv_dc as status', 'mv_total as valor',
|
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
|
@@ -65,19 +67,31 @@ class Gestorh::FolhaAgrupada < Gestorh::GestorhRecord
|
|
65
67
|
x.tipo == 'RENDIMENTO_VANTAGENS_PESSOAIS' || (x.tipo == 'RENDIMENTO_VANTAGENS_EVENTUAIS' && x.status == 'C')}
|
66
68
|
end
|
67
69
|
|
70
|
+
def subsidio_com_gratificacao
|
71
|
+
self.subsidios.pluck(:valor).sum
|
72
|
+
end
|
73
|
+
|
68
74
|
# diarias
|
69
75
|
def diarias
|
70
|
-
|
71
|
-
.
|
76
|
+
if Object.const_defined?('DailyRate')
|
77
|
+
DailyRate.where(cpf: numeric_cpf, date: [Date.new(self.ano, self.mes)..Date.new(self.ano, self.mes).at_end_of_month])
|
78
|
+
.sum(:pago)
|
79
|
+
end
|
72
80
|
end
|
73
|
-
|
81
|
+
|
74
82
|
def diarias_positivas
|
75
|
-
|
83
|
+
if Object.const_defined?('DailyRate')
|
84
|
+
DailyRate.where(cpf: numeric_cpf,
|
85
|
+
pago: [0..Float::INFINITY], date: [Date.new(self.ano, self.mes)..Date.new(self.ano, self.mes).at_end_of_month])
|
76
86
|
.sum(:pago)
|
87
|
+
end
|
77
88
|
end
|
78
|
-
|
89
|
+
|
79
90
|
def diarias_negativas
|
80
|
-
|
91
|
+
if Object.const_defined?('DailyRate')
|
92
|
+
DailyRate.where(cpf: numeric_cpf,
|
93
|
+
pago: [-Float::INFINITY..0], date: [Date.new(self.ano, self.mes)..Date.new(self.ano, self.mes).at_end_of_month])
|
81
94
|
.sum(:pago)
|
95
|
+
end
|
82
96
|
end
|
83
97
|
end
|
@@ -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(:
|
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
|
-
'
|
22
|
-
'mv_dc as status', 'mv_total as valor',
|
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
|
data/app/models/gestorh/verba.rb
CHANGED
@@ -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
|
data/lib/sticutils/version.rb
CHANGED
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', '~>
|
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.3
|
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:
|
11
|
+
date: 2020-11-19 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: '
|
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: '
|
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
|
@@ -238,9 +239,6 @@ files:
|
|
238
239
|
- app/models/intranet/tjpi_vinculadoemfolha.rb
|
239
240
|
- app/models/intranet/tjpi_vinculo.rb
|
240
241
|
- app/models/intranet/tjpi_vinculo_documento.rb
|
241
|
-
- app/models/transparencia.rb
|
242
|
-
- app/models/transparencia/evento_folha_pagamento.rb
|
243
|
-
- app/models/transparencia/transparencia_record.rb
|
244
242
|
- bin/console
|
245
243
|
- bin/setup
|
246
244
|
- lib/sticutils.rb
|
data/app/models/transparencia.rb
DELETED