Last modified on 23 June 2026, at 13:42

Difference between revisions of "MRO Material Management"

 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{UnderConstructionStart}}
 
 
== MRO Material Management ==
 
== MRO Material Management ==
  
 
<div style="border-left: 4px solid #36c; background-color: #f8f9fa; padding: 10px 12px; margin: 12px 0;">
 
<div style="border-left: 4px solid #36c; background-color: #f8f9fa; padding: 10px 12px; margin: 12px 0;">
'''Summary:''' The MRO material management features provide the foundation for handling materials, material master data, reservations, storage locations, and goods movements in MRO workflows. The central objects are <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Material</span>, <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">MaterialMaster</span>, <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Reservation</span>, <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">GoodsMovement</span>, and <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">StorageLocation</span>. Materials are linked to master data and storage locations. Reservations link materials to tasks and define planned or actual quantities for maintenance work.
+
'''Summary:''' The MRO material management features provide the foundation for handling materials, material master data, reservations, storage locations, and goods movements in MRO workflows. The central objects are <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Material</span>, <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">MaterialMaster</span>, and <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Reservation</span>. Materials are linked to master data and storage locations. Reservations are created manually by users and link materials to tasks.
 
</div>
 
</div>
  
MRO material management is used to support maintenance work with the required spare parts, consumables, tools, or other material items.
+
MRO material management is used to support maintenance work with required spare parts, consumables, tools, or other material items.
  
In a maintenance workflow, users may need to know:
+
Users can see which material is required for a task, where the material is stored, how much material is available, how much material is reserved, and which reservation status applies.
 
+
* which material is required for a task
+
* which material master data belongs to a material
+
* where the material is stored
+
* how much material is available
+
* how much material is already reserved
+
* which reservations exist for a task
+
* whether a reservation is planned, confirmed, issued, cancelled, or expired
+
 
+
The material management implementation separates the general material catalogue from the actual material quantity and reservation handling.
+
  
 
== Basic concept ==
 
== Basic concept ==
 
The material management implementation is built around the following main objects:
 
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 38: Line 25:
 
|-
 
|-
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Reservation</span>
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Reservation</span>
| Workflow / transaction object
+
| Workflow object
| Represents a material reservation for a task. It links a material to a task and stores planned and actual quantities.
+
| Represents a manually created material reservation for a task. It links a material to a task and stores planned and actual quantities.
 
|-
 
|-
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">GoodsMovement</span>
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">GoodsMovement</span>
| Base class
+
| Technical base class
 
| Provides the common <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">QUANTITY</span> property used by both materials and reservations.
 
| Provides the common <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">QUANTITY</span> property used by both materials and reservations.
 
|-
 
|-
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">StorageLocation</span>
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">StorageLocation</span>
| Storage master / location object
+
| Related storage object
| Represents a physical storage location and stores storage-related information such as storage type, dimensions, access type, and occupancy status.
+
| Represents a physical storage location for materials.
 
|}
 
|}
  
 
<div style="border-left: 4px solid #36c; background-color: #f8f9fa; padding: 10px 12px; margin: 12px 0;">
 
<div style="border-left: 4px solid #36c; background-color: #f8f9fa; padding: 10px 12px; margin: 12px 0;">
'''Core idea:''' <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">MaterialMaster</span> defines what the material is. <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Material</span> represents the material in the MRO stock or material context. <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Reservation</span> links a material to a task and reserves a planned quantity for maintenance execution.
+
'''Core idea:''' <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">MaterialMaster</span> defines what the material is. <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Material</span> represents the material in stock or material context. <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Reservation</span> links a material to a task and reserves a planned quantity for maintenance execution.
 
</div>
 
</div>
  
== Object overview ==
 
  
{| class="wikitable"
 
! Object
 
! Class name
 
! Base / inheritance
 
! Main relations
 
|-
 
| Material
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">UBIK.MRO.Material</span>
 
| Inherits from <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">GoodsMovement</span>
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">LK_MATERIAL_MASTER</span>, <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">LK_STORAGE_LOCATION</span>
 
|-
 
| Material Master
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">UBIK.MRO.MaterialMaster</span>
 
| Master data class
 
| Referenced by <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Material</span> via <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">LK_MATERIAL_MASTER</span>
 
|-
 
| Reservation
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">UBIK.MRO.Reservation</span>
 
| Inherits from <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">GoodsMovement</span>
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">LK_TASK</span>, <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">LK_MATERIAL</span>
 
|-
 
| Goods Movement
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">UBIK.MRO.GoodsMovement</span>
 
| Base class
 
| Provides <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">QUANTITY</span> to derived objects
 
|-
 
| Storage Location
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">UBIK.MRO.StorageLocation</span>
 
| Functional location specialization
 
| Referenced by <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Material</span> via <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">LK_STORAGE_LOCATION</span>
 
|}
 
  
== GoodsMovement ==
 
 
=== Purpose ===
 
 
<span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">GoodsMovement</span> is the base class for material-related quantity-bearing objects.
 
 
It defines the common quantity concept used by both:
 
 
* <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Material</span>
 
* <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Reservation</span>
 
 
=== Important properties ===
 
 
{| class="wikitable"
 
! Property
 
! Type
 
! Meaning
 
|-
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">QUANTITY</span>
 
| double
 
| Quantity value for the goods movement. For <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Material</span>, this is the material quantity. For <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Reservation</span>, this is the actual reservation quantity and has reservation-specific validation.
 
|}
 
  
 
== MaterialMaster ==
 
== MaterialMaster ==
Line 118: Line 51:
  
 
It stores item-level master data that can be referenced by material instances in MRO.
 
It stores item-level master data that can be referenced by material instances in MRO.
 
A material master describes the material independently from a concrete reservation or task.
 
  
 
=== Important properties ===
 
=== Important properties ===
Line 130: Line 61:
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">ITEM_NUMBER</span>
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">ITEM_NUMBER</span>
 
| string
 
| string
| Item number or material number of the material master.
+
| Item number or material number.
 
|-
 
|-
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">PACKAGING_UNIT</span>
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">PACKAGING_UNIT</span>
 
| string
 
| string
| Packaging unit of the material.
+
| Packaging unit.
 
|-
 
|-
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">PACKAGING_SIZE</span>
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">PACKAGING_SIZE</span>
Line 146: Line 77:
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">UNIT_OF_MEASURE</span>
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">UNIT_OF_MEASURE</span>
 
| string
 
| string
| Unit of measure used for the material.
+
| Unit of measure.
 
|-
 
|-
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">MATERIAL_TYPE</span>
+
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">MATERIAL_TYPE</span> / <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">MaterialType</span>
| int
+
| int / enum
| Underlying integer value for the material type.
+
| Material type.
|-
+
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">MaterialType</span>
+
| enum
+
| Typed accessor for <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">MATERIAL_TYPE</span>.
+
 
|-
 
|-
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">MANUFACTURER_COMPANY_NAME</span>
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">MANUFACTURER_COMPANY_NAME</span>
Line 167: Line 94:
 
=== Material type ===
 
=== Material type ===
  
The typed material type accessor is <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">MaterialType</span>.
+
Values of <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">MaterialType</span> are:
 
+
Known values are:
+
  
 
* <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">SpareParts</span>
 
* <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">SpareParts</span>
Line 175: Line 100:
 
* <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Tools</span>
 
* <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Tools</span>
  
<div style="border-left: 4px solid #f0ad4e; background-color: #fff8e5; padding: 10px 12px; margin: 12px 0;">
 
'''Open point:''' No explicit SAP or ERP synchronization behavior was found in the inspected classes. <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">ITEM_NUMBER</span> may correspond to an external material number, but the exact SAP/ERP mapping is unclear from the available code information.
 
</div>
 
  
 
== Material ==
 
== Material ==
Line 191: Line 113:
 
* a material master via <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">LK_MATERIAL_MASTER</span>
 
* a material master via <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">LK_MATERIAL_MASTER</span>
 
* a storage location via <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">LK_STORAGE_LOCATION</span>
 
* a storage location via <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">LK_STORAGE_LOCATION</span>
 
It also exposes calculated reservation and availability logic.
 
  
 
=== Important properties ===
 
=== Important properties ===
Line 222: Line 142:
 
| Calculated property
 
| Calculated property
 
|-
 
|-
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">MATERIAL_STATUS</span>
+
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">MATERIAL_STATUS</span> / <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">MaterialStatus</span>
| int
+
| int / enum
| Underlying integer value for the material status.
+
| Material status.
| Stored property
+
| User/admin managed property
|-
+
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">MaterialStatus</span>
+
| enum
+
| Typed accessor for <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">MATERIAL_STATUS</span>.
+
| Stored through <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">MATERIAL_STATUS</span>
+
 
|}
 
|}
  
 
=== Material status ===
 
=== Material status ===
  
The material status is stored in <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">MATERIAL_STATUS</span> and exposed through the typed accessor <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">MaterialStatus</span>.
+
The material status is stored in <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">MATERIAL_STATUS</span> and exposed through <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">MaterialStatus</span>.
  
Known values are:
+
The property is managed by the user or administrator. The system does not change it automatically.
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 250: Line 165:
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Inactive</span>
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Inactive</span>
 
| 10
 
| 10
| Material is inactive.
+
| Material is inactive and should not be used for new reservations.
 
|-
 
|-
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Active</span>
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Active</span>
 
| 20
 
| 20
| Material is active.
+
| Material is active and can be used for reservations.
 
|}
 
|}
 
<div style="border-left: 4px solid #f0ad4e; background-color: #fff8e5; padding: 10px 12px; margin: 12px 0;">
 
'''Open point:''' The inspected class information does not show specific methods that automatically change <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">MaterialStatus</span>. Status changes outside these classes are unclear from code.
 
</div>
 
  
 
=== Reserved quantity ===
 
=== Reserved quantity ===
Line 271: Line 182:
  
 
The calculated value is the sum of <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">QTY_PLANNED</span> of these confirmed reservations.
 
The calculated value is the sum of <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">QTY_PLANNED</span> of these confirmed reservations.
 
<div style="border-left: 4px solid #36c; background-color: #f8f9fa; padding: 10px 12px; margin: 12px 0;">
 
'''Important:''' <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">RESERVED_QUANTITY</span> is not treated as a normal stored quantity in the business logic. It is computed from confirmed <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Reservation</span> objects.
 
</div>
 
  
 
=== Available quantity ===
 
=== Available quantity ===
  
The available material quantity is calculated by the method <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">AvailableQuantity()</span>.
+
The available material quantity is calculated by <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">AvailableQuantity()</span>.
  
 
<div style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 8px 10px; margin: 10px 0;">
 
<div style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 8px 10px; margin: 10px 0;">
 
AvailableQuantity = QUANTITY - RESERVED_QUANTITY
 
AvailableQuantity = QUANTITY - RESERVED_QUANTITY
 
</div>
 
</div>
 
=== Active reservations ===
 
 
The method <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">HasActiveReservation()</span> checks whether active reservations exist for the material.
 
 
It queries reservations where:
 
 
* <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">LK_MATERIAL</span> points to the current material
 
* <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">STATUS</span> is lower than or equal to <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">ReservationStatus.Confirmed</span>
 
 
This means the method considers reservations up to the confirmed state as active.
 
  
 
=== Delete behavior ===
 
=== Delete behavior ===
  
 
<span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Material.InternalDeleteAllowed()</span> prevents deleting a material if it still has quantity or active reservations.
 
<span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Material.InternalDeleteAllowed()</span> prevents deleting a material if it still has quantity or active reservations.
 
Deletion is only allowed if the base delete conditions are fulfilled and:
 
 
* <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">QUANTITY</span> is lower than or equal to 0
 
* <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">HasActiveReservation()</span> returns false
 
  
 
<div style="border-left: 4px solid #d33; background-color: #fff5f5; padding: 10px 12px; margin: 12px 0;">
 
<div style="border-left: 4px solid #d33; background-color: #fff5f5; padding: 10px 12px; margin: 12px 0;">
 
'''Restriction:''' A <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Material</span> cannot be deleted while it has a quantity greater than 0 or active reservations.
 
'''Restriction:''' A <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Material</span> cannot be deleted while it has a quantity greater than 0 or active reservations.
 
</div>
 
</div>
 +
  
 
== Reservation ==
 
== Reservation ==
Line 312: Line 204:
 
=== Purpose ===
 
=== Purpose ===
  
<span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Reservation</span> represents a material reservation for a task.
+
<span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Reservation</span> represents a manually created material reservation for a task.
  
 
It links:
 
It links:
Line 319: Line 211:
 
* a material via <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">LK_MATERIAL</span>
 
* a material via <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">LK_MATERIAL</span>
  
It stores the planned reservation quantity in <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">QTY_PLANNED</span> and can also store an actual quantity through the overridden <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">QUANTITY</span> property.
+
It stores the planned reservation quantity in <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">QTY_PLANNED</span> and the actually issued or consumed quantity in <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">QUANTITY</span>.
  
 
=== Important properties ===
 
=== Important properties ===
Line 339: Line 231:
 
| Setter is blocked when status is <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Issued</span> or <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Confirmed</span>.
 
| Setter is blocked when status is <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Issued</span> or <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Confirmed</span>.
 
|-
 
|-
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">STATUS</span>
+
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">STATUS</span> / <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Status</span>
| int
+
| int / enum
| Underlying integer value for the reservation status.
+
| Reservation status.
 
| Changes are validated by <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">AllowStatusChange(int newStatus)</span>.
 
| Changes are validated by <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">AllowStatusChange(int newStatus)</span>.
|-
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Status</span>
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">ReservationStatus</span>
 
| Typed accessor for <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">STATUS</span>.
 
| Uses the <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">ReservationStatus</span> enum.
 
 
|-
 
|-
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">QTY_PLANNED</span>
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">QTY_PLANNED</span>
Line 356: Line 243:
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">QUANTITY</span>
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">QUANTITY</span>
 
| double
 
| double
| Actual reservation quantity. Overrides <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">GoodsMovement.QUANTITY</span>.
+
| Actually issued or consumed quantity. Overrides <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">GoodsMovement.QUANTITY</span>.
 
| Setter validates through <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">AllowQuantity(double)</span>.
 
| Setter validates through <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">AllowQuantity(double)</span>.
 
|}
 
|}
Line 362: Line 249:
 
=== Reservation status ===
 
=== Reservation status ===
  
The reservation status is stored in <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">STATUS</span> and exposed through the typed accessor <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Status</span>.
+
Values of <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">ReservationStatus</span> are:
 
+
Known values of <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">ReservationStatus</span> are:
+
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 385: Line 270:
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Cancelled</span>
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Cancelled</span>
 
| 30
 
| 30
| Reservation was cancelled. This is only allowed if the reservation has not been issued.
+
| Reservation was cancelled.
 
|-
 
|-
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Expired</span>
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Expired</span>
Line 391: Line 276:
 
| Reservation has expired.
 
| Reservation has expired.
 
|}
 
|}
 +
  
 
=== Status change rules ===
 
=== Status change rules ===
Line 415: Line 301:
 
* <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">LK_MATERIAL</span> is assigned
 
* <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">LK_MATERIAL</span> is assigned
 
* the new quantity is greater than 0
 
* the new quantity is greater than 0
* the new quantity is lower than or equal to <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">LK_MATERIAL.AvailableQuantity()</span>
+
* the new quantity is lower than or equal to <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">LK_MATERIAL.AvailableQuantity()</span>  
  
 
<div style="border-left: 4px solid #36c; background-color: #f8f9fa; padding: 10px 12px; margin: 12px 0;">
 
<div style="border-left: 4px solid #36c; background-color: #f8f9fa; padding: 10px 12px; margin: 12px 0;">
Line 438: Line 324:
 
* <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Issued</span>
 
* <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Issued</span>
 
* <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Confirmed</span>
 
* <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Confirmed</span>
 
This prevents changing the task or material after the reservation has reached a more binding status.
 
  
 
== StorageLocation ==
 
== StorageLocation ==
Line 445: Line 329:
 
=== Purpose ===
 
=== Purpose ===
  
<span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">StorageLocation</span> represents a physical storage location.
+
<span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">StorageLocation</span> is a related object used to represent a physical storage location.
  
It is a functional location specialization and can be linked from <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Material</span> via <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">LK_STORAGE_LOCATION</span>.
+
A material can reference a storage location via <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">LK_STORAGE_LOCATION</span>.
  
A storage location stores information about storage type, dimensions, access type, label, level, position, and occupancy.
+
=== Important properties and values ===
 
+
=== Important properties ===
+
  
 
{| class="wikitable"
 
{| class="wikitable"
 
! Property
 
! Property
 
! Type
 
! Type
! Meaning
+
! Values / meaning
 
|-
 
|-
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">STORAGE_TYPE</span>
+
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">STORAGE_TYPE</span> / <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">StorageType</span>
| int
+
| int / enum
| Underlying integer value for storage type.
+
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Floor</span>, <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Shelf</span>, <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Rack</span>, <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Bin</span>, <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Pallet</span>, <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Container</span>
 
|-
 
|-
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">StorageType</span>
+
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">ACCESS_TYPE</span> / <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">AccessType</span>
| enum
+
| int / enum
| Typed accessor for <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">STORAGE_TYPE</span>.
+
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Manual</span>, <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Forklift</span>, <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Crane</span>, <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Automated</span>
 
|-
 
|-
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">MAX_WEIGHT</span>
+
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">OCCUPANCY_STATUS</span> / <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">OccupancyStatus</span>
| double
+
| int / enum
| Maximum allowed weight for the storage location.
+
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Empty</span>, <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Partial</span>, <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Full</span>, <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Reserved</span>, <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Blocked</span>, <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">OutOfService</span>
|-
+
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">MAX_VOLUME</span>
+
| double
+
| Maximum allowed volume for the storage location.
+
|-
+
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">LENGTH</span>
+
| double
+
| Length of the storage location.
+
|-
+
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">WIDTH</span>
+
| double
+
| Width of the storage location.
+
|-
+
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">HEIGHT</span>
+
| double
+
| Height of the storage location.
+
|-
+
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">ACCESS_TYPE</span>
+
| int
+
| Underlying integer value for access type.
+
|-
+
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">AccessType</span>
+
| enum
+
| Typed accessor for <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">ACCESS_TYPE</span>.
+
 
|-
 
|-
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">STORAGE_LABEL</span>
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">STORAGE_LABEL</span>
Line 505: Line 363:
 
| string
 
| string
 
| Position identifier.
 
| Position identifier.
|-
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">OCCUPANCY_STATUS</span>
 
| int
 
| Underlying integer value for occupancy status.
 
|-
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">OccupancyStatus</span>
 
| enum
 
| Typed accessor for <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">OCCUPANCY_STATUS</span>.
 
 
|}
 
|}
  
=== Storage type ===
+
== GoodsMovement ==
  
Known values of <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">StorageType</span> are:
+
<span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">GoodsMovement</span> is a technical base class.
  
* <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Floor</span>
+
It provides the common <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">QUANTITY</span> property for material-related objects such as <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Material</span> and <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Reservation</span>.
* <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Shelf</span>
+
* <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Rack</span>
+
* <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Bin</span>
+
* <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Pallet</span>
+
* <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Container</span>
+
  
=== Access type ===
 
  
Known values of <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">AccessType</span> are:
 
  
* <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Manual</span>
 
* <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Forklift</span>
 
* <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Crane</span>
 
* <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Automated</span>
 
 
=== Occupancy status ===
 
 
Known values of <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">OccupancyStatus</span> are:
 
 
* <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Empty</span>
 
* <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Partial</span>
 
* <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Full</span>
 
* <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Reserved</span>
 
* <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Blocked</span>
 
* <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">OutOfService</span>
 
 
<div style="border-left: 4px solid #f0ad4e; background-color: #fff8e5; padding: 10px 12px; margin: 12px 0;">
 
'''Open point:''' The inspected <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">StorageLocation</span> information does not show automatic occupancy calculation. It is unclear from code whether <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">OCCUPANCY_STATUS</span> is updated manually, by workflow logic, or by another module.
 
</div>
 
 
== Relations ==
 
 
The following relations are relevant for material management.
 
 
{| class="wikitable"
 
! Relation
 
! Source
 
! Target
 
! Meaning
 
|-
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">LK_MATERIAL_MASTER</span>
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Material</span>
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">MaterialMaster</span>
 
| Links a material instance to its master data.
 
|-
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">LK_STORAGE_LOCATION</span>
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Material</span>
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">StorageLocation</span>
 
| Defines where the material is stored.
 
|-
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">LK_MATERIAL</span>
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Reservation</span>
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Material</span>
 
| Defines which material is reserved.
 
|-
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">LK_TASK</span>
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Reservation</span>
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Task</span>
 
| Defines the task for which the material is reserved.
 
|}
 
  
 
== Quantity concepts ==
 
== Quantity concepts ==
 
=== Material quantity ===
 
 
The material quantity is stored in <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Material.QUANTITY</span>.
 
 
Because <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Material</span> inherits from <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">GoodsMovement</span>, the property is inherited from the base class.
 
 
=== Reserved quantity ===
 
 
The reserved quantity is exposed through <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Material.RESERVED_QUANTITY</span>.
 
 
It is calculated by summing the <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">QTY_PLANNED</span> values of confirmed reservations for the material.
 
 
Only reservations with <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Status</span> equal to <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">ReservationStatus.Confirmed</span> are included in this calculation.
 
 
=== Available quantity ===
 
 
Available quantity is calculated by <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Material.AvailableQuantity()</span>.
 
 
<div style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 8px 10px; margin: 10px 0;">
 
AvailableQuantity = QUANTITY - RESERVED_QUANTITY
 
</div>
 
 
=== Planned reservation quantity ===
 
 
The planned reservation quantity is stored in <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Reservation.QTY_PLANNED</span>.
 
 
It can only be set if:
 
 
* the reservation is still <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Planned</span>
 
* a material is assigned
 
* the quantity is greater than 0
 
* the quantity does not exceed the material's available quantity
 
 
=== Actual reservation quantity ===
 
 
The actual reservation quantity is stored in <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Reservation.QUANTITY</span>.
 
 
This property overrides <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">GoodsMovement.QUANTITY</span> and can only be set if the status is <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Planned</span> or <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Confirmed</span> and the new quantity is greater than 0.
 
 
=== Quantity overview ===
 
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 644: Line 396:
 
|-
 
|-
 
| Available quantity
 
| Available quantity
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">AvailableQuantity()</span>
+
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">AvailableQuantity()</span>  
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Material</span>
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Material</span>
 
| Calculated
 
| Calculated
Line 655: Line 407:
 
| Validated by <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">AllowQuantityPlanned(double)</span>.
 
| Validated by <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">AllowQuantityPlanned(double)</span>.
 
|-
 
|-
| Actual reservation quantity
+
| Actually issued or consumed quantity
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">QUANTITY</span>
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">QUANTITY</span>
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Reservation</span>
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Reservation</span>
Line 665: Line 417:
  
 
=== Creating or editing a reservation ===
 
=== Creating or editing a reservation ===
 +
 +
Reservations are created manually by the user.
  
 
A reservation links a material to a task.
 
A reservation links a material to a task.
Line 671: Line 425:
  
 
# <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">LK_MATERIAL</span> must be set.
 
# <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">LK_MATERIAL</span> must be set.
# <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">LK_TASK</span> should point to the task requiring the material.
+
# <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">LK_TASK</span> must point to the task requiring the material.
 
# <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Status</span> must still be <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Planned</span>.
 
# <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Status</span> must still be <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Planned</span>.
 
# <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">QTY_PLANNED</span> must be greater than 0.
 
# <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">QTY_PLANNED</span> must be greater than 0.
Line 680: Line 434:
 
When a reservation is confirmed, it contributes to the material's reserved quantity.
 
When a reservation is confirmed, it contributes to the material's reserved quantity.
  
This affects the available quantity of the material because:
+
This affects the available quantity of the material.
  
 
<div style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 8px 10px; margin: 10px 0;">
 
<div style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 8px 10px; margin: 10px 0;">
Line 689: Line 443:
  
 
When a task is finished, the task logic calls <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">CloseReservations()</span>.
 
When a task is finished, the task logic calls <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">CloseReservations()</span>.
 
The method processes active reservations for the task:
 
 
* if a reservation has status <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Confirmed</span>, it is set to <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Issued</span>
 
* otherwise, it is set to <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Cancelled</span>
 
 
The changed reservations are added to the unsaved children through <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">AddToUnsavedChildren(reservation)</span> so that the changes are persisted.
 
  
 
<div style="border-left: 4px solid #36c; background-color: #f8f9fa; padding: 10px 12px; margin: 12px 0;">
 
<div style="border-left: 4px solid #36c; background-color: #f8f9fa; padding: 10px 12px; margin: 12px 0;">
 
'''Workflow effect:''' Finishing a task closes its reservations. Confirmed reservations become <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Issued</span>; other active reservations become <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Cancelled</span>.
 
'''Workflow effect:''' Finishing a task closes its reservations. Confirmed reservations become <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Issued</span>; other active reservations become <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Cancelled</span>.
 
</div>
 
</div>
 +
  
 
== Usage in tasks ==
 
== Usage in tasks ==
Line 710: Line 458:
 
* the task through <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">LK_TASK</span>
 
* the task through <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">LK_TASK</span>
 
* the planned quantity through <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">QTY_PLANNED</span>
 
* the planned quantity through <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">QTY_PLANNED</span>
 +
* the actually issued or consumed quantity through <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">QUANTITY</span>
 
* the reservation state through <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Status</span>
 
* the reservation state through <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Status</span>
  
This means that material usage is tracked at task level in the inspected implementation.
+
This means that material usage is tracked at task level.
 
+
<div style="border-left: 4px solid #f0ad4e; background-color: #fff8e5; padding: 10px 12px; margin: 12px 0;">
+
'''Open point:''' The inspected information explicitly confirms the relation to tasks. Direct relations to work packages or work orders were not confirmed in the provided code analysis. If work packages or work orders use materials indirectly through tasks, that should be documented with the exact relation or navigation path.
+
</div>
+
 
+
== Goods movement usage ==
+
 
+
<span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">GoodsMovement</span> is the common base class for quantity-bearing material objects.
+
 
+
Both <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Material</span> and <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Reservation</span> inherit from it and expose <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">QUANTITY</span>.
+
 
+
In the inspected implementation:
+
 
+
* <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Material.QUANTITY</span> represents the material quantity
+
* <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Reservation.QUANTITY</span> represents the actual quantity for the reservation and applies reservation-specific validation
+
* <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Reservation.QTY_PLANNED</span> represents the planned reserved quantity
+
* <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Material.RESERVED_QUANTITY</span> is calculated from confirmed reservations
+
 
+
<div style="border-left: 4px solid #f0ad4e; background-color: #fff8e5; padding: 10px 12px; margin: 12px 0;">
+
'''Open point:''' The inspected information describes <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">GoodsMovement</span> as a base class for quantity-bearing objects. It does not confirm separate movement types such as goods receipt, goods issue, transfer, correction, or consumption postings.
+
</div>
+
  
 
== Example workflow ==
 
== Example workflow ==
 
=== Scenario ===
 
 
A task requires one spare part from stock.
 
  
 
=== Step 1: Material master exists ===
 
=== Step 1: Material master exists ===
  
The spare part is defined as a <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">MaterialMaster</span>.
+
A spare part is defined as a <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">MaterialMaster</span>.
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 779: Line 503:
 
| 0
 
| 0
 
|-
 
|-
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">AvailableQuantity()</span>
+
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">AvailableQuantity()</span>  
 
| 10
 
| 10
 
|}
 
|}
Line 785: Line 509:
 
=== Step 3: Reservation is created for a task ===
 
=== Step 3: Reservation is created for a task ===
  
A <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Reservation</span> links the material to the task.
+
A user manually creates a <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Reservation</span> and links the material to the task.
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 803: Line 527:
 
| 1
 
| 1
 
|}
 
|}
 
The planned quantity is allowed because the material has enough available quantity.
 
  
 
=== Step 4: Reservation is confirmed ===
 
=== Step 4: Reservation is confirmed ===
Line 822: Line 544:
 
| 1
 
| 1
 
|-
 
|-
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Material.AvailableQuantity()</span>
+
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Material.AvailableQuantity()</span>  
 
| 9
 
| 9
 
|}
 
|}
  
=== Step 5: Task is finished ===
+
=== Step 5: Actual quantity is entered ===
 +
 
 +
The actually issued or consumed quantity is stored in <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Reservation.QUANTITY</span>.
 +
 
 +
{| class="wikitable"
 +
! Property
 +
! Example
 +
|-
 +
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Reservation.QUANTITY</span>
 +
| 1
 +
|}
 +
 
 +
=== Step 6: Task is finished ===
  
 
When the task is finished, <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">CloseReservations()</span> is called.
 
When the task is finished, <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">CloseReservations()</span> is called.
Line 833: Line 567:
  
 
== Validation and business rules ==
 
== Validation and business rules ==
 
The following business rules are implemented in the inspected material management logic.
 
  
 
{| class="wikitable"
 
{| class="wikitable"
 
! Area
 
! Area
 
! Rule
 
! Rule
! Implemented by
 
 
|-
 
|-
 
| Planned reservation quantity
 
| Planned reservation quantity
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">QTY_PLANNED</span> must be greater than 0.
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">QTY_PLANNED</span> must be greater than 0.
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">AllowQuantityPlanned(double)</span>
 
 
|-
 
|-
 
| Planned reservation quantity
 
| Planned reservation quantity
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">QTY_PLANNED</span> can only be changed while the reservation is <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Planned</span>.
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">QTY_PLANNED</span> can only be changed while the reservation is <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Planned</span>.
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">AllowQuantityPlanned(double)</span>
 
 
|-
 
|-
 
| Planned reservation quantity
 
| Planned reservation quantity
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">QTY_PLANNED</span> must not exceed <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">LK_MATERIAL.AvailableQuantity()</span>.
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">QTY_PLANNED</span> must not exceed <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">LK_MATERIAL.AvailableQuantity()</span>.
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">AllowQuantityPlanned(double)</span>
 
 
|-
 
|-
| Actual reservation quantity
+
| Actual issued or consumed quantity
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">QUANTITY</span> must be greater than 0.
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">QUANTITY</span> must be greater than 0.
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">AllowQuantity(double)</span>
 
 
|-
 
|-
| Actual reservation quantity
+
| Actual issued or consumed quantity
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">QUANTITY</span> can only be changed while the reservation is <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Planned</span> or <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Confirmed</span>.
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">QUANTITY</span> can only be changed while the reservation is <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Planned</span> or <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Confirmed</span>.
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">AllowQuantity(double)</span>
 
 
|-
 
|-
 
| Reservation status
 
| Reservation status
 
| Status cannot be changed once the reservation is <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Issued</span>.
 
| Status cannot be changed once the reservation is <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Issued</span>.
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">AllowStatusChange(int newStatus)</span>
 
 
|-
 
|-
 
| Reservation status
 
| Reservation status
 
| A reservation cannot be changed from <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Confirmed</span> back to <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Planned</span>.
 
| A reservation cannot be changed from <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Confirmed</span> back to <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Planned</span>.
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">AllowStatusChange(int newStatus)</span>
 
 
|-
 
|-
 
| Reservation links
 
| Reservation links
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">LK_TASK</span> and <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">LK_MATERIAL</span> cannot be changed when status is <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Issued</span> or <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Confirmed</span>.
 
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">LK_TASK</span> and <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">LK_MATERIAL</span> cannot be changed when status is <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Issued</span> or <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">Confirmed</span>.
| Property setters
 
 
|-
 
|-
 
| Material deletion
 
| Material deletion
 
| Material cannot be deleted while <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">QUANTITY</span> is greater than 0.
 
| Material cannot be deleted while <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">QUANTITY</span> is greater than 0.
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">InternalDeleteAllowed()</span>
 
 
|-
 
|-
 
| Material deletion
 
| Material deletion
 
| Material cannot be deleted while active reservations exist.
 
| Material cannot be deleted while active reservations exist.
| <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">InternalDeleteAllowed()</span> and <span style="font-family: Consolas, 'Courier New', monospace; color: #202122; background-color: #f8f9fa; border: 1px solid #c8ccd1; border-radius: 3px; padding: 1px 4px; white-space: nowrap;">HasActiveReservation()</span>
 
 
|}
 
|}
  
{{UnderConstructionEnd}}
+
 
 +
== See also ==
 +
* [[MRO (Plugin)]]
 +
* [[MRO_Objects_(Client)]]
 +
* [[MRO_Implemented_Objects]]
 +
* [[MROMaintenancePlans]]

Latest revision as of 13:42, 23 June 2026

MRO Material Management

Summary: The MRO material management features provide the foundation for handling materials, material master data, reservations, storage locations, and goods movements in MRO workflows. The central objects are Material, MaterialMaster, and Reservation. Materials are linked to master data and storage locations. Reservations are created manually by users and link materials to tasks.

MRO material management is used to support maintenance work with required spare parts, consumables, tools, or other material items.

Users can see which material is required for a task, where the material is stored, how much material is available, how much material is reserved, and which reservation status applies.

Basic concept

Object Type Purpose
MaterialMaster Master data Defines the catalogue entry for a material, including item number, unit, packaging, manufacturer data, and material type.
Material Quantity-bearing MRO object Represents a material instance or stock entry in MRO. It links to a material master and a storage location and exposes quantity, reserved quantity, and available quantity logic.
Reservation Workflow object Represents a manually created material reservation for a task. It links a material to a task and stores planned and actual quantities.
GoodsMovement Technical base class Provides the common QUANTITY property used by both materials and reservations.
StorageLocation Related storage object Represents a physical storage location for materials.

Core idea: MaterialMaster defines what the material is. Material represents the material in stock or material context. Reservation links a material to a task and reserves a planned quantity for maintenance execution.



MaterialMaster

Purpose

MaterialMaster represents the material master or catalogue entry.

It stores item-level master data that can be referenced by material instances in MRO.

Important properties

Property Type Meaning
ITEM_NUMBER string Item number or material number.
PACKAGING_UNIT string Packaging unit.
PACKAGING_SIZE double Packaging size.
ACTIVE bool Defines whether the material master is active.
UNIT_OF_MEASURE string Unit of measure.
MATERIAL_TYPE / MaterialType int / enum Material type.
MANUFACTURER_COMPANY_NAME string Manufacturer company name.
MANUFACTURER_PRODUCT_TAG string Manufacturer product tag or product identifier.

Material type

Values of MaterialType are:

  • SpareParts
  • Consumables
  • Tools


Material

Purpose

Material represents a material instance or stock entry in MRO.

It inherits from GoodsMovement and therefore uses the inherited QUANTITY property as its material quantity.

A material links to:

  • a material master via LK_MATERIAL_MASTER
  • a storage location via LK_STORAGE_LOCATION

Important properties

Property Type Meaning Stored or calculated
LK_MATERIAL_MASTER MaterialMaster Link to the material master data. Stored link
LK_STORAGE_LOCATION StorageLocation Link to the storage location where the material is located. Stored link
QUANTITY double Material quantity. Inherited from GoodsMovement. Stored property
RESERVED_QUANTITY double Sum of planned quantities of confirmed reservations for this material. Calculated property
MATERIAL_STATUS / MaterialStatus int / enum Material status. User/admin managed property

Material status

The material status is stored in MATERIAL_STATUS and exposed through MaterialStatus.

The property is managed by the user or administrator. The system does not change it automatically.

Value Numeric value Meaning
Undefined 0 No specific material status is defined.
Inactive 10 Material is inactive and should not be used for new reservations.
Active 20 Material is active and can be used for reservations.

Reserved quantity

RESERVED_QUANTITY is calculated at read time.

The calculation uses reservations where:

  • LK_MATERIAL points to the current material
  • STATUS is ReservationStatus.Confirmed

The calculated value is the sum of QTY_PLANNED of these confirmed reservations.

Available quantity

The available material quantity is calculated by AvailableQuantity().

AvailableQuantity = QUANTITY - RESERVED_QUANTITY

Delete behavior

Material.InternalDeleteAllowed() prevents deleting a material if it still has quantity or active reservations.

Restriction: A Material cannot be deleted while it has a quantity greater than 0 or active reservations.


Reservation

Purpose

Reservation represents a manually created material reservation for a task.

It links:

  • a task via LK_TASK
  • a material via LK_MATERIAL

It stores the planned reservation quantity in QTY_PLANNED and the actually issued or consumed quantity in QUANTITY.

Important properties

Property Type Meaning Important behavior
LK_TASK Task Link to the task for which the material is reserved. Setter is blocked when status is Issued or Confirmed.
LK_MATERIAL Material Link to the material being reserved. Setter is blocked when status is Issued or Confirmed.
STATUS / Status int / enum Reservation status. Changes are validated by AllowStatusChange(int newStatus).
QTY_PLANNED double Planned quantity for the reservation. Setter validates through AllowQuantityPlanned(double).
QUANTITY double Actually issued or consumed quantity. Overrides GoodsMovement.QUANTITY. Setter validates through AllowQuantity(double).

Reservation status

Values of ReservationStatus are:

Status Numeric value Meaning
Planned 0 Reservation is planned.
Confirmed 10 Reservation is confirmed and contributes to the material's reserved quantity.
Issued 20 Material has been physically issued.
Cancelled 30 Reservation was cancelled.
Expired 50 Reservation has expired.


Status change rules

Status changes are controlled by AllowStatusChange(int newStatus).

The following rules are applied:

  • no status change is allowed when the current status is Issued
  • changing from Confirmed back to Planned is not allowed
  • other status changes are allowed by this method

Restriction: Once a reservation has status Issued, its status can no longer be changed by the normal status setter logic.

Planned quantity validation

The setter of QTY_PLANNED validates changes through AllowQuantityPlanned(double).

A new planned quantity is only allowed if:

  • Status is ReservationStatus.Planned
  • LK_MATERIAL is assigned
  • the new quantity is greater than 0
  • the new quantity is lower than or equal to LK_MATERIAL.AvailableQuantity()

Quantity rule: A planned reservation quantity can only be set while the reservation is still Planned and only if the selected material has enough available quantity.

Actual quantity validation

The overridden QUANTITY setter validates changes through AllowQuantity(double).

A new actual quantity is only allowed if:

  • the new quantity is greater than 0
  • the status is either Planned or Confirmed

Link editing rules

The setters of LK_TASK and LK_MATERIAL are guarded by reservation status.

The links cannot be changed when the reservation is:

  • Issued
  • Confirmed

StorageLocation

Purpose

StorageLocation is a related object used to represent a physical storage location.

A material can reference a storage location via LK_STORAGE_LOCATION.

Important properties and values

Property Type Values / meaning
STORAGE_TYPE / StorageType int / enum Floor, Shelf, Rack, Bin, Pallet, Container
ACCESS_TYPE / AccessType int / enum Manual, Forklift, Crane, Automated
OCCUPANCY_STATUS / OccupancyStatus int / enum Empty, Partial, Full, Reserved, Blocked, OutOfService
STORAGE_LABEL string Label of the storage location.
LEVEL int Level of the storage location.
POSITION string Position identifier.

GoodsMovement

GoodsMovement is a technical base class.

It provides the common QUANTITY property for material-related objects such as Material and Reservation.



Quantity concepts

Quantity Property / method Object Stored or calculated Notes
Material quantity QUANTITY Material Stored Inherited from GoodsMovement.
Reserved quantity RESERVED_QUANTITY Material Calculated Sum of QTY_PLANNED of confirmed reservations for the material.
Available quantity AvailableQuantity() Material Calculated QUANTITY minus RESERVED_QUANTITY.
Planned reservation quantity QTY_PLANNED Reservation Stored Validated by AllowQuantityPlanned(double).
Actually issued or consumed quantity QUANTITY Reservation Stored Overrides GoodsMovement.QUANTITY and is validated by AllowQuantity(double).

Reservation workflow

Creating or editing a reservation

Reservations are created manually by the user.

A reservation links a material to a task.

For a reservation to define its planned quantity correctly:

  1. LK_MATERIAL must be set.
  2. LK_TASK must point to the task requiring the material.
  3. Status must still be Planned.
  4. QTY_PLANNED must be greater than 0.
  5. QTY_PLANNED must not exceed LK_MATERIAL.AvailableQuantity().

Confirmed reservations

When a reservation is confirmed, it contributes to the material's reserved quantity.

This affects the available quantity of the material.

AvailableQuantity = QUANTITY - sum(QTY_PLANNED of confirmed reservations)

Finishing a task

When a task is finished, the task logic calls CloseReservations().

Workflow effect: Finishing a task closes its reservations. Confirmed reservations become Issued; other active reservations become Cancelled.


Usage in tasks

Reservations are the central link between material handling and task execution.

A reservation connects:

  • the required material through LK_MATERIAL
  • the task through LK_TASK
  • the planned quantity through QTY_PLANNED
  • the actually issued or consumed quantity through QUANTITY
  • the reservation state through Status

This means that material usage is tracked at task level.

Example workflow

Step 1: Material master exists

A spare part is defined as a MaterialMaster.

Field Example
ITEM_NUMBER OF-10045
UNIT_OF_MEASURE Piece
MaterialType SpareParts

Step 2: Material exists in a storage location

A Material object references the material master and a storage location.

Property Example
LK_MATERIAL_MASTER Oil Filter Type A
LK_STORAGE_LOCATION Storage Shelf A
QUANTITY 10
RESERVED_QUANTITY 0
AvailableQuantity() 10

Step 3: Reservation is created for a task

A user manually creates a Reservation and links the material to the task.

Property Example
LK_TASK Replace oil filter
LK_MATERIAL Oil Filter Type A
Status Planned
QTY_PLANNED 1

Step 4: Reservation is confirmed

The reservation status is changed to Confirmed.

After confirmation, the material's reserved quantity includes the reservation's planned quantity.

Quantity Value
Material.QUANTITY 10
Material.RESERVED_QUANTITY 1
Material.AvailableQuantity() 9

Step 5: Actual quantity is entered

The actually issued or consumed quantity is stored in Reservation.QUANTITY.

Property Example
Reservation.QUANTITY 1

Step 6: Task is finished

When the task is finished, CloseReservations() is called.

The confirmed reservation is changed to Issued.

Validation and business rules

Area Rule
Planned reservation quantity QTY_PLANNED must be greater than 0.
Planned reservation quantity QTY_PLANNED can only be changed while the reservation is Planned.
Planned reservation quantity QTY_PLANNED must not exceed LK_MATERIAL.AvailableQuantity().
Actual issued or consumed quantity QUANTITY must be greater than 0.
Actual issued or consumed quantity QUANTITY can only be changed while the reservation is Planned or Confirmed.
Reservation status Status cannot be changed once the reservation is Issued.
Reservation status A reservation cannot be changed from Confirmed back to Planned.
Reservation links LK_TASK and LK_MATERIAL cannot be changed when status is Issued or Confirmed.
Material deletion Material cannot be deleted while QUANTITY is greater than 0.
Material deletion Material cannot be deleted while active reservations exist.


See also