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: 36b5fd6212a599f4855cbfce22cf021275bef49c
4
- data.tar.gz: 98bf47011621c2518e1f377a80cadfbb3114d786
3
+ metadata.gz: 9d2d4dcef8b18e6ad8329f6c6419517d166cdc7a
4
+ data.tar.gz: e13f60bf6ed648ed17a7eabea208c2ba26d460f2
5
5
  SHA512:
6
- metadata.gz: ff41e764185ebcc320595801cbddf48aecc34fc28dc48b8f82bdceb4660d63a74d88b25c51b53c93895685397dd38524fa023443fe040bcfab4300019ffb31b7
7
- data.tar.gz: e6f2aa52eeb41fdd00f9f4b1635d81d73d5982f737312868615c1a076ac5a3dbf5b09da0658e2e0e92febf0fc7d6424fc90214e82f764d5efb7e7f9faf5d8fc5
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 'debug info:'
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
- c = i.client if !i.nil?
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 ( c.id=m.id_client AND m.create_time > ISNULL(c.last_stat_balance_update_time, '1900-01-01') ) " +
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: invoicing_payments_processing
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.68
4
+ version: 1.1.73
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leandro Daniel Sardi