effective_memberships 0.12.3 → 0.13.0

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: d7b99c254dcb327566bd4de3e1893a6b94874e055f92b03f79a6f5ee156e48c6
4
- data.tar.gz: 732a011869b5756269d5869b2465aec166b1cdaa8cafeb6f359114d8b544d382
3
+ metadata.gz: ef95cbbf40f72c47c5ca64efd70d28d1cb879e52431b22471f2d570ef759d495
4
+ data.tar.gz: a150c327ec0869e26822f7d484cdc99c414cd666679150e9ee0c83efc3b125aa
5
5
  SHA512:
6
- metadata.gz: 0f1ebd7606208e5603b2039368623427b87ca92888f635f7593efb1b822d40e2821c6a4894df4d935a4cdc5ac9269ce80269e17fc99e772dd00bf1123ef04648
7
- data.tar.gz: 299039b2e0ec8fce83317e9033e62cb6cc6688156ee78fbd6b296c15ccfb0e6ea75a36de48a32d782b539eb06188fb5d2929e547de44bc827deb026839fde6c8
6
+ metadata.gz: cc04a6003782b0c39e4b67d03c012dc3e2247c93b5f43bd38fd47a843da7ee0c9fa11e5a02d56672724f95c453e5cf266179ea22f9e06da851c1d484a583edd2
7
+ data.tar.gz: dc070be5820ad2f616c4320a745879ff26b8e153f24ddc99fb92913d753f96198c387b58b8656e443737cec8ea1b5417032faceb394eae2ea640c61efbb05cf4
@@ -208,6 +208,7 @@ module EffectiveMembershipsOwner
208
208
  fee.assign_attributes(
209
209
  fee_type: 'Discount',
210
210
  category: category,
211
+ from_category: from,
211
212
  period: period,
212
213
  price: price,
213
214
  tax_exempt: category.tax_exempt,
@@ -13,6 +13,9 @@ module Effective
13
13
  # The membership category for this fee, if there's only 1 membership.categories
14
14
  belongs_to :category, polymorphic: true, optional: true
15
15
 
16
+ # Only set on the Discount fee right now
17
+ belongs_to :from_category, polymorphic: true, optional: true
18
+
16
19
  # The membership status for this fee, if there's only 1 membership.statuses
17
20
  belongs_to :with_status, polymorphic: true, optional: true
18
21
 
@@ -149,7 +152,7 @@ module Effective
149
152
  [
150
153
  period.strftime('%Y'),
151
154
  category,
152
- EffectiveResources.et("effective_memberships.fees.#{fee_type.downcase}")
155
+ EffectiveResources.et("effective_memberships.fees.#{fee_type.parameterize.underscore}")
153
156
  ].join(' ')
154
157
  end
155
158
 
@@ -0,0 +1,17 @@
1
+ %h3 Fees
2
+ %p The following fees will be created:
3
+ - month = Time.zone.now.strftime('%B')
4
+
5
+ %ul
6
+ - if applicant.apply_to_join?
7
+ %li A #{month} prorated fee
8
+
9
+ - if applicant.reclassification?
10
+ - if applicant.owner.outstanding_renewal_fees.present?
11
+ %li A renewal fee in their new category
12
+ - else
13
+ %li A #{month} prorated fee to the new category
14
+ %li A #{month} discount fee from their old category
15
+
16
+ - if applicant.reinstatement?
17
+ %li A #{month} prorated fee to their reinstatement category
@@ -22,23 +22,7 @@
22
22
  - if applicant.reinstatement? && reinstatement.present?
23
23
  %p The member will be reinstated with their previous status: #{badges(reinstatement.membership_statuses) || 'None'}.
24
24
 
25
- %h3 Fees
26
- %p The following fees will be created:
27
- - month = Time.zone.now.strftime('%B')
28
-
29
- %ul
30
- - if applicant.apply_to_join?
31
- %li A #{month} prorated fee
32
-
33
- - if applicant.reclassification?
34
- - if applicant.owner.outstanding_renewal_fees.present?
35
- %li A renewal fee in their new category
36
- - else
37
- %li A #{month} prorated fee to the new category
38
- %li A #{month} discount fee from their old category
39
-
40
- - if applicant.reinstatement?
41
- %li A #{month} prorated fee to their reinstatement category
25
+ = render('admin/applicants/fees_approve', f: f, applicant: applicant)
42
26
 
43
27
  %p The following unpurchased fees will be deleted:
44
28
  - outstanding_fee_payment_fees = applicant.owner.outstanding_fee_payment_fees
@@ -457,6 +457,9 @@ class CreateEffectiveMemberships < ActiveRecord::Migration[6.0]
457
457
  t.integer :category_id
458
458
  t.string :category_type
459
459
 
460
+ t.integer :from_category_id
461
+ t.string :from_category_type
462
+
460
463
  t.integer :with_status_id
461
464
  t.string :with_status_type
462
465
 
@@ -1,3 +1,3 @@
1
1
  module EffectiveMemberships
2
- VERSION = '0.12.3'
2
+ VERSION = '0.13.0'
3
3
  end
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.12.3
4
+ version: 0.13.0
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: 2023-03-15 00:00:00.000000000 Z
11
+ date: 2023-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -354,6 +354,7 @@ files:
354
354
  - app/views/admin/applicant_endorsements/_applicant_endorsement.html.haml
355
355
  - app/views/admin/applicant_references/_applicant_reference.html.haml
356
356
  - app/views/admin/applicant_reviews/_applicant_review.html.haml
357
+ - app/views/admin/applicants/_fees_approve.html.haml
357
358
  - app/views/admin/applicants/_form.html.haml
358
359
  - app/views/admin/applicants/_form_applicant.html.haml
359
360
  - app/views/admin/applicants/_form_approve.html.haml