R28121 Invoice - Parent Sales Order Line Quantiy Unit

Code R28121
Entity Crm.Invoicing.Invoices Entity
Name ParentSalesOrderLineQuantiyUnit
Attribute ParentSalesOrderLine.QuantityUnit
Layer Back-End
Events First Releasing
Modify NO
Action For every line:

If ( Config.CheckInvoiceLinesQuantityUnitDisabled is NOT specified or its KeyValue != 1

AND

InvoiceLine.ParentSalesOrderLine != NULL

AND

InvoiceLine.Product == ParentSalesOrderLine.Product)

, validate that "ParentSalesOrderLine.QuantityUnit = InvoiceLine.QuantityUnit"
Description

The current rule validates that the Quantity Unit set in the current Invoice Line equals the Quantity Unit set in the Parent Sales Order Line.  If the units differ then the Standard Unit Price in the Sales Order will be incorrect according to the Invoice.

The validation is performed on First Releasing of the document, for each of its lines, but only if all of the following conditions are met:

  • the registry key "CheckInvoiceLinesQuantityUnitDisabled" is not defined, does not have a value or its value is different from "1"// for more info about the registry keys, see Config Options Reference
  • the field "Parent Sales Order Line" is not empty
  • the Product in the current invoice line equals the Product from the particular Parent Sales Order Line
Message The quantity measurement unit in line number '{LineNo}' in document '{DocumentText}' is invalid.

The measurement unit in the invoice line can not be different from the unit specified in the parent sales order line.
Version Introduced: - (in implementation)
Revocable YES

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