sales_detail.rb 252 B

12345678910111213
  1. class SalesDetail < ActiveRecord::Base
  2. belongs_to :sale
  3. belongs_to :product
  4. belongs_to :special_price
  5. has_many :pointsales, :through => :sale
  6. enum status: [ :inactive, :active ]
  7. scope :activos, -> { where( "sales_details.status != 0") }
  8. end