source: WorldVistAEHR/trunk/r/PAID-PRS/PRSATPL.m@ 949

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

initial load of WorldVistAEHR

File size: 2.7 KB
Line 
1PRSATPL ; HISC/REL-Daily T&L Listing ;3/23/94 09:38
2 ;;4.0;PAID;;Sep 21, 1995
3TK ; Timekeeper Entry
4 S PRSTLV=2 G TL
5PAY ; Payroll Entry
6 S PRSTLV=7 G TL
7TL D ^PRSAUTL G:TLI<1 EX S %DT="X",X="T+3" D ^%DT
8 S %DT="AEPX",%DT("A")="Posting Date: ",%DT("B")="T-1",%DT(0)=-Y W ! D ^%DT
9 G:Y<1 EX S D1=Y S Y=$G(^PRST(458,"AD",D1)),PPI=$P(Y,"^",1),DAY=$P(Y,"^",2)
10 I PPI="" W !!,*7,"Pay Period is Not Open Yet!" G EX
11 W ! K IOP,%ZIS S %ZIS("A")="Select Device: ",%ZIS="MQ" D ^%ZIS K %ZIS,IOP G:POP EX
12 I $D(IO("Q")) S PRSAPGM="Q1^PRSATPL",PRSALST="TLE^PPI^DAY" D QUE^PRSAUTL G EX
13 U IO D Q1 D ^%ZISC K %ZIS,IOP G EX
14Q1 ; Process
15 S PPE=$P($G(^PRST(458,PPI,0)),"^",1),DTE=$P($G(^PRST(458,PPI,2)),"^",DAY),DTI=$P($G(^(1)),"^",DAY)
16 S (QT,PG)=0 D HDR
17 S NN="" F S NN=$O(^PRSPC("ATL"_TLE,NN)) Q:NN="" F DFN=0:0 S DFN=$O(^PRSPC("ATL"_TLE,NN,DFN)) Q:DFN<1 I $D(^PRST(458,PPI,"E",DFN,0)) D CHK I QT G EX
18 D H1 G EX
19CHK ; List Employee Day
20 D:$Y>(IOSL-5) HDR Q:QT
21 K Y1,Y2 S Y1=$G(^PRST(458,PPI,"E",DFN,"D",DAY,1)),Y2=$G(^(2)),Y3=$G(^(3)),Y4=$G(^(4)),TC=$P($G(^(0)),"^",2)
22 I Y1="" S Y1=$S(TC=1:"Day Off",TC=2:"Day Tour",TC=3!(TC=4):"Intermittent",1:"NO TOUR ENTERED")
23 I " 1 3 4 "'[TC,$P($G(^PRST(458,PPI,"E",DFN,"D",DAY,10)),"^",1)="" S Y2(1)="Unposted"
24 I TC=3,$P($G(^PRST(458,PPI,"E",DFN,"D",DAY,10)),"^",4)=1 S Y2(1)="Day Worked"
25 W !!,$E($P($G(^PRSPC(DFN,0)),"^",1),1,25) S (L3,L4)=0 I Y1="",Y2="" Q
26 D S1
27 F K=1:1 Q:'$D(Y1(K))&'$D(Y2(K)) W:K>1 ! W:$D(Y1(K)) ?27,Y1(K) W:$D(Y2(K)) ?52,$P(Y2(K),"^",1),?69,$P(Y2(K),"^",2)
28 W:Y3'="" !?10,Y3 Q
29S1 ; Set Schedule Array
30 F L1=1:3:19 S A1=$P(Y1,"^",L1) Q:A1="" S L3=L3+1,Y1(L3)=A1 S:$P(Y1,"^",L1+1)'="" Y1(L3)=Y1(L3)_"-"_$P(Y1,"^",L1+1) I $P(Y1,"^",L1+2)'="" S L3=L3+1,Y1(L3)=" "_$P($G(^PRST(457.2,+$P(Y1,"^",L1+2),0)),"^",1)
31 G:Y4="" S2
32 F L1=1:3:19 S A1=$P(Y4,"^",L1) Q:A1="" S L3=L3+1,Y1(L3)=A1 S:$P(Y4,"^",L1+1)'="" Y1(L3)=Y1(L3)_"-"_$P(Y4,"^",L1+1) I $P(Y4,"^",L1+2)'="" S L3=L3+1,Y1(L3)=" "_$P($G(^PRST(457.2,+$P(Y4,"^",L1+2),0)),"^",1)
33S2 ; Set Worked Array
34 F L1=1:4:25 D I A1="" G S3
35 .S A1=$P(Y2,"^",L1+2) Q:A1="" S L4=L4+1
36 .S A2=$P(Y2,"^",L1) I A2'="" S Y2(L4)=A2_"-"_$P(Y2,"^",L1+1)
37 .S K=$O(^PRST(457.3,"B",A1,0)) S $P(Y2(L4),"^",2)=A1_" "_$P($G(^PRST(457.3,+K,0)),"^",2)
38 .I $P(Y2,"^",L1+3)'="" S L4=L4+1,Y2(L4)=" "_$P($G(^PRST(457.4,+$P(Y2,"^",L1+3),0)),"^",1)
39 .Q
40S3 Q
41HDR ; Display Header
42 D H1 Q:QT W:'($E(IOST,1,2)'="C-"&'PG) @IOF
43 S PG=PG+1 W !?26,"VA TIME & ATTENDANCE SYSTEM",?72,"Page ",PG
44 W !?27,DTE," for T&L ",TLE
45 W !!,"Employee",?27,"Scheduled Tour",?52,"Tour Exceptions"
46 W !,"------------------------------------------------------------------------------"
47 Q
48H1 I PG,$E(IOST,1,2)="C-" R !!,"Press RETURN to Continue.",X:DTIME S:'$T!(X["^") QT=1
49 Q
50EX G KILL^XUSCLEAN
Note: See TracBrowser for help on using the repository browser.