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