sticutils 0.3.8 → 0.3.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: d1c5769d5b66eb3ea6b6e6d9c611f30206297761a592bad78540831db2ea19f3
4
- data.tar.gz: 330c9ccb0109dfa93bba6cb9c86c4a64f72a1c45732b909d9e97e701f8ef9d44
3
+ metadata.gz: 41225f441c7974574d9aa7158eb45d806e0519a6ccf403d7596cdb6172f0594e
4
+ data.tar.gz: 695acc88465bfb9ed2cfb2dcced891e0d23bfaf300f5df4863b2fbb8abd27569
5
5
  SHA512:
6
- metadata.gz: bac3486aff85bac718b6327af3047106b54587656d76517ee2159592c64d2eb486b1ed59bec4e8f2100a22ee49eeb55d04c04ef75390e772cee7551df2ab7670
7
- data.tar.gz: f2a1058cff6d7c6318864b4f2b165f524801c91934cfc34f2b383a28aeb0ee188beb10972cf8534d26c9f6fc094558f0380631adc77a177d28c845590ba8d5f1
6
+ metadata.gz: 5f538e432c08acdbb92719e326742365f8f7aeb013a94236a30e518a24c9eb46b572711b51dc042a44b0eef010400b58134fe7af29e444b19c2e23314826e087
7
+ data.tar.gz: d684705c95e9aa77cf3fd95c0e846b15dab14c4eec73841f4560296245598eabf0e00338c70ac29db54f526ed256937f325731f32e923cce3e3e283ecd13d8c6
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Sticutils
2
- VERSION = "0.3.8"
2
+ VERSION = "0.3.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: 0.3.8
4
+ version: 0.3.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-07-07 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
@@ -266,7 +266,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
266
266
  - !ruby/object:Gem::Version
267
267
  version: '0'
268
268
  requirements: []
269
- rubygems_version: 3.0.3
269
+ rubygems_version: 3.1.6
270
270
  signing_key:
271
271
  specification_version: 4
272
272
  summary: Utilidades para aplicações rails da STIC