solidus_tec_estimator 1.0.4 → 1.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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c6cd4f4ae5132949061a5e6fc1e5a7f454623e3cf5afc9618fd08c2c8f413a6
|
4
|
+
data.tar.gz: b3e71b92b291a2ed5bc8d2a10210d1185de0601b0d5ab8b2a421b91487d9fb03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cceb0966d0b47f28e7a342536fd43b7394a38349d070adca7087f1e67a6a548d11f4af73435904b99e2a64a752f4da912ab7f2d0bcc0409d10837daee693d810
|
7
|
+
data.tar.gz: 84cb73efd1f1c1f770243a16f0abc0cdc50b3ad4c36f87dd2212264381a995a90b24e3f224caf3737d9b4dd26dbe828d7d8c85cc3ec46ba44cf80c32c1d5680d
|
@@ -22,7 +22,7 @@ module SolidusTecEstimator
|
|
22
22
|
|
23
23
|
def shipping_rates
|
24
24
|
shipping_rates = []
|
25
|
-
if
|
25
|
+
if cep_de_sjbv? && tem_estoque_na_f1? && package.weight <= 10000
|
26
26
|
shipping_rates << build_shipping_rate(package)
|
27
27
|
end
|
28
28
|
shipping_rates.select { |rate| shipping_methods.include?(rate.shipping_method) }
|
@@ -62,8 +62,10 @@ module SolidusTecEstimator
|
|
62
62
|
)
|
63
63
|
end
|
64
64
|
|
65
|
-
def
|
66
|
-
Cep.
|
65
|
+
def cep_de_sjbv?
|
66
|
+
sjbv_ceps = Cep.where(localidade: "São João da Boa Vista").pluck(:codigo_postal).map(&:to_i)
|
67
|
+
zipcode = package.order.ship_address.zipcode.gsub(/\D/, "").to_i
|
68
|
+
zipcode >= sjbv_ceps.min && zipcode <= sjbv_ceps.max
|
67
69
|
end
|
68
70
|
|
69
71
|
def self.calculate_delivery_time rate
|