R28299 SalesOrder - Check If Payment Due Date Meets Deferred Payment Options

Code R28299
Entity Crm.Sales.SalesOrders Entity
Name CheckIfPaymentDueDateMeetsDeferredPaymentOptions
Attribute PaymentDueDate
Layer Back-End
Events Releasing +
Modify NO
Action Validate that:

If (SalesOrder.DocumentType.DocumentTypePaymentOptions[EnterpriseCompany == SalesOrder.EnterpriseCompany].DeferredPaymentMinimalAmmount != null

&&

SalesOrder.DocumentType.DocumentTypePaymentOptions[EnterpriseCompany == SalesOrder.EnterpriseCompany].DeferredPaymentMinimalAmmount > SalesOrder.AmountToPay* //converted to SalesOrder currency)

PaymentDueDate <= DocumentDate

*For more information see Amount to pay
Description As described in Deferred payments options, if there is a minimal deferred amount set for a SalesOrder and the amount of a SalesOrder is less than the specified minimal amount, the PaymentDueDate cannot be greater date than the DocumentDate. This is a SalesOrder tool which EnterpriseOne clients use to apply certain sales policies.
Message The 'Payment Due Date' of document {DocumentText} is after the Document Date. This defines deferred payment which is not allowed because the Sales Order amount is less than the deferred payment minimum amount - {SalesOrder.DocumentType.DocumentTypePaymentOption.DeferredPaymentMinimalAmount} {SalesOrder.DocumentType.DocumentTypePaymentOption.DeferredPaymentMinimalAmmountCurrency}.

Please change the 'Payment Due Date'.
Introduced In Version 2018.1
Revocable YES

* For more information about the Business Rules Documentation Template and a short explanation of each column, see topic System Business Rules.