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