R28919 SalesOrder - Promotional Package Products And Quantities Are Up To Date

Code R28919
Entity Crm.Sales.SalesOrders Entity
Name PromotionalPackageProductsAndQuantitiesAreUpToDate
Attribute -
Layer Back-End
Events Releasing +
Priority Normal
Modify NO
Action Validate that:

For each SalesOrderPromotionalPackage.PromotionalPackage.PromotionalPackageLine:

SalesOrderPromotionalPackage.PromotionalPackage.PromotionalPackageLine.Quantity * SalesOrderPromotionalPackage.NumberOfPackges == SalesOrderLines[SalesOrder; Product == SalesOrderPromotionalPackage.PromotionalPackage.PromotionalPackageLine.Product].QuantityBase
Description

The current validation prevents the user to sell promotional package which definition is changed while he operates with the SalesOrder. For example - the user adds 2 packages of promotional package X to the sales order. The promotional package X has the following lines:

  1. Product A - 2 pcs
  2. Product B - 3 pcs

    So in the sales order lines the following lines are added:

  • line 1 - product A - 4 pcs
  • line 2 - product B - 6 pcs

    Before the user releases the sales order, other user updates the promotional package and its lines are now:

  1. Product A - 3 pcs
  2. Product B - 3 pcs
  3. Product C - 1 pcs

    If the user release the SalesOrder as it is, it would be incorrect. The sales order lines which result from the promotional package X must be updated and the sales order must contain the following lines:

  • line 1 - product A - 6 pcs
  • line 2 - product B - 6 pcs
  • line 3 - product C - 2 pcs
Message "In Sales Order '{DocumentText}' {SalesOrderPromotionalPackage.NumberOfPackages} packages are sold from '{PromotionalPackage.Name}' promotional package, but the lines of the sales order do not contain the products and their quantities from the promotional package definition.

The promotional package is probably changed.

Please, add the promotional package again so the latest information of it is added to the sales order."

Sort Messages By Attribute:** SalesOrderPromotionalPackage.PromotionalPackage**
Introduced In Version 2018.2
Revocable NO

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