system.kanoa.inventory.addInventoryTransaction(inventoryTransactionInfo, userId)
Adds or updates an inventory transaction and updates the inventory balance. Pass inventoryTransactionId to update an existing record, omit or pass None to insert.
Parameters
inventoryTransactionInfo Dictionary
| - assetId | Integer | Not required. Physical asset the part was used on. |
| - costCenterId | Integer | Not required. |
| - inventoryAssetId | Integer | Required for insert. |
| - inventoryTransactionId | Integer | Not required. Pass to update existing record. |
| - inventoryTransactionTypeId | Integer | Required for insert. |
| - notes | String | Not required. |
| - partId | Integer | Required for insert. |
| - quantity | Float | Required for insert. Must be > 0. |
| - referenceNumber | String | Not required. e.g. 'PO 1234' |
| - referenceType | String | Not required. e.g. 'PO', 'WO' |
| - sourceRecordId | Integer | Not required. For automated processes only. |
| - sourceSchemaName | String | Not required. For automated processes only. |
| - sourceTableName | String | Not required. For automated processes only. |
| - supplierId | Integer | Not required. |
| - unitCost | Float | Not required. |
userId Integer:Id of the user executing the function
Returns
inventoryTransactionId Integer
message String None if success
Example