R30383-30 InvoiceLine - Check For Negative Unit Price
| Code | 30383-30 |
| Entity | Crm.Invoicing.InvoiceLines Entity |
| Name | CheckForNegativeUnitPrice |
| Attribute | UnitPrice |
| Layer | Front-End |
| Events | AttributeChanging(UnitPrice) |
| Priority | Normal |
| Modify | YES |
| Applicable Legislations | ALL // no condition needed |
| Action | IF(Config("DontCheckForNegativeUnitPrice") is NULL or "0" AND UnitPrice<0
throw |
| Description | When Unit Price is changing, if there isn't a config option "DontCheckForNegativeUnitPrice" or its value is set to 0, an exception should be thrown on attempts to set a negative value in Unit Price. |
| Message | The value in field 'Unit Price' cannot be negative. |
| Version | Introduced: 2020 |
| Revocable | YES |
* For more information about the Business Rules Documentation Template and a short explanation of each column, see topic System Business Rules.