class BillingType < InvoicingRecord
  def self.credit_note
    find(1)
  end

  def self.invoice
    find(2)
  end

  def credit_note?
    id == 1
  end

  def invoice?
    id == 2
  end

  def code
    invoice? ? 'FA' : 'AV'
  end

  def name
    invoice? ? 'facture' : 'avoir'
  end
end
