abacos 0.0.5 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2be4f34863c719006f7764a4ab066f6f5baf2a21
4
- data.tar.gz: 8628ca9d8b7cd3b9f6b57830bb77bb68b4afc0c6
3
+ metadata.gz: 1e35b84a1adad3fa7ba7ff2d7af9dec6269b722b
4
+ data.tar.gz: c82cefd9e02619127689969efd01e678648bbf69
5
5
  SHA512:
6
- metadata.gz: 691e7fc905c4bd658d88bfeb771d185df5cd483a03eebf48b593d30f454eea414b7cef581dfe25e9ef0d65c443ada9edc8881d27fb033621c42e806faf2cf434
7
- data.tar.gz: 0fea1ca10c223ade2bd281a387e16f76887f4f33c58a42468a4c66ddcb2c072821eba23d111283104d7ad9a4a519d8123de5eb83bbec5859c3efab088b429283
6
+ metadata.gz: e86a286b1079a6b241a8710d12e6a6a2f8a91e8da06fc0a6dfca1ade606bd98ca575f86a8b020498e2ce33db42e5bedb980acd16a1111df523daddc928c852c9
7
+ data.tar.gz: 8bec327ef20541a6875c247a3a6d1a595ecaba5be4583e37878bf5e7213e5a0f01ccc38c70238892c06da6a255fc64cbeadfc8d9a7a24c428471f78071943c31
@@ -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("select name = SE.SERE_NOM, price = round(min(fr.FREP_VAL_COB)*1.10, 2) from abacos..tcom_locent lo with (nolock) inner join abacos..TCOM_FREPES fr with (nolock) on lo.LOCE_COD=fr.LOCE_COD inner join abacos..TCOM_SERENT se with (nolock) on lo.SERE_COD=se.SERE_COD where '#{cep}' between LOCE_CEP_ini and loce_cep_fim and FREP_PES_MAX >= #{weight} and se.TRAN_COD=1 and se.SERE_COD in(3,2) group by SE.SERE_NOM")
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
-
@@ -1,3 +1,3 @@
1
1
  module Abacos
2
- VERSION = "0.0.5"
2
+ VERSION = "0.1.0"
3
3
  end
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.5
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-04-08 00:00:00.000000000 Z
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: