R28439 SalesOrder - Check If Payment Type Meets Deferred Payment Options

Code R28439
Entity Crm.Sales.SalesOrders Entity
Name CheckIfPaymentTypeMeetsDeferredPaymentOptions
Attribute PaymentType
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)

PaymentType.SystemType == Cash || PaymentType.SystemType == Card

Description As described in Deferred Payments Options, if there is a minimal deferred amount set for a SalesOrder and the amount to pay is less than the specified minimal amount, the PaymentType can only be Cash or Card. This is a SalesOrder tool which EnterpriseOne clients use to apply certain sales policies.
Message The 'Payment Type' of document {DocumentText} is '{PaymentType.Name}'. 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 Type'.
Introduced In Version 2018.2
Revocable YES

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