abacos 0.0.5 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/abacos/shipping.rb +1 -3
- data/lib/abacos/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e35b84a1adad3fa7ba7ff2d7af9dec6269b722b
|
4
|
+
data.tar.gz: c82cefd9e02619127689969efd01e678648bbf69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e86a286b1079a6b241a8710d12e6a6a2f8a91e8da06fc0a6dfca1ade606bd98ca575f86a8b020498e2ce33db42e5bedb980acd16a1111df523daddc928c852c9
|
7
|
+
data.tar.gz: 8bec327ef20541a6875c247a3a6d1a595ecaba5be4583e37878bf5e7213e5a0f01ccc38c70238892c06da6a255fc64cbeadfc8d9a7a24c428471f78071943c31
|
data/lib/abacos/shipping.rb
CHANGED
@@ -3,9 +3,7 @@ module Abacos
|
|
3
3
|
attr_reader :price, :name
|
4
4
|
|
5
5
|
def self.find_all_by_cep_and_weight cep, weight
|
6
|
-
execute("
|
6
|
+
execute("SELECT name=SE.SERE_NOM, price=round(min(fr.FREP_VAL_COB)*1.035,2) FROM ABACOS.dbo.tcom_locent lo WITH (NOLOCK) INNER JOIN ABACOS.dbo.TCOM_FREPES fr WITH (NOLOCK) ON lo.LOCE_COD=fr.LOCE_COD INNER JOIN ABACOS.dbo.TCOM_SERENT se WITH (NOLOCK) ON lo.SERE_COD=se.SERE_COD WHERE '#{cep}' BETWEEN lo.LOCE_CEP_INI AND lo.LOCE_CEP_FIM AND fr.FREP_PES_MAX >= #{weight} AND se.TRAN_COD=1 AND se.SERE_COD IN (1,2,3) AND fr.FREP_VAL_COB>0 GROUP BY SE.SERE_NOM ORDER BY price ASC")
|
7
7
|
end
|
8
8
|
end
|
9
9
|
end
|
10
|
-
|
11
|
-
|
data/lib/abacos/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: abacos
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Diego Carrion
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: savon
|
@@ -235,3 +235,4 @@ test_files:
|
|
235
235
|
- spec/cassettes/stocks_confirm.yml
|
236
236
|
- spec/config.yml.example
|
237
237
|
- spec/spec_helper.rb
|
238
|
+
has_rdoc:
|