Merged PR 31131: Rename PM/PM_SPEC tables
This commit is contained in:
parent
9749af69cf
commit
2ab25e05a3
@ -22,7 +22,7 @@ $INSERT RLIST_EQUATES
|
||||
$INSERT TOOL_LOG_EQUATES
|
||||
$INSERT TOOL_EQUATES
|
||||
$INSERT MSG_EQUATES
|
||||
$INSERT PM_EQUATES
|
||||
$INSERT RECURRING_TASK_EQUATES
|
||||
|
||||
ErrTitle = 'Error in Stored Procedure "obj_Tool_Log"'
|
||||
ErrorMsg = ''
|
||||
@ -146,12 +146,12 @@ SetMode:
|
||||
obj_Tables('WriteRec', ctParms) ;* Write and unlock the record
|
||||
|
||||
If NewMode EQ 'OUT' then
|
||||
Open 'PM' to PMHandle then
|
||||
Open 'RECURRING_TASK' to PMHandle then
|
||||
// Remove any scheduled PM records for this TOOL ID
|
||||
NewModeDt = NewModeDTM[1, 'F.']
|
||||
NewModeTm = (NewModeDTM[COL2()+1, 999] * 86400)
|
||||
NewModeTm = NewModeTm[1, 'F.']
|
||||
Query = 'SELECT PM WITH TOOL_ID EQ "':ToolID:'" AND WITH STATUS EQ "SCHED" AND WITH SCHED_DT GE ':NewModeDt
|
||||
Query = 'SELECT RECURRING_TASK WITH TOOL_ID EQ "':ToolID:'" AND WITH STATUS EQ "SCHED" AND WITH SCHED_DT GE ':NewModeDt
|
||||
|
||||
RList(Query, TARGET_ACTIVELIST$, '', '', '' )
|
||||
|
||||
@ -160,10 +160,10 @@ SetMode:
|
||||
READNEXT PmID ELSE Done = 1
|
||||
UNTIL Done
|
||||
READ PmRec FROM PMHandle,PmID THEN
|
||||
SchedTm = PmRec<PM_SCHED_TM$>
|
||||
SchedTm = PmRec<RECURRING_TASK_SCHED_TM$>
|
||||
If ( ( (SchedTm NE '') and (SchedTm GE NewModeTm) ) or (SchedTm EQ '') ) then
|
||||
// Remove it
|
||||
Database_Services('DeleteDataRow', 'PM', PmID, True$, False$)
|
||||
Database_Services('DeleteDataRow', 'RECURRING_TASK', PmID, True$, False$)
|
||||
end
|
||||
|
||||
END ;* End of PmRec read
|
||||
@ -175,3 +175,4 @@ RETURN
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user