class Invoice < ApplicationRecord belongs_to :user belongs_to :user_firm belongs_to :customer has_many :invoice_products def netto_amount 0.0 end end