source: FOIAVistA/tag/r/PAID-PRS/PRSATP1.m@ 1700

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

WorldVistAEHR overlayed on FOIAVistA

File size: 3.2 KB
Line 
1PRSATP1 ; HISC/REL-Daily Post verification ;2/28/2000
2 ;;4.0;PAID;**34,57**;Sep 21, 1995
3 ;routine is called to validate data entered during the
4 ;screenman posting of an employees pay period
5 ;
6 K T S ZS="",TWO=$P($G(^PRST(457.1,+TC,0)),"^",5),DY2=TWO="Y" I TC2,'DY2 S TWO=$P($G(^PRST(457.1,+TC2,0)),"^",5),DY2=TWO="Y"
7 F K=1:4:25 I $P(Z,"^",K)'="" D
8 .S X=$P(Z,"^",K)_"^"_$P(Z,"^",K+1) I $P(Z,"^",K+1)="" D E8 Q
9 .D CNV^PRSATIM S Z1=$P(Y,"^",1),Z2=$P(Y,"^",2) D V0
10 .I Z2>1440,TWO'="Y","OT CT SB ON UA"'[$P(Z,"^",K+2) D E4 Q
11 .I Z2>2880 D E5 Q
12 .I $P(Z,"^",K+2)="" D E9 Q
13 .I '(Z["HX"&("ON HW"[$P(Z,"^",K+2))),'(Z["^ON"&(Z["OT")),'(Z["^ON"&(Z["CT")),$D(T(Z1)) D E3 Q
14 .I $P(Z,"^",K+2)="HW",Z'["HX",'$P($G(^PRST(458,PPI,"E",DFN,"D",DAY,0)),"^",12) D E7 Q
15 .I $P(Z,"^",K+2)'="" S T(Z1,K)=Z2_"^"_$P(Z,"^",K,K+3)
16 .Q
17 I '$D(T) Q
18 I Z'["HX",'(Z["^ON"&(Z["OT")),'(Z["^ON"&(Z["CT")) S Z1="" F S Z1=$O(T(Z1)) Q:Z1="" G:Z1'<T(Z1,$O(T(Z1,0))) E1 S Y=$O(T(Z1)) I Y,T(Z1,$O(T(Z1,0)))>Y G E2
19 S Z1="",LL=1 F S Z1=$O(T(Z1)) Q:Z1="" F K=0:0 S K=$O(T(Z1,K)) Q:K<1 D
20 .S $P(ZS,"^",LL)=$P(T(Z1,K),"^",2),$P(ZS,"^",LL+1)=$P(T(Z1,K),"^",3),$P(ZS,"^",LL+2)=$P(T(Z1,K),"^",4) S:$P(T(Z1,K),"^",5)'="" $P(ZS,"^",LL+3)=$P(T(Z1,K),"^",5)
21 .S LL=LL+4 Q
22 S Z1=$$GET^DDSVAL(DIE,.DA,70)
23 I Z1="" F K=1:4:25 G:$P(Z,"^",K+2)="AA" E6 I $P(Z,"^",K+2)="WP",$P(Z,"^",K+3)=3 G E10
24 ;loop thru posting checking for comptime w/out remarks code.
25 F K=1:4:25 G:($P(Z,"^",K+2)="CT")&($P(Z,"^",K+3)="") E11
26 F K=1:4:25 G:($P(Z,"^",K+2)="CU")&($P(Z,"^",K+3)="") E12
27 ;Now loop again checking to make sure compressed tours aren't
28 ;trying to post credit hours remarks.
29 I $$COMPR(PPI,DFN) F K=1:4:25 G:$$CTCH(Z,K) E13
30 Q
31 ;-------------------------------------------------
32COMPR(P,D) ;return true if employee has a compressed tour indicator
33 ; this pay period
34 ; INPUT: P--pay period ien; D--Day number
35 ;
36 Q $P($G(^PRST(458,+P,"E",D,0)),"^",6)="C"
37 ;-------------------------------------------------
38CTCH(Z,K) ;return true if comp/credit earned (CT) posted and
39 ; the remarks code is credit hours.
40 ; INPUT: Z--Posting node from file 458
41 ; K--segment of posting node
42 Q $P(Z,"^",K+2)="CT"&($P(Z,"^",K+3)="16")
43 ;-------------------------------------------------
44 ;
45V0 I Z2>Z1 S:DY2=1&($O(T(0))>Z1) DY2=2 I DY2=2 S Z1=Z1+1440,Z2=Z2+1440
46 S:Z2'>Z1 Z2=Z2+1440,DY2=2 Q
47E1 S STR="A start time is not less than a stop time." G E20
48E2 S STR="End of one segment must not be greater than start of next." G E20
49E3 S STR="Duplicate start times encountered." G E20
50E4 S STR="Segment of second day encountered; no two-day tour specified." G E20
51E5 S STR="Segment of third day encountered." G E20
52E6 S STR="Remarks must be entered when AA is posted." G E20
53E7 S STR="HW can only be posted with HX or on a Holiday." G E20
54E8 S STR="Stop Time not entered for a segment." G E20
55E9 S STR="Type of Time not entered for a segment." G E20
56E10 S STR="Remarks must be entered for WP due to AWOL." G E20
57E11 S STR="REMARKS CODE must be entered when CT is posted." G E20
58E12 S STR="REMARKS CODE must be entered when CU is posted." G E20
59E13 S STR="REMARKS CODE: Compressed tours can't earn credit hours." G E20
60E20 K ZS,T S DDSERROR=1,TIM=0 D HLP^DDSUTL(.STR) Q
Note: See TracBrowser for help on using the repository browser.