sticutils 1.0.5 → 1.0.9

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: c02f0f83de409b8403532c12f18e8fb62b0a9f65c2f1055b38bf155d78916f3f
4
- data.tar.gz: a2a9d9c68d39ed22bdd8b65173cc117601d432f655706132e1518e6ed2a18ded
3
+ metadata.gz: 1634c12a77c48f82d0697764187c8df08a1e665f2d63201316f3027f40e07ccb
4
+ data.tar.gz: 9c9a8cd8b8911f0ccf3e040b6bf34c5eebaa70628f87d7da4fb9b14f66b58b60
5
5
  SHA512:
6
- metadata.gz: 64002394adfc7fd342875443beedf4081d6e979768356560d4744e70d0c3593bf09e9828d802faa232ae6878206ff70e8209c157c48f167d9e7f4174f14e9402
7
- data.tar.gz: 7dbe1a361f26dceae41dcb41842eccbada640cdbeecc6886ebebb041032b484599b38650a2236c960dd1652841b5a5278f93b81e2436e17ea32681dbcd2e0b8b
6
+ metadata.gz: a0b65803055cabf9938fd476f21ee0e0180264cb38225394f3e97493d4536af1c20bbdabbf23d99c09b2ba8155cb9c47f6605884f1d86e084029ca21cf6b3cdd
7
+ data.tar.gz: 70412d042c632460b61efb6c45caa973aeba58e34d5b5e34e05129c2aea31d46ce97c9b9a928a85847f17a8d3741b4c0a736da6b322387d5e8607b1bf431c422
@@ -0,0 +1,4 @@
1
+ class Gestorh::Ferias < Gestorh::GestorhRecord
2
+ self.table_name = 'gestor_rh.cdferias'
3
+ belongs_to :funcionario, foreign_key: :fe_matricula, primary_key: :fn_matricula
4
+ end
@@ -75,14 +75,14 @@ class Gestorh::FolhaAgrupada < Gestorh::GestorhRecord
75
75
  # diarias
76
76
  def diarias
77
77
  if Object.const_defined?('DailyRate')
78
- DailyRate.where(cpf: numeric_cpf, date: [Date.new(self.ano, self.mes)..Date.new(self.ano, self.mes).at_end_of_month])
78
+ DailyRate.where(cpf: [cpf, numeric_cpf], date: [Date.new(self.ano, self.mes)..Date.new(self.ano, self.mes).at_end_of_month])
79
79
  .sum(:pago)
80
80
  end
81
81
  end
82
82
 
83
83
  def diarias_positivas
84
84
  if Object.const_defined?('DailyRate')
85
- DailyRate.where(cpf: numeric_cpf,
85
+ DailyRate.where(cpf: [cpf, numeric_cpf],
86
86
  pago: [0..Float::INFINITY], date: [Date.new(self.ano, self.mes)..Date.new(self.ano, self.mes).at_end_of_month])
87
87
  .sum(:pago)
88
88
  end
@@ -90,7 +90,7 @@ class Gestorh::FolhaAgrupada < Gestorh::GestorhRecord
90
90
 
91
91
  def diarias_negativas
92
92
  if Object.const_defined?('DailyRate')
93
- DailyRate.where(cpf: numeric_cpf,
93
+ DailyRate.where(cpf: [cpf, numeric_cpf],
94
94
  pago: [-Float::INFINITY..0], date: [Date.new(self.ano, self.mes)..Date.new(self.ano, self.mes).at_end_of_month])
95
95
  .sum(:pago)
96
96
  end
@@ -3,4 +3,6 @@ class Gestorh::Funcionario < Gestorh::GestorhRecord
3
3
 
4
4
  has_many :movimento_acumulados, foreign_key: :mv_matricula, primary_key: :fn_matricula
5
5
  has_many :folhas, through: :movimento_acumulados
6
+ has_many :ferias, foreign_key: :fe_matricula, primary_key: :fn_matricula, class_name: 'Gestorh::Ferias'
7
+ belongs_to :vinculo, foreign_key: :fn_vinculo
6
8
  end
@@ -1,3 +1,5 @@
1
1
  class Gestorh::Vinculo < Gestorh::GestorhRecord
2
2
  self.table_name = 'gestor_rh.cdvinculo'
3
+
4
+ has_many :funcionarios, foreign_key: :fn_vinculo
3
5
  end
@@ -1,3 +1,3 @@
1
1
  module Sticutils
2
- VERSION = "1.0.5"
2
+ VERSION = "1.0.9"
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.5
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ricardo Viana
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-04-28 00:00:00.000000000 Z
11
+ date: 2021-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -68,6 +68,7 @@ files:
68
68
  - app/models/gestorh.rb
69
69
  - app/models/gestorh/banco.rb
70
70
  - app/models/gestorh/classificacao_verba.rb
71
+ - app/models/gestorh/ferias.rb
71
72
  - app/models/gestorh/folha.rb
72
73
  - app/models/gestorh/folha_agrupada.rb
73
74
  - app/models/gestorh/folha_agrupada_id_separado.rb
@@ -265,7 +266,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
265
266
  - !ruby/object:Gem::Version
266
267
  version: '0'
267
268
  requirements: []
268
- rubygems_version: 3.0.3
269
+ rubygems_version: 3.1.6
269
270
  signing_key:
270
271
  specification_version: 4
271
272
  summary: Utilidades para aplicações rails da STIC