system.kanoa.inventory.updatePartInventoryPolicy(partInventoryPolicyInfo, userId)
Updates an existing part inventory policy record, identified by partInventoryPolicyId, with new stocking and reorder rule values.
Use this to adjust min/max/safety-stock quantities, the reorder point and reorder quantity, cycle-count frequency,
or whether the part is actively stocked, without recreating the policy.
Parameters
partInventoryPolicyInfo Dictionary
| - countFrequencyDays | Integer | |
| - inventoryAssetId | Integer | |
| - isStocked | Boolean | |
| - maxQty | Float | |
| - minQty | Float | |
| - partId | Integer | |
| - partInventoryPolicyId | Integer | |
| - reorderPointQty | Float | |
| - reorderQty | Float | |
| - safetyStockQty | Float |
userId Integer:Id of the user executing the function
Returns
# of records modified Integer
message String None if success
Example
partInventoryPolicyInfo = {
'partInventoryPolicyId': 733,
'partId': 8890,
'inventoryAssetId': 12,
'isStocked': True,
'minQty': 30.0,
'maxQty': 250.0,
'safetyStockQty': 20.0,
'reorderPointQty': 50.0,
'reorderQty': 125.0,
'countFrequencyDays': 60
}
userId = system.kanoa.security.getIDPUserId({'userName': 'SYSTEM'})
recordsModified, message = system.kanoa.inventory.updatePartInventoryPolicy(partInventoryPolicyInfo, userId)
print recordsModified, message