effective_qb_online 0.6.2 → 0.6.3
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 +4 -4
- data/app/models/effective/qb_api.rb +4 -4
- data/lib/effective_qb_online/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e101a55c8962b4989853c7f8fb701be335c09541fc0b85d179f7d2a03fce924
|
4
|
+
data.tar.gz: 803a96e73c6500c08796d3c94aa42b6dd8164ee8510427e67ec788aefa53bc27
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b0576c3215a5ec6eb371f1f969cb7bdee78f91f598fbf9620576b7188231330f22ab57fb1a307c82e3d0fea70a2acb656138a8c5717aa8196bab7d15412fb5a
|
7
|
+
data.tar.gz: 71f51b35b900412ab7dd4d0a9ba84200c4fcbf611f092a589798921c59a60438289f574c6e2fd8489c46d5978a96f8f2a011ddb9d7a639a478b9b07d50a5657e
|
@@ -160,18 +160,16 @@ module Effective
|
|
160
160
|
exempt = [['0.0', exempt]] if exempt.present?
|
161
161
|
|
162
162
|
# Find The rest
|
163
|
-
tax_codes = codes.map do |code|
|
163
|
+
tax_codes = codes.select(&:active?).map do |code|
|
164
164
|
rate_id = code.sales_tax_rate_list.tax_rate_detail.first&.tax_rate_ref&.value
|
165
165
|
rate = rates.find { |rate| rate.id == rate_id } if rate_id
|
166
166
|
|
167
167
|
[rate.rate_value.to_s, code] if rate && (exempt.blank? || rate.rate_value.to_f > 0.0)
|
168
168
|
end
|
169
169
|
|
170
|
-
(Array(exempt) + tax_codes.compact).to_h
|
170
|
+
(Array(exempt) + tax_codes.uniq { |key, _| key }.compact).to_h
|
171
171
|
end
|
172
172
|
|
173
|
-
private
|
174
|
-
|
175
173
|
def with_service(name, &block)
|
176
174
|
klass = "Quickbooks::Service::#{name}".constantize
|
177
175
|
|
@@ -181,6 +179,8 @@ module Effective
|
|
181
179
|
end
|
182
180
|
end
|
183
181
|
|
182
|
+
private
|
183
|
+
|
184
184
|
def with_authenticated_request(max_attempts: 3, &block)
|
185
185
|
attempts = 0
|
186
186
|
|