Class: SalesForecast
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- SalesForecast
- Includes:
- Models::Auditable
- Defined in:
- app/models/sales_forecast.rb
Overview
== Schema Information
Table name: sales_forecasts
Database name: primary
id :integer not null, primary key
amount :decimal(12, 2)
month :integer
year :integer
created_at :datetime not null
updated_at :datetime not null
business_unit_id :integer
company_id :integer
creator_id :integer
ledger_account_id :integer
updater_id :integer
Indexes
idx_sales_forecasts_company_account_year_month (company_id,ledger_account_id,year,month)
Constant Summary
Constants included from Models::Auditable
Models::Auditable::ALWAYS_IGNORED
Constants included from Schedulable
Schedulable::SIMPLE_FORM_OPTIONS
Instance Attribute Summary collapse
- #amount ⇒ Object readonly
- #business_unit_id ⇒ Object readonly
- #company_id ⇒ Object readonly
- #ledger_account_id ⇒ Object readonly
- #month ⇒ Object readonly
- #year ⇒ Object readonly
Belongs to collapse
Methods included from Models::Auditable
Methods included from Models::Auditable
#all_skipped_columns, #audit_reference_data, #should_not_save_version, #stamp_record
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
#amount ⇒ Object (readonly)
30 |
# File 'app/models/sales_forecast.rb', line 30 validates :company_id, :year, :month, :business_unit_id, :ledger_account_id, :amount, presence: true |
#business_unit_id ⇒ Object (readonly)
30 |
# File 'app/models/sales_forecast.rb', line 30 validates :company_id, :year, :month, :business_unit_id, :ledger_account_id, :amount, presence: true |
#company_id ⇒ Object (readonly)
30 |
# File 'app/models/sales_forecast.rb', line 30 validates :company_id, :year, :month, :business_unit_id, :ledger_account_id, :amount, presence: true |
#ledger_account_id ⇒ Object (readonly)
30 |
# File 'app/models/sales_forecast.rb', line 30 validates :company_id, :year, :month, :business_unit_id, :ledger_account_id, :amount, presence: true |
#month ⇒ Object (readonly)
30 |
# File 'app/models/sales_forecast.rb', line 30 validates :company_id, :year, :month, :business_unit_id, :ledger_account_id, :amount, presence: true |
#year ⇒ Object (readonly)
30 |
# File 'app/models/sales_forecast.rb', line 30 validates :company_id, :year, :month, :business_unit_id, :ledger_account_id, :amount, presence: true |
Instance Method Details
#business_unit ⇒ BusinessUnit
28 |
# File 'app/models/sales_forecast.rb', line 28 belongs_to :business_unit, optional: true |
#company ⇒ Company
26 |
# File 'app/models/sales_forecast.rb', line 26 belongs_to :company, optional: true |
#ledger_account ⇒ LedgerAccount
27 |
# File 'app/models/sales_forecast.rb', line 27 belongs_to :ledger_account, optional: true |