R30383-24 InvoiceLine - Calculate Unit Price
Code | 30383-24 |
Entity | Crm.Invoicing.InvoiceLines Entity |
Name | CalculateUnitPrice |
Attribute | UnitPrice |
Layer | Front-End |
Events | AttributeChanged(LineAmount) |
Priority | Normal |
Modify | YES |
Applicable Legislations | ALL // no condition needed |
Action | if (LineAmount != null)
UnitPrice = ((LineAmount / (1 - LineStandardDiscountPercent)) / (1 -
LineCustomDiscountPercent))/ Quantity*
*if Quantity is null or 0, divide by 1 |
Description | When Line Amount is changed, Unit Price should be recalculated. Unit Price is equal to Line Amount increased with the line's discounts and then divided by the Quantity. If Quantity is empty or 0, Unit Price is equal to Line Amount increased with the line's discounts. |
Message | |
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.