Class: BankBalanceStatement
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- BankBalanceStatement
- Includes:
- Models::Auditable
- Defined in:
- app/models/bank_balance_statement.rb
Overview
== Schema Information
Table name: bank_balance_statements
Database name: primary
id :integer not null, primary key
account_number :integer
amount :float
description :string
gl_date :date
created_at :datetime not null
updated_at :datetime not null
creator_id :integer
updater_id :integer
Indexes
index_bank_balance_statements_on_account_number (account_number)
index_bank_balance_statements_on_gl_date (gl_date)
Constant Summary
Constants included from Models::Auditable
Models::Auditable::ALWAYS_IGNORED
Constants included from Schedulable
Schedulable::SIMPLE_FORM_OPTIONS
Instance Attribute Summary collapse
- #account_number ⇒ Object readonly
- #amount ⇒ Object readonly
- #description ⇒ Object readonly
- #gl_date ⇒ Object readonly
Class Method Summary collapse
-
.sorted ⇒ ActiveRecord::Relation<BankBalanceStatement>
A relation of BankBalanceStatements that are sorted.
-
.with_account_name ⇒ ActiveRecord::Relation<BankBalanceStatement>
A relation of BankBalanceStatements that are with account name.
Methods included from Models::Auditable
#all_skipped_columns, #audit_reference_data, #creator, #should_not_save_version, #stamp_record, #updater
Methods inherited from ApplicationRecord
ransackable_associations, ransackable_attributes, ransackable_scopes, ransortable_attributes, #to_relation
Methods included from Schedulable
Methods included from Models::AfterCommittable
Methods included from Models::EventPublishable
Instance Attribute Details
#account_number ⇒ Object (readonly)
28 |
# File 'app/models/bank_balance_statement.rb', line 28 validates :gl_date, :account_number, :description, :amount, presence: true |
#amount ⇒ Object (readonly)
28 |
# File 'app/models/bank_balance_statement.rb', line 28 validates :gl_date, :account_number, :description, :amount, presence: true |
#description ⇒ Object (readonly)
28 |
# File 'app/models/bank_balance_statement.rb', line 28 validates :gl_date, :account_number, :description, :amount, presence: true |
#gl_date ⇒ Object (readonly)
28 |
# File 'app/models/bank_balance_statement.rb', line 28 validates :gl_date, :account_number, :description, :amount, presence: true |
Class Method Details
.sorted ⇒ ActiveRecord::Relation<BankBalanceStatement>
A relation of BankBalanceStatements that are sorted. Active Record Scope
25 |
# File 'app/models/bank_balance_statement.rb', line 25 scope :sorted, -> { order(:gl_date, :account_number) } |
.with_account_name ⇒ ActiveRecord::Relation<BankBalanceStatement>
A relation of BankBalanceStatements that are with account name. Active Record Scope
26 |
# File 'app/models/bank_balance_statement.rb', line 26 scope :with_account_name, -> { select("bank_balance_statements.*, (select name from ledger_accounts where ledger_accounts.number = bank_balance_statements.account_number) as account_name") } |