effective_memberships 0.8.4 → 0.8.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/datatables/admin/effective_memberships_datatable.rb +1 -1
- data/app/models/concerns/effective_memberships_applicant.rb +12 -3
- data/app/models/concerns/effective_memberships_category.rb +4 -0
- data/app/models/concerns/effective_memberships_owner.rb +15 -1
- data/app/models/concerns/effective_memberships_status.rb +4 -0
- data/app/models/effective/membership.rb +1 -1
- data/app/views/admin/memberships/_form_membership.html.haml +1 -1
- data/app/views/effective/membership_directory/_membership_owner.html.haml +5 -2
- data/app/views/effective/memberships/_dashboard.html.haml +1 -1
- data/app/views/effective/memberships/_membership.html.haml +1 -1
- data/lib/effective_memberships/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1dfaa3991cff1f364a78cf6ebc761797942473f4f7c743cbc5269cddf1d3761
|
4
|
+
data.tar.gz: 636a525c3ceaa90e4de0ca185abfee8ac9002ddab428cd5c2e26391426e201dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b37e54dde35b655fa57a70b3e36a7c1d2751f6e6c6c191660a7ad749adfcd1f8fdaa383e8568102d93efe44de744b7e3169ee00e117546dad097c612a6ff9a1
|
7
|
+
data.tar.gz: 793da30a1927080c85d33efc01e8ec17da98325a9ffaadbc1cc531dfcaf956189531f99d8b3ba7770b601e031fd782a5b972f9590868bc98f641866189ba3d53
|
@@ -22,7 +22,7 @@ module Admin
|
|
22
22
|
col :number_as_integer, visible: false
|
23
23
|
|
24
24
|
col :joined_on
|
25
|
-
col :registration_on
|
25
|
+
col :registration_on, label: 'Last changed'
|
26
26
|
|
27
27
|
col :fees_paid_period, visible: false, label: 'Fees Paid'
|
28
28
|
col :fees_paid_through_period, label: 'Fees Paid Through'
|
@@ -440,7 +440,16 @@ module EffectiveMembershipsApplicant
|
|
440
440
|
|
441
441
|
def applicant_fee_price
|
442
442
|
return category.applicant_reinstatement_fee if reinstatement?
|
443
|
-
|
443
|
+
applicant_fee_category.applicant_fee
|
444
|
+
end
|
445
|
+
|
446
|
+
def applicant_fee_tax_exempt
|
447
|
+
applicant_fee_category.applicant_fee_tax_exempt
|
448
|
+
end
|
449
|
+
|
450
|
+
def applicant_fee_qb_item_name(fee = nil)
|
451
|
+
raise('expected an Effective::Fee') if fee && !fee.kind_of?(Effective::Fee)
|
452
|
+
applicant_fee_category.applicant_fee_qb_item_name
|
444
453
|
end
|
445
454
|
|
446
455
|
# All Fees and Orders
|
@@ -459,8 +468,8 @@ module EffectiveMembershipsApplicant
|
|
459
468
|
fee_type: applicant_fee_type,
|
460
469
|
category: applicant_fee_category,
|
461
470
|
price: applicant_fee_price,
|
462
|
-
tax_exempt:
|
463
|
-
qb_item_name:
|
471
|
+
tax_exempt: applicant_fee_tax_exempt,
|
472
|
+
qb_item_name: applicant_fee_qb_item_name
|
464
473
|
)
|
465
474
|
end
|
466
475
|
|
@@ -129,6 +129,10 @@ module EffectiveMembershipsOwner
|
|
129
129
|
EffectiveMemberships.Status.sorted.all.where.not(id: EffectiveMemberships.Registrar.not_in_good_standing_status)
|
130
130
|
end
|
131
131
|
|
132
|
+
def after_build_fee(fee)
|
133
|
+
# Nothing to do. Hook to adjust fee.
|
134
|
+
end
|
135
|
+
|
132
136
|
# Instance Methods
|
133
137
|
def build_prorated_fee(date: nil)
|
134
138
|
raise('must have an existing membership') unless membership.present?
|
@@ -150,6 +154,8 @@ module EffectiveMembershipsOwner
|
|
150
154
|
qb_item_name: category.qb_item_name
|
151
155
|
)
|
152
156
|
|
157
|
+
after_build_fee(fee)
|
158
|
+
|
153
159
|
fee
|
154
160
|
end
|
155
161
|
|
@@ -174,6 +180,8 @@ module EffectiveMembershipsOwner
|
|
174
180
|
qb_item_name: category.qb_item_name
|
175
181
|
)
|
176
182
|
|
183
|
+
after_build_fee(fee)
|
184
|
+
|
177
185
|
fee
|
178
186
|
end
|
179
187
|
|
@@ -199,6 +207,8 @@ module EffectiveMembershipsOwner
|
|
199
207
|
qb_item_name: qb_item_name
|
200
208
|
)
|
201
209
|
|
210
|
+
after_build_fee(fee)
|
211
|
+
|
202
212
|
fee
|
203
213
|
end
|
204
214
|
|
@@ -237,6 +247,8 @@ module EffectiveMembershipsOwner
|
|
237
247
|
not_in_good_standing_on: not_in_good_standing_on,
|
238
248
|
)
|
239
249
|
|
250
|
+
after_build_fee(fee)
|
251
|
+
|
240
252
|
fee
|
241
253
|
end
|
242
254
|
|
@@ -263,6 +275,8 @@ module EffectiveMembershipsOwner
|
|
263
275
|
qb_item_name: category.qb_item_name
|
264
276
|
)
|
265
277
|
|
278
|
+
after_build_fee(fee)
|
279
|
+
|
266
280
|
fee
|
267
281
|
end
|
268
282
|
|
@@ -342,7 +356,7 @@ module EffectiveMembershipsOwner
|
|
342
356
|
|
343
357
|
# Check that there is a membership history row if the registered date is unique
|
344
358
|
if membership.joined_on != membership.registration_on && membership_histories.none? { |mh| mh.start_on == membership.registration_on }
|
345
|
-
errors << "The
|
359
|
+
errors << "The last changed date #{membership.registration_on.strftime('%F')} is missing a history with this date. Please create a history with a start date of #{membership.registration_on.strftime('%F')} or update the last changed date above."
|
346
360
|
end
|
347
361
|
|
348
362
|
# Check numbers
|
@@ -116,7 +116,7 @@ module Effective
|
|
116
116
|
'member',
|
117
117
|
("##{number_was}" if number_was.present?),
|
118
118
|
"who joined #{joined_on&.strftime('%F') || '-'}",
|
119
|
-
("and last
|
119
|
+
("and last changed on #{registration_on.strftime('%F')}" if registration_on > joined_on)
|
120
120
|
].compact.join(' ')
|
121
121
|
|
122
122
|
(summary + '.').html_safe
|
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
= f.show_if :current_action, true do
|
16
16
|
= f.date_field :joined_on, label: 'Joined', hint: 'When the member first received any membership category'
|
17
|
-
= f.date_field :registration_on, label: '
|
17
|
+
= f.date_field :registration_on, label: 'Last changed', hint: 'When the membership category or status last changed'
|
18
18
|
= f.text_field :number, hint: 'The membership number. Must be unique.'
|
19
19
|
|
20
20
|
- registrar = EffectiveMemberships.Registrar
|
@@ -1,4 +1,7 @@
|
|
1
1
|
= card do
|
2
2
|
%h6= owner
|
3
|
-
%p= membership.categories.to_sentence
|
4
|
-
%p= membership.statuses.to_sentence
|
3
|
+
%p= membership.categories.map(&:membership_directory_title).to_sentence
|
4
|
+
%p= membership.statuses.map(&:membership_directory_title).to_sentence
|
5
|
+
|
6
|
+
- if owner.try(:email).present?
|
7
|
+
%p= reveal_mail_to(owner.email)
|
@@ -28,7 +28,7 @@
|
|
28
28
|
%p You joined on #{membership.joined_on.strftime('%F')} and have not been assigned a membership number.
|
29
29
|
|
30
30
|
- if membership.registration_on > membership.joined_on
|
31
|
-
%p
|
31
|
+
%p Your last category or status change was on #{membership.registration_on.strftime('%F')}.
|
32
32
|
|
33
33
|
- if membership.not_in_good_standing?
|
34
34
|
%p Your membership is Not In Good Standing because of unpurchased fees or dues. Please purchase these dues or contact us.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_memberships
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.6
|
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: 2022-11-
|
11
|
+
date: 2022-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|