R31405-2 Warehouse Zone - Set Code

Code R31405-2
Entity Logistics.Wms.WarehouseZones Entity
Name SetCode
Attribute WarehouseZoneCode
Layer Front-End
Events AttributeChanged(Parent)
Priority Normal
Modify YES
Applicable Legislations ALL // no condition needed
Action

WarehouseZone.GetNextCode(parentZone):

  • if Zone.Warehouse.Zones (different from current) are null, return "01"
  • if parentZone is null :

    lastCode = Warehouse.Zones (different from current).Where(Parent == null) .OrderByDescending(Zone.Code).FirstOrDefault().Code; return lastCode.IncrementNumberInString();

  • if parentZone is not null and there are Warehouse.Zones(different from current).Where(Parent == parentZone)

    lastCode = Warehouse.Zones (different from current).Where(Parent == parentZone) .OrderByDescending(Zone.Code).FirstOrDefault().Code; return lastCode.IncrementNumberInString();

  • if parentZone is not null but there no Warehouse.Zones(different from current).Where(Parent == parentZone) return parentZone.Code + "-01";



Description Determines the next Code which should be set for the Warehouse Zone.

(RecalcExpression)

(LateDefault)
Message
Version Introduced: 21

Updated: -
Revocable YES/NO

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