Class: ViewOutgoingPayment

Inherits:
ApplicationViewRecord show all
Includes:
Models::SearchableView
Defined in:
app/models/view_outgoing_payment.rb

Overview

== Schema Information

Table name: view_outgoing_payments
Database name: primary

id :integer primary key
amount :decimal(10, 2)
bank_account_name :text
category :string(255)
check_number :integer
check_state :string(255)
company_name :string(255)
currency :string(255)
exchange_rate :float
last_printed_at :datetime
payee_name :string(255)
payee_type :string(255)
payment_date :date
reconciled :string(255)
reference_number :string(255)
remark :text
reversal_date :date
state :string(255)
supplier_name :string(255)
supplier_type :string(255)
created_at :datetime
updated_at :datetime
bank_account_id :integer
company_id :integer
job_id :string(255)
payee_id :integer
supplier_id :integer

Has many collapse

Instance Method Summary collapse

Methods included from Models::SearchableView

#crm_link, #crm_link_subtitle, #has_columns?, #main_resource, #readonly?

Methods inherited from ApplicationViewRecord

create, create!, #readonly?

Methods inherited from ApplicationRecord

ransackable_associations, ransackable_attributes, ransackable_scopes, ransortable_attributes, #to_relation

Methods included from Models::EventPublishable

#publish_event

Instance Method Details

#outgoing_payment_itemsActiveRecord::Relation<OutgoingPaymentItem>

Returns:

See Also:



37
# File 'app/models/view_outgoing_payment.rb', line 37

has_many :outgoing_payment_items, foreign_key: :outgoing_payment_id

#paymentObject



41
42
43
# File 'app/models/view_outgoing_payment.rb', line 41

def payment
  OutgoingPayment.find(id)
end