effective_orders 4.2.0 → 4.2.1
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/lib/effective_orders.rb +1 -1
- data/lib/effective_orders/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: ca6231f9f114eb234e5c825c4e5632326ec6ea81986aeddee7166b9c2bd53455
|
4
|
+
data.tar.gz: e11f4a0a817a8432f0bd6078a3e69cb5747131b66af049fc7e8571cbe91e738e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb0e0adae93b5f998a485ef8315b00dd768997b864e642df62295324016f19bd89447c03b72ee60dcaf3133e54b9509bbbd224587caadb881ca90bc83efcc8cc
|
7
|
+
data.tar.gz: 1119e0c85e20a70250b966d9932e88aa191439d506dfdee49b97800dc3bc1ff077cae9e4a4a9af0d6a4668d1e46e12ce8fc82883b737c0ac6770bc7ba66c95fc
|
data/lib/effective_orders.rb
CHANGED
@@ -205,7 +205,7 @@ module EffectiveOrders
|
|
205
205
|
end
|
206
206
|
|
207
207
|
# Calculate savings for any yearly per user plans, based on their matching monthly plans
|
208
|
-
plans.select { |plan| plan[:interval] == 'year'
|
208
|
+
plans.select { |plan| plan[:interval] == 'year' }.each do |yearly|
|
209
209
|
monthly_name = yearly[:name].downcase.gsub('year', 'month')
|
210
210
|
monthly = plans.find { |plan| plan[:interval] == 'month' && plan[:name].downcase == monthly_name }
|
211
211
|
next unless monthly
|