...
Description
...
Approved/ Rejected Travel Expense (per hour)
...
Summary
...
Table of Contents | ||||||||
---|---|---|---|---|---|---|---|---|
|
Page Properties | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Customer All
Compatibility APM Version N/A N/A |
Description
This is an auto generated notification that will inform the person that their travel expense The notification task sends out an automatic email to employees when the Travel Expense has been approved or rejected. The notification is send sent each hour.
Selection
All the persons whose travel expense has been approved or rejected withing within the last hour.
Code Block |
---|
select ORIGINATOR.FIRSTNAME #FIRSTNAME, DOC.DOCUMENT_ID #DOCUMENT_ID, convert (date, TRAVEL.TRAVEL_DATETIME_OUT) #DATEFROM, convert (date, TRAVEL.TRAVEL_DATETIME_IN) #DATETO, WF.STATE_NAME #STATE, APPROVER.NAME #APPROVER_NAME, email.teleno #EMAIL --'daria.chebotaieva@adonishr.com' #Email from WEB_CP_DOCUMENTS DOC left join WEB_CP_WORKFLOW WF on WF.DOCUMENT_ID=DOC.DOCUMENT_ID left join WEB_CP_TRAVEL_BILLS TRAVEL on TRAVEL.DOCUMENT_ID=DOC.DOCUMENT_ID left join PW001P01 ORIGINATOR on ORIGINATOR.PIN=DOC.PIN left join PW001P01 APPROVER on APPROVER.PIN=WF.APPROVER_PIN LEFT JOIN PW001P0T email ON email.PIN = ORIGINATOR.PIN AND email.TELETYPE = 6 AND email.TELEPRIORITY IS NOT NULL AND NOT EXISTS ( SELECT 1 FROM PW001P0T t WHERE t.PIN = email.PIN AND t.TELETYPE = email.TELETYPE AND t.TELEPRIORITY IS NOT NULL AND ( t.TELEPRIORITY < email.TELEPRIORITY OR t.TELEPRIORITY = email.TELEPRIORITY AND t.SEQUENCENO < email.SEQUENCENO ) ) where DOC.CODE = 'TravInv' AND WF.STATE_NAME IN ('Approved', 'Rejected') AND WF.STATE IN (2, 3) AND WF.repl_GMTModifiedDate > DATEADD (HOUR , -1, dateadd(MINUTE,-1,GETDATE())) |
Field Specification
#FIRSTNAME
- the first name of the person from the Personal Details.
#DOCUMENT_ID
- the ID of the Travel Expense document that was either approved or rejected.
#DATEFROM
- strat start date of the Travel Expense document.
...
Best regards,
Daria
Other
Recipients: affected crew.
Can be set to a fixed email list can be modified depending on the customer. It can be:
a fixed list of emails;
or dynamic list retrieved from the database.
Schedule: Hourly, every 60 minutes.