source: FOIAVistA/trunk/r/PAID-PRS/PRSARC05.m@ 1245

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

initial load of FOIAVistA 6/30/08 version

File size: 1.6 KB
Line 
1PRSARC05 ;DWS/ALB-RECESS UTILITY ;DEC 05, 2006 09:58
2 ;;4.0;PAID;**112**;Sep 21, 1995;Build 54
3 ;;Per VHA Directive 2004-038, this routine should not be modified.
4 Q
5RSPP(WK,IEN,PP) ;SAME RESULTS AS RES USING DIFFERENT PARAMETERS
6 ;IEN THE EMPLOYEE IEN FROM FILE 450
7 ;PP Pay period to return results for in YYYY-NN format i.e. 2006-01 for example
8 ;WK Set to -1 if pay period is not found. Otherwise results for RES are passed through.
9 N I,SFY,EFY,SDT,EDT S I=$O(^PRST(458,"AB",PP,0)) I 'I S WK=-1 Q
10 S I=^PRST(458,I,1),SDT=$P(I,U),EDT=$P(I,U,14)
11 S (SFY,EFY)=$S($E(SDT,4,7)>930:PP+1,1:+PP)
12 D RES(.WK,IEN,SFY,EFY,SDT,EDT) Q
13RES(WK,IEN,SFY,EFY,SDT,EDT) ;RETURN NUMBER OF HOURS OF RECESS IN WK ARRAY
14 ;IEN THE EMPLOYEE IEN FROM FILE 450
15 ;SFY THE FISCAL YEAR OF THE START OF THE TIME PERIOD
16 ;EFY THE FISCAL YEAR OF THE END OF THE TIME PERIOD
17 ;SDT THE DATE OF THE START OF THE TIME PERIOD
18 ;EDT THE DATE OF THE END OF THE TIME PERIOD
19 ;WK(X) THE NUMBER OF HOURS OF RECESS SCHEDULED IN THE WEEK BEGANNING
20 ; ON DAY X. X IS A FILEMAN DATE FOR THE FIRST DAY OF THE WEEK.
21 N DA,FY,H,HRS,I,J,K,L,PPI S PPI=$P($G(^PRST(458,"AD",SDT)),U) S:'PPI PPI=$P(^PRST(458,0),U,3)
22 D TOURHRS^PRSARC07(.HRS,PPI,IEN)
23 S DA=$O(^PRST(458.8,"AC",IEN,SFY,0)),I=SDT-7,K=1,FY=SFY Q:'DA
24 D I SFY'=EFY S DA=$O(^PRST(458.8,"AC",IEN,EFY,0)) D:DA
25 .F S I=$O(^PRST(458.8,DA,1,"AC",I)) Q:I=""!(I>EDT) D
26 ..S J=$O(^(I,0)),L=^PRST(458.8,DA,1,J,0),H=$P(L,U,2)
27 ..I H="" S H=HRS("W"_$$WK($P(L,U,3)))
28 ..S WK($P(L,U,3))=H
29 Q
30WK(X) ;RETURN 1 FOR THE FIRST WEEK OF THE PAY PERIOD AND 2 FOR THE SECOND
31 ;WEEK
32 N %H D H^%DTC Q %H\7#2+1
Note: See TracBrowser for help on using the repository browser.