R28240 SalesOrder - Empty Return For Invoice Line When Positive Quantity And Amount

Code R28240
Entity Crm.Sales.SalesOrders Entity
Name EmptyReturnForInvoiceLineWhenPositiveQuantityAndAmount
Attribute Line.ReturnForInvoiceLine
Layer Front-End

Back-End
Events Planning +
Modify NO
Action Validate that:

if (Quantity >0 && LineAmount >0)

ReturnForInvoiceLine == null
Description According to [Sales Order Row Types](https://enterpris eone.atlassian.net/wiki/spaces/techdoc/pages/82608171/Sales+Order+Row+Types){.external-link}, if the quantity and the amount are positive, then all returning value fields must be empty. One of these fields is Return For Invoice Line in the lines of the Sales Order. If Return For Invoice Line is not null it indicates that the current row is from return sales type and the positive quantity and amount are contradicting.
Message Line {LineNo} in '{DocumentText}' is considered to be normal sale (because it has positive quantity and amount) but attribute 'Return For Invoice Line' is specified. This attribute is used only in cases of returning products or services. Clear the value from 'Return For Invoice Line' for this line.

Sort Messages By Attribute: LineNo
Introduced In Version 2018
Revocable NO

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