Sha256: 738cf0d07b67d3c309ae432d40e7aa90b2178e162e0807a9b51c2e28bef4388c

Contents?: true

Size: 333 Bytes

Versions: 7

Compression:

Stored size: 333 Bytes

Contents

# An sales campaign
#
# Carries an affiliate fee
#
class SalesCampaign < Campaign
  money_columns :sales_fee

  belongs_to :sales_person, :class_name => 'Contact'
  validates :sales_person, :presence => { :if => lambda {|x| x.type == 'SalesCampaign' } }

  ##
  # The sum cost of this campaign
  #
  def cost
    sales_fee
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
e9_crm-0.1.18 app/models/sales_campaign.rb
e9_crm-0.1.17 app/models/sales_campaign.rb
e9_crm-0.1.16 app/models/sales_campaign.rb
e9_crm-0.1.14 app/models/sales_campaign.rb
e9_crm-0.1.13 app/models/sales_campaign.rb
e9_crm-0.1.12 app/models/sales_campaign.rb
e9_crm-0.1.11 app/models/sales_campaign.rb