You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
323 B
10 lines
323 B
2 years ago
|
module Validations::Sales::SetupValidations
|
||
|
def validate_saledate(record)
|
||
|
return unless record.saledate
|
||
|
|
||
|
unless Time.zone.local(2022, 4, 1) <= record.saledate && record.saledate < Time.zone.local(2023, 4, 1)
|
||
|
record.errors.add :saledate, I18n.t("validations.setup.saledate.financial_year")
|
||
|
end
|
||
|
end
|
||
|
end
|