Class: Effective::Fee
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Effective::Fee
- Defined in:
- app/models/effective/fee.rb
Instance Method Summary collapse
-
#applicant_submit_fee? ⇒ Boolean
Used by applicant.applicant_submit_fees.
- #bad_standing? ⇒ Boolean
- #custom_fee? ⇒ Boolean
- #default_title ⇒ Object
- #fee_payment_fee? ⇒ Boolean
- #late? ⇒ Boolean
-
#membership_period_fee? ⇒ Boolean
Will advance a membership.fees_paid_through_year value when purchased.
- #to_s ⇒ Object
Instance Method Details
#applicant_submit_fee? ⇒ Boolean
Used by applicant.applicant_submit_fees
83 84 85 |
# File 'app/models/effective/fee.rb', line 83 def applicant_submit_fee? fee_type == 'Applicant' end |
#bad_standing? ⇒ Boolean
75 76 77 78 79 80 |
# File 'app/models/effective/fee.rb', line 75 def bad_standing? return false if bad_standing_on.blank? return false if purchased? bad_standing_on <= Time.zone.now.to_date end |
#custom_fee? ⇒ Boolean
96 97 98 |
# File 'app/models/effective/fee.rb', line 96 def custom_fee? EffectiveMemberships.custom_fee_types.include?(fee_type) end |
#default_title ⇒ Object
100 101 102 |
# File 'app/models/effective/fee.rb', line 100 def default_title [period&.strftime('%Y'), category, fee_type, 'Fee'].compact.join(' ') end |
#fee_payment_fee? ⇒ Boolean
87 88 89 |
# File 'app/models/effective/fee.rb', line 87 def fee_payment_fee? fee_type != 'Applicant' end |
#late? ⇒ Boolean
68 69 70 71 72 73 |
# File 'app/models/effective/fee.rb', line 68 def late? return false if late_on.blank? return false if purchased? late_on <= Time.zone.now.to_date end |
#membership_period_fee? ⇒ Boolean
Will advance a membership.fees_paid_through_year value when purchased
92 93 94 |
# File 'app/models/effective/fee.rb', line 92 def membership_period_fee? fee_type == 'Prorated' || fee_type == 'Renewal' end |
#to_s ⇒ Object
64 65 66 |
# File 'app/models/effective/fee.rb', line 64 def to_s title.presence || default_title() end |