invoicing_payments_processing 1.1.68 → 1.1.73
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d2d4dcef8b18e6ad8329f6c6419517d166cdc7a
|
4
|
+
data.tar.gz: e13f60bf6ed648ed17a7eabea208c2ba26d460f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76e337872274c80b927ed5607dc236c1b3b1fb6373e407afe0cc0b9cbef06416db183effa05738af599500aaa86dbb9f005df5b06b8c8deb86f1c0c4f9fa005d
|
7
|
+
data.tar.gz: 3dd4c9279bbdd930e723de9f297b33099f6acd0075cc6baac9d95450493cad7f15b0d7f8cdb3206557fccb416a7dd17ee995d7f922ff1d5fef8808560e074ffe
|
@@ -42,27 +42,38 @@ module BlackStack
|
|
42
42
|
# 3) haciendo coincidir el primer guid en el codigo de invoice, con el id del cliente
|
43
43
|
def get_client()
|
44
44
|
puts
|
45
|
-
puts "BlackStack::BufferPayPalNotification::get_client"
|
46
|
-
puts
|
47
|
-
puts "self.invoice:#{self.invoice.to_s}:."
|
45
|
+
puts "get_client: BlackStack::BufferPayPalNotification::get_client"
|
46
|
+
puts "get_client: self.invoice:#{self.invoice.to_s}:."
|
48
47
|
# obtengo el cliente que machea con este perfil
|
49
48
|
c = nil
|
50
49
|
if c.nil?
|
50
|
+
puts 'get_client: a'
|
51
51
|
if self.invoice.guid?
|
52
|
+
puts 'get_client: a1'
|
53
|
+
puts "get_client: #{self.invoice.to_s}"
|
52
54
|
i = BlackStack::Invoice.where(:id=>self.invoice).first
|
53
|
-
|
55
|
+
if !i.nil?
|
56
|
+
c = i.client
|
57
|
+
puts 'get_client: a1a'
|
58
|
+
else
|
59
|
+
puts 'get_client: a1b'
|
60
|
+
end
|
54
61
|
end
|
55
62
|
end
|
56
63
|
if c.nil?
|
64
|
+
puts 'get_client: b'
|
57
65
|
iid = self.invoice.split(".").last.to_s
|
58
66
|
if iid.guid?
|
67
|
+
puts 'get_client: b1'
|
59
68
|
i = BlackStack::Invoice.where(:id=>iid).first
|
60
69
|
c = i.client if !i.nil?
|
61
70
|
end
|
62
71
|
end
|
63
72
|
if c.nil?
|
73
|
+
puts 'get_client: c'
|
64
74
|
cid = self.invoice.split(".").first.to_s
|
65
75
|
if cid.guid?
|
76
|
+
puts 'get_client: c1'
|
66
77
|
c = BlackStack::Client.where(:id=>cid).first
|
67
78
|
end
|
68
79
|
end
|
@@ -32,11 +32,17 @@ module BlackStack
|
|
32
32
|
end
|
33
33
|
|
34
34
|
# how many minutes ago should have updated the table stat_balance with the amount and credits of this client, for each product.
|
35
|
+
# return a positive integer if either:
|
36
|
+
# 1. the client didn't update stats in the last 24 hours, or
|
37
|
+
# 2. the client has a new record in the table movements after its last update in the table stat_balance.
|
35
38
|
def stat_balance_delay_minutes
|
36
39
|
row = DB[
|
37
40
|
"SELECT TOP 1 m.id " +
|
38
41
|
"FROM client c WITH (NOLOCK) " +
|
39
|
-
"JOIN movement m WITH (NOLOCK INDEX(IX_movement__id_client__create_time_desc)) ON (
|
42
|
+
"JOIN movement m WITH (NOLOCK INDEX(IX_movement__id_client__create_time_desc)) ON ( " +
|
43
|
+
" c.id=m.id_client AND " +
|
44
|
+
" m.create_time > ISNULL(c.last_stat_balance_update_time, '1900-01-01') " +
|
45
|
+
") " +
|
40
46
|
"WHERE c.id = '#{self.id}' " +
|
41
47
|
"ORDER BY m.create_time DESC "
|
42
48
|
].first
|