Skip to main content

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

- toolingAssetIdIntegerRequired
- counterNameStringRequired. lifetimeCycles, cyclesSincePm, cyclesSinceRefurb, lifetimeRunMinutes, runMinutesSincePm, runMinutesSinceRefurb or refurbCount
- deltaNumberRequired. Added to the count; negative to take away
- reasonStringcorrection (default), pm, refurbishment or calibration
- noteString
- workOrderIdInteger

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)