Activity Inventory Validation

Inventory is validated or rejected if conditions are not met, and the successfully validated activity inventory items are updated. The inventory is validated as follows:

  1. IF: inventory keys are not set in the transaction head ('head/inventory/keys')

THEN: inventory is rejected with 'inventory key fields are not defined' message

  1. IF: inventory has no properties at all

THEN: inventory is rejected with 'inventory properties are absent' or 'inventory key is absent' message

  1. IF: any of inventory key properties is not specified

THEN: inventory is rejected with 'inventory key field <FIELD> is empty' or 'inventory key field <FIELD> is absent' message

  1. IF any of inv_pid; inv_aid; invtype; invid; inv_change_invid values are non-numeric

THEN: inventory is rejected with 'inventory key field <FIELD> has numeric type but non-numeric value <VALUE>' message

  1. IF: any inventory property has no name

THEN: inventory is rejected with 'property has no name' message

Note:
If an inventory fails any of the following checks, then only this inventory action is not performed.