invoice_detail.rb 284 B

123456789
  1. class InvoiceDetail < ActiveRecord::Base
  2. # has_and_belongs_to_many :credits, join_table: :invoice_credits
  3. audited
  4. enum status: [:cancelled, :active]
  5. scope :activas, -> { where(invoice_details: { status: 1 }) }
  6. scope :complementos, -> { activas.where(cfdi_type: "P") }
  7. end