| 1 | PRSATP4 ;HISC/MGD-Timekeeper Post Absence ;12/07/05
 | 
|---|
| 2 |  ;;4.0;PAID;**102**;Sep 21, 1995
 | 
|---|
| 3 |  ;
 | 
|---|
| 4 | HENCAP(PPI,DFN,WDAY,DBH,HOL,DAH,QUIT) ; 
 | 
|---|
| 5 |  ; Check to see if there is a Holiday encapsulated by some form of non-pay.
 | 
|---|
| 6 |  ; Called from Supervisor's Pay Period Certification option.
 | 
|---|
| 7 |  ; 
 | 
|---|
| 8 |  ; Test #1            | DBH  HOL  DAH
 | 
|---|
| 9 |  ; Test #2        DBH | HOL  DAH
 | 
|---|
| 10 |  ; Test #3   DBH  HOL | DAH
 | 
|---|
| 11 |  ; Test #4  DBH | HOL | DAH
 | 
|---|
| 12 |  ;
 | 
|---|
| 13 |  ;  Input:
 | 
|---|
| 14 |  ;    PPI - IEN of current pay period
 | 
|---|
| 15 |  ;    DFN - IEN of employee
 | 
|---|
| 16 |  ;   WDAY - Day to begin testing
 | 
|---|
| 17 |  ;    DBH - null
 | 
|---|
| 18 |  ;    HOL - null
 | 
|---|
| 19 |  ;    DAH - null
 | 
|---|
| 20 |  ;   QUIT - null
 | 
|---|
| 21 |  ;
 | 
|---|
| 22 |  ; Output: If set these variables will contain the following
 | 
|---|
| 23 |  ;    DAH - PPI^DAY^type of non-pay
 | 
|---|
| 24 |  ;    DBH - PPI^DAY^type of non-pay
 | 
|---|
| 25 |  ;    HOL - PPI^DAY^Status of timecard that contains holiday
 | 
|---|
| 26 |  ;   QUIT - Will be set to 1 when holiday encapsulation test fails
 | 
|---|
| 27 |  ;          and no additional checks need to be made.
 | 
|---|
| 28 |  ;          
 | 
|---|
| 29 |  N BACK,HIEN,HOLEX,LSTAT,NEXT,PPIP,SET,TOT,TSTAT,PPIP
 | 
|---|
| 30 |  ; Kill ordered arrays before starting
 | 
|---|
| 31 |  K HT,HE,HO,HC,NT,NE,NO,NC,PT,PE,PO,PC
 | 
|---|
| 32 |  S PPIP=PPI
 | 
|---|
| 33 |  ;
 | 
|---|
| 34 |  ; Determine if current day is a holiday
 | 
|---|
| 35 |  D FNDHOL^PRSATP8(PPIP,DFN,WDAY,.HOL,.QUIT)
 | 
|---|
| 36 |  I HOL="" S QUIT=1
 | 
|---|
| 37 |  Q:QUIT
 | 
|---|
| 38 |  ;
 | 
|---|
| 39 |  ; Find Day After Holiday
 | 
|---|
| 40 |  S NEXT=0
 | 
|---|
| 41 |  F  D  Q:QUIT!(DAH'="")!(DAH=""&NEXT=2)
 | 
|---|
| 42 |  . S WDAY=WDAY+1
 | 
|---|
| 43 |  . I WDAY=15 D GETNPP^PRSATP5(.PPIP,DFN,.WDAY,.NEXT,.QUIT)
 | 
|---|
| 44 |  . I NEXT=2 S QUIT=1 Q
 | 
|---|
| 45 |  . D DAH^PRSATP7(PPIP,DFN,WDAY,.DAH,.QUIT)
 | 
|---|
| 46 |  Q:QUIT
 | 
|---|
| 47 |  ;
 | 
|---|
| 48 |  ; Find Day Before Holiday
 | 
|---|
| 49 |  S PPIP=$P(HOL,U,1),WDAY=$P(HOL,U,2),BACK=0
 | 
|---|
| 50 |  F  D  Q:QUIT!(DBH'="")!(DBH=""&BACK=2)
 | 
|---|
| 51 |  . S WDAY=WDAY-1
 | 
|---|
| 52 |  . I WDAY=0 D GETPPP^PRSATP5(.PPIP,DFN,.WDAY,.BACK,.QUIT)
 | 
|---|
| 53 |  . I BACK=2 S QUIT=1 Q
 | 
|---|
| 54 |  . D DBH^PRSATP6(PPIP,DFN,WDAY,.DBH,.QUIT)
 | 
|---|
| 55 |  Q
 | 
|---|