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 +4 -4
- data/lib/extend_client_by_invoicing_payments_processing.rb +16 -9
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3c8a07288e91aab43e702ef271aff19c6aea13d
|
4
|
+
data.tar.gz: 25af23560fbbbe4f534dff69f497760e9a96da72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
].first
|
70
|
-
|
71
|
-
|
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.
|
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-
|
11
|
+
date: 2022-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: websocket
|