effective_events 0.11.1 → 0.11.2

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: 908edb48306e3813893671ea9ba33cc3d1988258a47451edecfeee86197136a7
4
- data.tar.gz: 7bb18df7c58fd2fa7e08b17710a1b5eefe22574690f1532243aab1e559cc44ec
3
+ metadata.gz: dbb3a8a1227396c83975ab41899ed1a2989d69856e0b81181fae9104fef9f29f
4
+ data.tar.gz: 3151268c53678a8f649858ca22bb16c3c667f3fa5cade1451670eb193759c6c1
5
5
  SHA512:
6
- metadata.gz: 5f9e45f483664485e43509d46bb0209a7567bd66b5bf27f425cfbe03ee6a3b0f171362db99d6faf7c2070074be3210239d59140f0989260c2b1fd18aa5b820ca
7
- data.tar.gz: ac11a1ab1e15d1e58f5ab7e6db346906fcf6836caedbb6c45f94fbf57c177334b379da57ae8e91658b23d017fb8d62f790f740c82c0d2c2ab55662edcba6084d
6
+ metadata.gz: 61f5cf951a66616f3c206938577a001bc8dafe13ab7b8472302f7f80bfdeb7ab7ccea0aaadf271bb4b637e43d81d9f7351caa837dba61996e0d250c2e8dd4518
7
+ data.tar.gz: 3fcfd0cc88b095bbf310fc115de7467126127dda94fea88701d2d1a78f61b370da0c1d809ded9b8dd5fa6ed712b6cc29583722c13370e85325d6f5c5ec03b06e
@@ -124,23 +124,19 @@ module EffectiveEventsEventRegistration
124
124
  event&.event_products.present? ? wizard_step_keys : (wizard_step_keys - [:addons])
125
125
  end
126
126
 
127
+ def find_or_build_submit_fees
128
+ with_outstanding_coupon_fees(submit_fees)
129
+ end
130
+
127
131
  # All Fees and Orders
128
132
  def submit_fees
129
- if owner.respond_to?(:outstanding_coupon_fees) # effective_memberships_owner
133
+ if defined?(EffectiveMemberships)
130
134
  (event_registrants + event_addons + fees)
131
135
  else
132
136
  (event_registrants + event_addons)
133
137
  end
134
138
  end
135
139
 
136
- def apply_outstanding_coupon_fees
137
- return unless owner.respond_to?(:outstanding_coupon_fees)
138
-
139
- Array(owner.outstanding_coupon_fees).each { |fee| fees << fee unless fees.include?(fee) }
140
-
141
- fees.select { |fee| fee.try(:coupon_fee?) }
142
- end
143
-
144
140
  def after_submit_purchased!
145
141
  notifications = event.event_notifications.select(&:registrant_purchased?)
146
142
  notifications.each { |notification| notification.notify!(event_registrants: event_registrants) }
@@ -50,7 +50,7 @@ module Effective
50
50
  end
51
51
 
52
52
  before_validation(if: -> { event_product.present? }) do
53
- self.price ||= event_product.price
53
+ assign_attributes(price: event_product.price) unless purchased?
54
54
  end
55
55
 
56
56
  with_options(if: -> { new_record? }) do
@@ -53,7 +53,7 @@ module Effective
53
53
  end
54
54
 
55
55
  before_validation(if: -> { event_ticket.present? }) do
56
- self.price ||= event_ticket.price
56
+ assign_attributes(price: event_ticket.price) unless purchased?
57
57
  end
58
58
 
59
59
  def to_s
@@ -1,3 +1,3 @@
1
1
  module EffectiveEvents
2
- VERSION = '0.11.1'.freeze
2
+ VERSION = '0.11.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_events
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.1
4
+ version: 0.11.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect