R31605 ProductSupply - Product Supply And Product Group Enterprise Company Are Different

Code R31605
Entity General.Products.ProductSupply Entity
Name ProductSupplyAndProductGroupEnterpriseCompanyAreDifferent
Attribute Product ProductGroup EnterpriseCompany
Layer Back-End
Events Commit
Priority Normal
Modify NO
Applicable Legislations ALL // no condition needed
Action
  1. Validate that:

    ProductSupply.EnterpriseCompany == null                                 OR

    (ProductSupply.EnterpriseCompany != null                          AND 
    (ProductSupply.Product == null                                         OR
    ProductSupply.Product.EnterpriseCompany == null            OR 
    ProductSupply.Product.EnterpriseCompany == ProductSupply.EnterpriseCompany ))

2. Validate that:

ProductSupply.EnterpriseCompany == null                                  OR

(ProductSupply.EnterpriseCompany != null                         AND 
(ProductSupply.ProductGroup == null                                  OR
ProductSupply.ProductGroup.EnterpriseCompany == null   OR
ProductSupply.ProductGroup.EnterpriseCompany == ProductSupply.EnterpriseCompany))

Description Validates that the Enterprise Company of the Product Supply is the same as the Enterprise Company of the Product. OR Validates that the Enterprise Company of the Product Supply is the same as the Enterprise Company of the Product group.
Message Use the message from R31603 LineDiscount - Product Or Group Enterprise Company Is Different
Version Introduced: 21
Revocable NO

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