invoicing_payments_processing 1.1.82 → 1.1.83

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
  SHA1:
3
- metadata.gz: bb63d51d18a390bd5274c7eb67a3f20d2569b74e
4
- data.tar.gz: 3fb279b56bd38f6a4643ea6b14816a38bf3c4c43
3
+ metadata.gz: d3c8a07288e91aab43e702ef271aff19c6aea13d
4
+ data.tar.gz: 25af23560fbbbe4f534dff69f497760e9a96da72
5
5
  SHA512:
6
- metadata.gz: cc4ac3abb4249acc9a116cc14ef68c3da9ae616b9bee804597a1c5064be6c7c599f4fcd50ee5438546f755ee665fc96d5005e7698cc782733d60e2bc36d3c178
7
- data.tar.gz: 41dcd3bf594051421bb73886428f1abb8b02e3c037ee23438c33bb2d35e319d29bccf2c579b64b354f95d7ea7c4192a439cdee2b7b920baa3aac8913bd0b3e97
6
+ metadata.gz: faeeefe7f6d2421305f39334613c030f42c5bec240249e04886c6392d4e95fc706a95db621284a150eb8b349b383d293790130cea9d8e5aa593bda74c240a7c3
7
+ data.tar.gz: bef0624e6681b9ceb017f6ce1ee0ba64004bac928a41916a9fbe85291b7367a8f51d1ce27da30f1a3e9a0f75a0d0afa6a3a64ae2020b12a0169cc8d5543ce374
@@ -60,15 +60,22 @@ module BlackStack
60
60
  product_descriptors = BlackStack::InvoicingPaymentsProcessing::products_descriptor.clone
61
61
  product_descriptors.select! { |hprod| hprod[:code] == product_code } if !product_code.nil?
62
62
  product_descriptors.each { |hprod|
63
- row = DB[
64
- "select isnull(sum(isnull(m.credits,0)),0) as credits, isnull(sum(isnull(m.amount,0)),0) as amount " +
65
- "from movement m with (nolock index(IX_movement__id_client__product_code)) " +
66
- #"from movement m with (nolock) " +
67
- "where m.id_client='#{c.id}' " +
68
- "and m.product_code='#{hprod[:code]}' "
69
- ].first
70
- credits = row[:credits]
71
- amount = row[:amount]
63
+ row1 = DB["
64
+ select isnull(sum(isnull(m.credits,0)),0) as credits
65
+ from movement m with (nolock index(IX_movement__id_client__product_code))
66
+ --from movement m with (nolock)
67
+ where m.id_client='#{c.id}'
68
+ and m.product_code='#{hprod[:code]}'
69
+ "].first
70
+ row2 = DB["
71
+ select isnull(sum(isnull(m.amount,0)),0) as amount
72
+ from movement m with (nolock index(IX_movement__id_client__product_code))
73
+ --from movement m with (nolock)
74
+ where m.id_client='#{c.id}'
75
+ and m.product_code='#{hprod[:code]}'
76
+ "].first
77
+ credits = row1[:credits]
78
+ amount = row2[:amount]
72
79
  row = DB["SELECT * FROM stat_balance WHERE id_client='#{c.id}' AND product_code='#{hprod[:code]}'"].first
73
80
  if row.nil?
74
81
  DB.execute("INSERT INTO stat_balance (id_client, product_code, amount, credits) VALUES ('#{c.id}', '#{hprod[:code]}', #{amount.to_s}, #{credits.to_s})")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: invoicing_payments_processing
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.82
4
+ version: 1.1.83
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leandro Daniel Sardi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-03 00:00:00.000000000 Z
11
+ date: 2022-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: websocket