effective_orders 5.1.2 → 5.1.3
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: ade00cb763bc7fbe35b7328f3b3b5950eda644ad3db27a62106b96676ec9a057
|
4
|
+
data.tar.gz: da28c05225df93566ac1633ee0ab681ead8e1c3642bf90f85a27c291c52c4a5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1217f8ca75c06b59a787f5ddc9f83e65331e904f2a492a01d5b16dca4917c470e5c527fbbd9cc97f3dd05263904b1dc7e87aa3afe11db25e535d65fe31de7287
|
7
|
+
data.tar.gz: 492aa5d8c2a6b1ea7611d0f29f5edc3b09b53bcca717405acb7e9310e1f3966d71ee29680d51340def9e168855a164340a754a4b8259c333c510fab87b21e974
|
@@ -30,8 +30,13 @@ module Effective
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def tax_rate
|
33
|
-
country = country_code
|
34
|
-
|
33
|
+
country = country_code
|
34
|
+
country ||= order.billing_address.country_code if order.billing_address.present?
|
35
|
+
country ||= order.user.billing_address.country_code if order.user.respond_to?(:billing_address) && order.user.billing_address.present?
|
36
|
+
|
37
|
+
state = state_code
|
38
|
+
state ||= order.billing_address.state_code if order.billing_address.present?
|
39
|
+
state ||= order.user.billing_address.state_code if order.user.respond_to?(:billing_address) && order.user.billing_address.present?
|
35
40
|
|
36
41
|
rate = RATES[country]
|
37
42
|
return rate if rate.kind_of?(Numeric)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_orders
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.1.
|
4
|
+
version: 5.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-08-
|
11
|
+
date: 2021-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|