Skip to main content

system.kanoa.tooling.resetCounter(resetInfo, userId)

Resets a tool's counts after maintenance, logged as adjustments. pm sets the since-PM counts to 0 and stamps lastPmDate; refurb sets the since-refurbishment counts to 0, stamps lastRefurbDate and adds 1 to refurbCount; calibration stamps lastCalibrationDate and moves calibrationDue on by the tool's calibrationIntervalDays. The tool's status is then brought up to date.


Parameters​

resetInfo Dictionary

- toolingAssetIdIntegerRequired
- kindStringRequired. pm, refurb or calibration
- workOrderIdIntegerThe maintenance work order
- noteString

userId Integer: The user making the change


Returns​

(1, message)


Example​

resetInfo = {'toolingAssetId': 1, 'kind': 'kind', 'workOrderId': 1, 'note': 'note'}
userId = 5
result1, result2 = system.kanoa.tooling.resetCounter(resetInfo, userId)