Removed Out of Service calibrations from notifications being sent
This commit is contained in:
committed by
Stieber Daniel (CSC FI SPS MESLEO)
parent
ad6ed9c002
commit
261e13ceac
@ -58,22 +58,22 @@ RETURN Result
|
|||||||
SendReminders:
|
SendReminders:
|
||||||
* * * * * * *
|
* * * * * * *
|
||||||
|
|
||||||
OPEN 'CALIB_LIST' TO FileIn ELSE
|
OPEN 'CALIB_LIST' TO FileIn ELSE
|
||||||
ErrorMsg = 'Unable to open "CALIB_LIST" table. (':Method:')'
|
ErrorMsg = 'Unable to open "CALIB_LIST" table. (':Method:')'
|
||||||
RETURN
|
RETURN
|
||||||
END
|
END
|
||||||
|
|
||||||
CheckDt = OCONV(Date()+15,'D4/')
|
CheckDt = OCONV(Date()+15,'D4/')
|
||||||
SelectSent = 'SELECT CALIB_LIST WITH NEXT_CAL_DT < ':QUOTE(CheckDt):' BY NEXT_CAL_DT'
|
SelectSent = 'SELECT CALIB_LIST WITH NEXT_CAL_DT < ':QUOTE(CheckDt):' AND WITH EQ_LOC NE "Out of Service" BY NEXT_CAL_DT'
|
||||||
RList(SelectSent,TARGET_ACTIVELIST$,'','','')
|
RList(SelectSent,TARGET_ACTIVELIST$,'','','')
|
||||||
|
|
||||||
NoteText = ''
|
NoteText = ''
|
||||||
Depts = ''
|
Depts = ''
|
||||||
|
|
||||||
Done = 0
|
Done = 0
|
||||||
LOOP
|
LOOP
|
||||||
READNEXT CLNo ELSE Done = 1
|
READNEXT CLNo ELSE Done = 1
|
||||||
UNTIL Done
|
UNTIL Done
|
||||||
READ CLRec FROM FileIn,CLNo THEN
|
READ CLRec FROM FileIn,CLNo THEN
|
||||||
|
|
||||||
NextCalDt = OCONV(XLATE('CALIB_LIST',CLNo,'NEXT_CAL_DT','X'),'D4/')
|
NextCalDt = OCONV(XLATE('CALIB_LIST',CLNo,'NEXT_CAL_DT','X'),'D4/')
|
||||||
@ -104,18 +104,18 @@ UNTIL Done
|
|||||||
|
|
||||||
END ;* End of check for NextCalDt
|
END ;* End of check for NextCalDt
|
||||||
END ;* End of CLRec read
|
END ;* End of CLRec read
|
||||||
REPEAT
|
REPEAT
|
||||||
|
|
||||||
DeptUsers = ''
|
DeptUsers = ''
|
||||||
DeptDescs =''
|
DeptDescs =''
|
||||||
|
|
||||||
PopupLiteral = XLATE('SYSREPOSPOPUPS',@APPID<1>:'**DEPT',PDISPLAY$,'X')
|
PopupLiteral = XLATE('SYSREPOSPOPUPS',@APPID<1>:'**DEPT',PDISPLAY$,'X')
|
||||||
|
|
||||||
CONVERT @VM:@SVM TO @FM:@VM IN PopupLiteral
|
CONVERT @VM:@SVM TO @FM:@VM IN PopupLiteral
|
||||||
|
|
||||||
LiteralCnt = COUNT(PopupLiteral,@FM) + (PopupLiteral NE '')
|
LiteralCnt = COUNT(PopupLiteral,@FM) + (PopupLiteral NE '')
|
||||||
|
|
||||||
FOR I = 1 TO LiteralCnt
|
FOR I = 1 TO LiteralCnt
|
||||||
Dept = PopupLiteral<I,1>
|
Dept = PopupLiteral<I,1>
|
||||||
DeptDesc = PopupLiteral<I,2>
|
DeptDesc = PopupLiteral<I,2>
|
||||||
UserNames = PopupLiteral<I,3>
|
UserNames = PopupLiteral<I,3>
|
||||||
@ -125,13 +125,13 @@ FOR I = 1 TO LiteralCnt
|
|||||||
DeptUsers<Pos> = UserNames
|
DeptUsers<Pos> = UserNames
|
||||||
DeptDescs<Pos> = DeptDesc
|
DeptDescs<Pos> = DeptDesc
|
||||||
END
|
END
|
||||||
NEXT I
|
NEXT I
|
||||||
|
|
||||||
NoteSubject = "Equipment Calibration Reminder"
|
NoteSubject = "Equipment Calibration Reminder"
|
||||||
|
|
||||||
DeptCnt = COUNT(Depts,@FM) + (Depts NE '')
|
DeptCnt = COUNT(Depts,@FM) + (Depts NE '')
|
||||||
|
|
||||||
FOR I = 1 TO DeptCnt
|
FOR I = 1 TO DeptCnt
|
||||||
|
|
||||||
IF NoteText<I> NE '' THEN
|
IF NoteText<I> NE '' THEN
|
||||||
*NoteText<I> = 'Testing during development of new functionality - disregard':CRLF$:NoteText<I>
|
*NoteText<I> = 'Testing during development of new functionality - disregard':CRLF$:NoteText<I>
|
||||||
@ -154,9 +154,7 @@ FOR I = 1 TO DeptCnt
|
|||||||
|
|
||||||
END
|
END
|
||||||
|
|
||||||
NEXT I
|
NEXT I
|
||||||
|
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user