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 Models::Schedulable
Models::Schedulable::SIMPLE_FORM_OPTIONS
Instance Attribute Summary collapse
- #amount ⇒ BigDecimal readonly
- #business_unit_id ⇒ Integer readonly
- #company_id ⇒ Integer readonly
- #ledger_account_id ⇒ Integer readonly
- #month ⇒ Integer readonly
- #year ⇒ Integer 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 Models::Schedulable
Methods included from Models::AfterCommittable
Methods included from Models::EventPublishable
Instance Attribute Details
#amount ⇒ BigDecimal (readonly)
44 |
# File 'app/models/sales_forecast.rb', line 44 validates :amount, presence: true |
#business_unit_id ⇒ Integer (readonly)
40 |
# File 'app/models/sales_forecast.rb', line 40 validates :business_unit_id, presence: true |
#company_id ⇒ Integer (readonly)
34 |
# File 'app/models/sales_forecast.rb', line 34 validates :company_id, presence: true |
#ledger_account_id ⇒ Integer (readonly)
42 |
# File 'app/models/sales_forecast.rb', line 42 validates :ledger_account_id, presence: true |
#month ⇒ Integer (readonly)
38 |
# File 'app/models/sales_forecast.rb', line 38 validates :month, presence: true |
#year ⇒ Integer (readonly)
36 |
# File 'app/models/sales_forecast.rb', line 36 validates :year, presence: true |
Instance Method Details
#business_unit ⇒ BusinessUnit?
31 |
# File 'app/models/sales_forecast.rb', line 31 belongs_to :business_unit, optional: true |
#company ⇒ Company?
27 |
# File 'app/models/sales_forecast.rb', line 27 belongs_to :company, optional: true |
#ledger_account ⇒ LedgerAccount?
29 |
# File 'app/models/sales_forecast.rb', line 29 belongs_to :ledger_account, optional: true |