Class: Payment

Inherits:
ApplicationRecord show all
Defined in:
app/models/payment.rb

Overview

Effective payment of a reimbursement

Instance Attribute Summary collapse

Belongs to collapse

Methods inherited from ApplicationRecord

ransackable_associations, ransackable_attributes

Instance Attribute Details

#amountDecimal

Returns:

  • (Decimal)

Validations:



10
# File 'app/models/payment.rb', line 10

validates :amount, :reimbursement, :currency, :date, :method, presence: true

#codeString

Returns:

  • (String)


129
# File 'db/schema.rb', line 129

t.string "code"

#cost_amountDecimal

Returns:

  • (Decimal)


126
# File 'db/schema.rb', line 126

t.decimal "cost_amount", precision: 10, scale: 2

#cost_currencyString

Returns:

  • (String)


127
# File 'db/schema.rb', line 127

t.string "cost_currency"

#created_atDateTime

Returns:

  • (DateTime)


133
# File 'db/schema.rb', line 133

t.datetime "created_at"

#currencyString

Returns:

  • (String)

Validations:



10
# File 'app/models/payment.rb', line 10

validates :amount, :reimbursement, :currency, :date, :method, presence: true

#dateDate

Returns:

  • (Date)

Validations:



10
# File 'app/models/payment.rb', line 10

validates :amount, :reimbursement, :currency, :date, :method, presence: true

#fileString

Returns:

  • (String)


132
# File 'db/schema.rb', line 132

t.string "file"

#methodString

Returns:

  • (String)

Validations:



10
# File 'app/models/payment.rb', line 10

validates :amount, :reimbursement, :currency, :date, :method, presence: true

#notesText

Returns:

  • (Text)


131
# File 'db/schema.rb', line 131

t.text "notes"

#subjectString

Returns:

  • (String)


130
# File 'db/schema.rb', line 130

t.string "subject"

#updated_atDateTime

Returns:

  • (DateTime)


134
# File 'db/schema.rb', line 134

t.datetime "updated_at"

Instance Method Details

#reimbursementReimbursement

The associated reimbursement

Validations:



8
# File 'app/models/payment.rb', line 8

belongs_to :reimbursement, inverse_of: :payments