invoicing_payments_processing 1.1.27 → 1.1.29
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/invoice.rb +5 -4
- 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: 9f79b2b37439a781dd15dbe9407f09907f890773
|
4
|
+
data.tar.gz: 1c99bbda030268957826baaf318a30ff3fafde7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c43270e3ed5d5c63729935fbb609f209ead4420b24bfb02d5b3d282d2ce68844d8b60e8eca3a0a28a08379b329ac4027b028f2426045f057c37d3b7140088ce
|
7
|
+
data.tar.gz: 5d4315da2fdd53ccc55149cae0e5da568ca375f055b1dba014319095179171411e81908f779b535b653c191c08e0a51bcf4c1387c0f3c8b961326a794d570157
|
data/lib/invoice.rb
CHANGED
@@ -400,11 +400,12 @@ module BlackStack
|
|
400
400
|
|
401
401
|
# le seteo la fecha de hoy
|
402
402
|
self.billing_period_from = now()
|
403
|
-
|
403
|
+
#puts
|
404
|
+
#puts
|
404
405
|
# si el plan tiene un primer trial, y
|
405
406
|
# es la primer factura, entonces:
|
406
407
|
# => se trata del primer pago por trial
|
407
|
-
if h[:trial_fee] != nil && prev1.nil?
|
408
|
+
if h[:trial_fee] != nil && prev1.nil? && !self.disabled_for_trial_ssm
|
408
409
|
#puts 'a'
|
409
410
|
units = h[:trial_credits].to_i
|
410
411
|
unit_price = h[:trial_fee].to_f / h[:trial_credits].to_f
|
@@ -420,13 +421,13 @@ module BlackStack
|
|
420
421
|
billing_period_to = DB["SELECT DATEADD(#{h[:trial2_period].to_s}, +#{h[:trial2_units].to_s}, '#{self.billing_period_from.to_s}') AS [now]"].map(:now)[0].to_s
|
421
422
|
|
422
423
|
# si el plan tiene un fee, y
|
423
|
-
elsif h[:fee].to_f != nil &&
|
424
|
+
elsif h[:fee].to_f != nil && h[:type] == BlackStack::InvoicingPaymentsProcessing::BasePlan::PAYMENT_SUBSCRIPTION
|
424
425
|
#puts 'c'
|
425
426
|
units = n.to_i * h[:credits].to_i
|
426
427
|
unit_price = h[:fee].to_f / h[:credits].to_f
|
427
428
|
billing_period_to = DB["SELECT DATEADD(#{h[:period].to_s}, +#{h[:units].to_s}, '#{self.billing_period_from.to_s}') AS [now]"].map(:now)[0].to_s
|
428
429
|
|
429
|
-
elsif
|
430
|
+
elsif h[:fee].to_f != nil && h[:type] == BlackStack::InvoicingPaymentsProcessing::BasePlan::PAYMENT_PAY_AS_YOU_GO
|
430
431
|
#puts 'd'
|
431
432
|
units = n.to_i * h[:credits].to_i
|
432
433
|
unit_price = h[:fee].to_f / h[:credits].to_f
|
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.29
|
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: 2020-09-
|
11
|
+
date: 2020-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: websocket
|