3 changed files with 19 additions and 7 deletions
@ -0,0 +1,9 @@
|
||||
module Validations::Sales::SetupValidations |
||||
def validate_saledate(record) |
||||
return unless record.saledate |
||||
|
||||
if record.saledate < Time.zone.local(2022, 4, 1) |
||||
record.errors.add :saledate, I18n.t("validations.setup.saledate.financial_year") |
||||
end |
||||
end |
||||
end |
||||
Loading…
Reference in new issue