spree_zaez_tnt_mercurio 3.0.4 → 3.0.5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 966b5356c9ed10b8d9e496b7b12b6405953e0c6e
|
4
|
+
data.tar.gz: 5d0f30f2309827cfe1de19ab69e16421a9593e04
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58873204fa9cba5e6f2db0854c9e2b7e0561aff76a2ebb16c1e3f43df72fe3e3fe538f04270b42c401d691a357bf826909aa6b936511ac2fa1f773cc0379b9d1
|
7
|
+
data.tar.gz: 820b934164264da1726bf3079557369ec490232a8d5438c9a3a1976709f661c39e36b4506524c3cad9160d7732d473c6020d18c4bb68f78a5770d0830b6eb320
|
@@ -12,6 +12,9 @@ module Spree
|
|
12
12
|
cgc_customer = order.user.attributes[Spree::TntMercurioConfig.customer_field]
|
13
13
|
cgc_type = if cgc_customer.delete('.').delete('-').size <= 11 then 'F' else 'J' end
|
14
14
|
|
15
|
+
zipcode_from = stock_location.zipcode.gsub(/[.-]/i, '')
|
16
|
+
zipcode_to = order.ship_address.zipcode.gsub(/[.-]/i, '')
|
17
|
+
|
15
18
|
params = {in0: {login: Spree::TntMercurioConfig.email,
|
16
19
|
senha: Spree::TntMercurioConfig.password,
|
17
20
|
nr_identif_cliente_rem: Spree::TntMercurioConfig.cgc,
|
@@ -21,8 +24,8 @@ module Spree
|
|
21
24
|
tp_pessoa_remetente: Spree::TntMercurioConfig.type_cgc,
|
22
25
|
tp_pessoa_destinatario: cgc_type,
|
23
26
|
tp_situacao_tributaria_destinatario: 'NC',
|
24
|
-
cep_origem:
|
25
|
-
cep_destino:
|
27
|
+
cep_origem: zipcode_from,
|
28
|
+
cep_destino: zipcode_to,
|
26
29
|
vl_mercadoria: order.amount.to_s,
|
27
30
|
ps_real: object.weight.to_s,
|
28
31
|
tp_servico: shipping_method,
|
@@ -2,7 +2,7 @@
|
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
s.platform = Gem::Platform::RUBY
|
4
4
|
s.name = 'spree_zaez_tnt_mercurio'
|
5
|
-
s.version = '3.0.
|
5
|
+
s.version = '3.0.5'
|
6
6
|
s.summary = 'Implements diverse functions in order to enable the use of services from TNT Mercúrio in Spree Commerce'
|
7
7
|
s.description = 'Implements diverse functions in order to enable the use of services from TNT Mercúrio in Spree Commerce'
|
8
8
|
s.required_ruby_version = '>= 2.0.0'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_zaez_tnt_mercurio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zaez Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: spree_core
|
@@ -331,7 +331,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
331
331
|
requirements:
|
332
332
|
- none
|
333
333
|
rubyforge_project:
|
334
|
-
rubygems_version: 2.
|
334
|
+
rubygems_version: 2.4.5.1
|
335
335
|
signing_key:
|
336
336
|
specification_version: 4
|
337
337
|
summary: Implements diverse functions in order to enable the use of services from
|