system.kanoa.tooling.adjustCounter(adjustInfo, userId)
A manual change to one of a tool's counts, logged as an adjustment. Refused if it would take the count below 0.
Parameters
adjustInfo Dictionary
| - toolingAssetId | Integer | Required |
| - counterName | String | Required. lifetimeCycles, cyclesSincePm, cyclesSinceRefurb, lifetimeRunMinutes, runMinutesSincePm, runMinutesSinceRefurb or refurbCount |
| - delta | Number | Required. Added to the count; negative to take away |
| - reason | String | correction (default), pm, refurbishment or calibration |
| - note | String | |
| - workOrderId | Integer |
userId Integer: The user making the change
Returns
(newValue, message)
Example
adjustInfo = {'toolingAssetId': 1, 'counterName': 'counterName', 'delta': 1.0, 'reason': 'reason', 'note': 'note'}
userId = 5
newValue, message = system.kanoa.tooling.adjustCounter(adjustInfo, userId)