Fixed bug related to rescheduling REACTOR_PM's
This commit is contained in:
parent
5abaaee625
commit
cb5df15264
@ -237,20 +237,21 @@ Service SignReactorLog(ReactorLogID, UserID)
|
||||
If OpenPMKeys NE '' then
|
||||
* If more than one, which should not happen then close all
|
||||
KCnt = COUNT( OpenPMKeys, @VM ) + (OpenPMKeys NE '')
|
||||
|
||||
PMResched = False$
|
||||
For I = 1 to KCnt
|
||||
OpenPMKeys = OpenPMKeys<1,I>
|
||||
ThisOpenPMKey = OpenPMKeys<1,I>
|
||||
|
||||
otlParms = 'REACTOR_PM':@RM
|
||||
otlParms := OpenPMKeys:@RM
|
||||
otlParms := ThisOpenPMKey:@RM
|
||||
otlParms := REACTOR_PM_COMPLETE_DATE$:@VM:REACTOR_PM_COMP_RL_NO$:@RM
|
||||
otlParms := EndDate:@VM:ReactorLogID:@RM
|
||||
If OpenPMKeys NE '' then
|
||||
If ThisOpenPMKey NE '' then
|
||||
obj_Post_Log('Create',otlParms) ;* Closes previous PM record
|
||||
If Not(Get_Status(ErrCode)) then
|
||||
* Schedule next PM
|
||||
PMDays = XLATE( 'REACT_SERVS', CurService, REACT_SERVS_PM_DAYS$, 'X' )
|
||||
IF PMDays NE '' THEN
|
||||
If PMResched EQ False$ then
|
||||
PMNo = NextKey('REACTOR_PM')
|
||||
If Error_Services('NoError') then
|
||||
NewPMRec = ''
|
||||
@ -263,11 +264,14 @@ Service SignReactorLog(ReactorLogID, UserID)
|
||||
NewPMRec<REACTOR_PM_ENTRY_RL_NO$> = ReactorLogID
|
||||
|
||||
Database_Services('WriteDataRow', 'REACTOR_PM', PMNo, NewPMRec)
|
||||
If Error_Services('HasError') then
|
||||
If Error_Services('NoError') then
|
||||
PMResched = True$
|
||||
end else
|
||||
ErrorMsg = Error_Services('GetMessage')
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Error calling NextKey("REACTOR_PM").'
|
||||
end
|
||||
end
|
||||
end
|
||||
end else
|
||||
@ -1280,3 +1284,4 @@ return
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user