invoicing_payments_processing 1.1.64 → 1.1.65
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/extend_client_by_invoicing_payments_processing.rb +7 -3
- data/lib/movement.rb +4 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6c823ecb08c6b06064463c50e00f8a392d31db4
|
4
|
+
data.tar.gz: 019aad76d9430a5e5ca28a960de182dd03956e3a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c82e69dc914a4ccf5a84dcaa55ebedb065aef47405bb99b83c9546f6ced35d95b12fe88c0efc608a49c4c721225555282952baa2126b0a1d55df47b912bcfafa
|
7
|
+
data.tar.gz: ec65bbcc0118e99f08299bea1e71b3a663bbd91068a02c2cd14b87db5e91c7ae6de0db5ce9fe7b4dfcbf45c0265dc916ee27958601126ad031623d499035a94b
|
@@ -17,12 +17,16 @@ module BlackStack
|
|
17
17
|
# The call to this method may take too much time, but ti won't raise a query timeout.
|
18
18
|
#
|
19
19
|
def movements
|
20
|
+
i = 0
|
20
21
|
ret = []
|
21
22
|
BlackStack::Movement.where(:id_client=>self.id).each { |o|
|
22
23
|
ret << o
|
23
|
-
|
24
|
-
|
25
|
-
|
24
|
+
i += 1
|
25
|
+
if i == 1000
|
26
|
+
i = 0
|
27
|
+
GC.start
|
28
|
+
DB.disconnect
|
29
|
+
end
|
26
30
|
}
|
27
31
|
ret
|
28
32
|
end
|
data/lib/movement.rb
CHANGED
@@ -159,7 +159,8 @@ module BlackStack
|
|
159
159
|
"and m.id_client='#{self.client.id.to_guid}' " +
|
160
160
|
"and isnull(m.credits,0) < 0 " +
|
161
161
|
"and upper(isnull(m.product_code, '')) = '#{self.product_code.upcase}' " +
|
162
|
-
"and m.create_time < '#{registraton_time.to_time.strftime('%Y-%m-%d')}' "
|
162
|
+
"and m.create_time < '#{registraton_time.to_time.strftime('%Y-%m-%d')}' " +
|
163
|
+
"and m.id <> '#{self.id.to_guid}' "
|
163
164
|
].first[:n]
|
164
165
|
#puts "paid:#{paid.to_s}:."
|
165
166
|
|
@@ -177,7 +178,8 @@ module BlackStack
|
|
177
178
|
"where m.id_client='#{self.client.id.to_guid}' " +
|
178
179
|
"and isnull(m.credits,0) > 0 " +
|
179
180
|
"and upper(isnull(m.product_code, '')) = '#{self.product_code.upcase}' " +
|
180
|
-
"and m.create_time < '#{registraton_time.to_time.strftime('%Y-%m-%d')}' "
|
181
|
+
"and m.create_time < '#{registraton_time.to_time.strftime('%Y-%m-%d')}' " +
|
182
|
+
"and m.id <> '#{self.id.to_guid}' "
|
181
183
|
].first[:n]
|
182
184
|
#puts "consumed:#{consumed.to_s}:."
|
183
185
|
|