- PRS8MSC1 ;HISC/DAD,WCIOFO/MGD,SAB-MISC TIME CARD ADJUST(contd) ;1/30/2007
- ;;4.0;PAID;**56,68,111**;Sep 21, 1995;Build 2
- ;;Per VHA Directive 2004-038, this routine should not be modified.
- ;
- ; This routine may automatically charge days to WP (leave without pay)
- ; if the employee has not performed any duty during the week. This
- ; routine is only called for employees on a daily tour.
- ; The software does not automatically charge NP (Non Pay) since the
- ; effective start or end day may be on a day off such that an entire
- ; week should not be charged to NP.
- ;
- ; This routine is called from PRS8MSC0.
- ;
- NODUTY ;
- ; inputs
- ; PY - pay period IEN
- ; DFN - employee IEN
- ;
- N CHGDAY,DO,DW,DY,END,EXC,START,TOD,WEEK
- ;
- ; loop thru both weeks in pay period
- F WEEK=1,2 D
- . ; init week counts and list of days that could be charged
- . S (DW,DW("WP"),DW("NP"),DW("HX"),DO("CP"))=0
- . K CHGDAY
- . ;
- . ; loop thru days in week
- . I WEEK=1 S START=1,END=7
- . I WEEK=2 S START=8,END=14
- . F DY=START:1:END D
- . . ; get tour and how day was charged
- . . S TOD=$P($G(^PRST(458,PY,"E",DFN,"D",DY,0)),U,2)
- . . S EXC=$P($G(^PRST(458,PY,"E",DFN,"D",DY,2)),U,3)
- . . ; update if day charged differently due to encapsulation
- . . I $D(^TMP($J,"PRS8",DY,2,0)) S EXC=^TMP($J,"PRS8",DY,2,0)
- . . ;
- . . ; update week counts for the day
- . . I TOD>1 D ; scheduled work day
- . . . S DW=DW+1
- . . . I EXC="WP" S DW("WP")=DW("WP")+1
- . . . I EXC="NP" S DW("NP")=DW("NP")+1
- . . . I EXC="HX" S DW("HX")=DW("HX")+1,CHGDAY(DY)="" ; add HX to list
- . . I TOD=1 D ; day off
- . . . I EXC="CP" S DO("CP")=DO("CP")+1
- . . . I EXC="" S CHGDAY(DY)="" ; add not charged day off to list
- . ;
- . ; if all work days were counted as a combination of WP, NP, and HX
- . ; and at least one day was counted as WP and no days off were counted
- . ; as CP then automatically charge appropriate remaining days to WP.
- . I DW("WP")+DW("NP")+DW("HX")'<DW,DW("WP")>0,DO("CP")=0 D
- . . D SET^PRS8EX0(DFN,PY,"WP",3,.CHGDAY)
- ;
- Q
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPRS8MSC1 2049 printed Feb 18, 2025@23:49:18 Page 2
- PRS8MSC1 ;HISC/DAD,WCIOFO/MGD,SAB-MISC TIME CARD ADJUST(contd) ;1/30/2007
- +1 ;;4.0;PAID;**56,68,111**;Sep 21, 1995;Build 2
- +2 ;;Per VHA Directive 2004-038, this routine should not be modified.
- +3 ;
- +4 ; This routine may automatically charge days to WP (leave without pay)
- +5 ; if the employee has not performed any duty during the week. This
- +6 ; routine is only called for employees on a daily tour.
- +7 ; The software does not automatically charge NP (Non Pay) since the
- +8 ; effective start or end day may be on a day off such that an entire
- +9 ; week should not be charged to NP.
- +10 ;
- +11 ; This routine is called from PRS8MSC0.
- +12 ;
- NODUTY ;
- +1 ; inputs
- +2 ; PY - pay period IEN
- +3 ; DFN - employee IEN
- +4 ;
- +5 NEW CHGDAY,DO,DW,DY,END,EXC,START,TOD,WEEK
- +6 ;
- +7 ; loop thru both weeks in pay period
- +8 FOR WEEK=1,2
- Begin DoDot:1
- +9 ; init week counts and list of days that could be charged
- +10 SET (DW,DW("WP"),DW("NP"),DW("HX"),DO("CP"))=0
- +11 KILL CHGDAY
- +12 ;
- +13 ; loop thru days in week
- +14 IF WEEK=1
- SET START=1
- SET END=7
- +15 IF WEEK=2
- SET START=8
- SET END=14
- +16 FOR DY=START:1:END
- Begin DoDot:2
- +17 ; get tour and how day was charged
- +18 SET TOD=$PIECE($GET(^PRST(458,PY,"E",DFN,"D",DY,0)),U,2)
- +19 SET EXC=$PIECE($GET(^PRST(458,PY,"E",DFN,"D",DY,2)),U,3)
- +20 ; update if day charged differently due to encapsulation
- +21 IF $DATA(^TMP($JOB,"PRS8",DY,2,0))
- SET EXC=^TMP($JOB,"PRS8",DY,2,0)
- +22 ;
- +23 ; update week counts for the day
- +24 ; scheduled work day
- IF TOD>1
- Begin DoDot:3
- +25 SET DW=DW+1
- +26 IF EXC="WP"
- SET DW("WP")=DW("WP")+1
- +27 IF EXC="NP"
- SET DW("NP")=DW("NP")+1
- +28 ; add HX to list
- IF EXC="HX"
- SET DW("HX")=DW("HX")+1
- SET CHGDAY(DY)=""
- End DoDot:3
- +29 ; day off
- IF TOD=1
- Begin DoDot:3
- +30 IF EXC="CP"
- SET DO("CP")=DO("CP")+1
- +31 ; add not charged day off to list
- IF EXC=""
- SET CHGDAY(DY)=""
- End DoDot:3
- End DoDot:2
- +32 ;
- +33 ; if all work days were counted as a combination of WP, NP, and HX
- +34 ; and at least one day was counted as WP and no days off were counted
- +35 ; as CP then automatically charge appropriate remaining days to WP.
- +36 IF DW("WP")+DW("NP")+DW("HX")'<DW
- IF DW("WP")>0
- IF DO("CP")=0
- Begin DoDot:2
- +37 DO SET^PRS8EX0(DFN,PY,"WP",3,.CHGDAY)
- End DoDot:2
- End DoDot:1
- +38 ;
- +39 QUIT