source: FOIAVistA/tag/r/PAID-PRS/PRS8MSC1.m@ 1607

Last change on this file since 1607 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.9 KB
Line 
1PRS8MSC1 ;HISC/DAD,WCIOFO/MGD,SAB-MISC TIME CARD ADJUST(contd) ;1/30/2007
2 ;;4.0;PAID;**56,68,111**;Sep 21, 1995;Build 2
3 ;;Per VHA Directive 2004-038, this routine should not be modified.
4 ;
5 ; This routine may automatically charge days to WP (leave without pay)
6 ; if the employee has not performed any duty during the week. This
7 ; routine is only called for employees on a daily tour.
8 ; The software does not automatically charge NP (Non Pay) since the
9 ; effective start or end day may be on a day off such that an entire
10 ; week should not be charged to NP.
11 ;
12 ; This routine is called from PRS8MSC0.
13 ;
14NODUTY ;
15 ; inputs
16 ; PY - pay period IEN
17 ; DFN - employee IEN
18 ;
19 N CHGDAY,DO,DW,DY,END,EXC,START,TOD,WEEK
20 ;
21 ; loop thru both weeks in pay period
22 F WEEK=1,2 D
23 . ; init week counts and list of days that could be charged
24 . S (DW,DW("WP"),DW("NP"),DW("HX"),DO("CP"))=0
25 . K CHGDAY
26 . ;
27 . ; loop thru days in week
28 . I WEEK=1 S START=1,END=7
29 . I WEEK=2 S START=8,END=14
30 . F DY=START:1:END D
31 . . ; get tour and how day was charged
32 . . S TOD=$P($G(^PRST(458,PY,"E",DFN,"D",DY,0)),U,2)
33 . . S EXC=$P($G(^PRST(458,PY,"E",DFN,"D",DY,2)),U,3)
34 . . ; update if day charged differently due to encapsulation
35 . . I $D(^TMP($J,"PRS8",DY,2,0)) S EXC=^TMP($J,"PRS8",DY,2,0)
36 . . ;
37 . . ; update week counts for the day
38 . . I TOD>1 D ; scheduled work day
39 . . . S DW=DW+1
40 . . . I EXC="WP" S DW("WP")=DW("WP")+1
41 . . . I EXC="NP" S DW("NP")=DW("NP")+1
42 . . . I EXC="HX" S DW("HX")=DW("HX")+1,CHGDAY(DY)="" ; add HX to list
43 . . I TOD=1 D ; day off
44 . . . I EXC="CP" S DO("CP")=DO("CP")+1
45 . . . I EXC="" S CHGDAY(DY)="" ; add not charged day off to list
46 . ;
47 . ; if all work days were counted as a combination of WP, NP, and HX
48 . ; and at least one day was counted as WP and no days off were counted
49 . ; as CP then automatically charge appropriate remaining days to WP.
50 . I DW("WP")+DW("NP")+DW("HX")'<DW,DW("WP")>0,DO("CP")=0 D
51 . . D SET^PRS8EX0(DFN,PY,"WP",3,.CHGDAY)
52 ;
53 Q
Note: See TracBrowser for help on using the repository browser.