Class: CommissionSection
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- CommissionSection
- Defined in:
- app/models/commission_section.rb
Instance Method Summary collapse
Instance Method Details
#fee(amount) ⇒ Object
72 73 74 |
# File 'app/models/commission_section.rb', line 72 def fee(amount) (self.static_fee||0) + amount*(self.percent_fee||0)/100 end |
#weight ⇒ Object
66 67 68 69 70 |
# File 'app/models/commission_section.rb', line 66 def weight return 3 unless terminal_profile_id.blank? return 2 unless agent_id.blank? return 1 end |