system.kanoa.order.updateProductionOrder(woInfo, userId)
Update a production order
Parameters
woInfo dictionary
| - assetId | Integer | |
| - dueDate | DateTime | |
| - itemId | Integer | |
| - itemUnitId | Integer | |
| - modeId | Integer | |
| - note | String | |
| - reqdQty | Float | |
| - updateClients | Boolean | If set to True, client sessions will be notified updated. Set to False when importing large numbers of orders and call system.kanoa.order.updateClientsProductionOrderChange() afterwards. |
| - workOrderId | Integer | |
| - workOrderName | String | |
| - workOrderSourceId | Integer | |
| - workOrderStatusId | Integer |
userId Integer: Id of user executing the function
Returns
# of records modified Integer
Example
orderInfo = system.kanoa.utilities.convertDatasetRowToJSON(system.kanoa.order.getProductionOrders({workOrderName': 'XYZ123'}), 0)
orderInfo['reqdQty'] = 200
userId = 5
retVal = system.kanoa.order.updateProductionOrder(orderInfo, userId)