Browse Source

Wrapper hbrentshortfall

pull/321/head
baarkerlounger 3 years ago
parent
commit
f01c9ad289
  1. 2
      app/models/validations/financial_validations.rb

2
app/models/validations/financial_validations.rb

@ -2,7 +2,7 @@ module Validations::FinancialValidations
# Validations methods need to be called 'validate_<page_name>' to run on model save
# or 'validate_' to run on submit as well
def validate_outstanding_rent_amount(record)
if record.hbrentshortfall == 1 && record.tshortfall.present?
if !record.has_hbrentshortfall? && record.tshortfall.present?
record.errors.add :tshortfall, I18n.t("validations.financial.tshortfall.outstanding_amount_not_required")
end
end

Loading…
Cancel
Save