R30425-4 StoreTransactionLine - Check For Negative Unit Cost
| Code | 30425-4 |
| Entity | Logistics.Inventory.StoreTransactionLines Entity |
| Name | CheckForNegativeUnitCost |
| Attribute | UnitCost |
| Layer | Front-End |
| Events | AttributeChanging(UnitCost) |
| Priority | Normal |
| Modify | YES |
| Applicable Legislations | ALL // no condition needed |
| Action | IF(Config("DontCheckForNegativeUnitPrice") is NULL or "0" AND UnitCost<0
throw |
| Description | When Unit Cost 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 Cost. |
| Message | The value in field 'Unit Price' cannot be negative. |
| Version | Introduced: 2020.1 |
| Revocable | YES |
* For more information about the Business Rules Documentation Template and a short explanation of each column, see topic System Business Rules.