1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-29 10:24:20 +01:00
fab-manager/app/models/accounting_period.rb

17 lines
483 B
Ruby
Raw Normal View History

# frozen_string_literal: true
# AccountingPeriod is a period of N days (N > 0) which as been closed by an admin
# to prevent writing new accounting lines (invoices & refunds) during this period of time.
2019-01-07 12:29:52 +01:00
class AccountingPeriod < ActiveRecord::Base
before_destroy { false }
before_update { false }
validates :start_at, :end_at, :closed_at, :closed_by, presence: true
validates_with DateRangeValidator
validates_with PeriodOverlapValidator
2019-01-07 12:29:52 +01:00
def delete
false
end
end