source: FOIAVistA/trunk/r/PAID-PRS/PRSROT11.m@ 1154

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

initial load of FOIAVistA 6/30/08 version

File size: 3.6 KB
Line 
1PRSROT11 ;HISC/JH-IND. OR ALL EMPLOYEE OT/CT REPORT (Continued) ;7/18/97
2 ;;4.0;PAID;**2,21,28,34,114**;Sep 21, 1995;Build 6
3 ;;Per VHA Directive 2004-038, this routine should not be modified.
4 ;
5 ; CP = "|" CP = column PIPE character (used for vertical columns)
6 ;
7 N CP
8 S CP="|"
9 S ORG=$S($D(ORG):$E(ORG,1,12),1:"")
10 D HDR1
11 S (PP(1),NAM(1),DAY(1),DATT(1))="",DATE(1)=0
12 F I=1:1:2 S (SAL(I),COMP(I),COMPU(I),OTH(I),OTP(I))=0
13 S PP=""
14 F I=0:0 S PP=$O(^TMP($J,"OT/CP",PP)) Q:PP="" S SW(1)=0 D Q:POUT
15 .;
16 . S DATT=0
17 . F I=0:0 S DATT=$O(^TMP($J,"OT/CP",PP,DATT)) Q:DATT'>0 D Q:POUT
18 ..;
19 .. S INX=0
20 .. F I=0:0 S INX=$O(^TMP($J,"OT/CP",PP,DATT,INX)) Q:INX'>0 D Q:POUT
21 ...;
22 ... S NAM=""
23 ... F I=0:0 S NAM=$O(^TMP($J,"OT/CP",PP,DATT,INX,NAM)) Q:NAM="" S SW(3)=0 D Q:POUT
24 .... S D0=0
25 .... F I=0:0 S D0=$O(^TMP($J,"OT/CP",PP,DATT,INX,NAM,D0)) Q:D0'>0 S TIME=$G(^(D0)) Q:TIME="" D Q:POUT
26 .....;
27 ..... D:($Y>(IOSL-5)) HDR Q:POUT
28 ..... D VLIN0:PP'=PP(1)
29 ..... W !,CP,$S(PP'=PP(1):$J($P(PP,"-",2),2),1:""),?4,CP,$S(DATT'=DATT(1):DATT,1:""),?14,CP,NAM,?39,CP
30 ..... I PRSTLV=3 W $E($P(TIME,"^")),"XX-XX-",$E($P(TIME,"^"),8,11),?52,CP
31 ..... I PRSTLV=7 W $P(TIME,"^"),?52,CP
32 ..... W $J($P(TIME,"^",2),10,2),?64,CP,$J($P(TIME,"^",3),12,2),?79,CP,$J($P(TIME,"^",4),12,2),?94,CP
33 ..... W $J($P(TIME,"^",5),12,2),?109,CP,$J($P(TIME,"^",6),17,2),?131,CP
34 ..... S SAL(1)=SAL(1)+$P(TIME,"^",2),COMPU(1)=COMPU(1)+$P(TIME,"^",3),COMP(1)=COMP(1)+$P(TIME,"^",4),OTH(1)=OTH(1)+$P(TIME,"^",5),OTP(1)=OTP(1)+$P(TIME,"^",6),SW(1)=SW(1)+1
35 ..... S SAL(2)=SAL(2)+$P(TIME,"^",2),COMPU(2)=COMPU(2)+$P(TIME,"^",3),COMP(2)=COMP(2)+$P(TIME,"^",4),OTH(2)=OTH(2)+$P(TIME,"^",5),OTP(2)=OTP(2)+$P(TIME,"^",6)
36 ..... Q
37 .... S PP(1)=PP,DATT(1)=DATT,NAM(1)=NAM,DATE(1)=DATE Q
38 .... Q
39 ... Q
40 .. Q
41 . Q:POUT I SW(1) D
42 .. W !
43 .. D TABLANK0,ROWSEP
44 . D TABLANK0
45 . W " P/P-Totals:"
46 . D WTOT(1)
47 . S (SAL(1),COMPU(1),COMP(1),OTH(1),OTP(1))=0
48 . Q
49 Q:POUT
50 I SW(1) D
51 . D VLIN0
52 . D VLINUND
53 ;
54 D TABLANK0
55 W ?44,"TOTALS:"
56 D WTOT(2)
57 I IOSL<66 D VLIN0
58 Q
59WTOT(PERIOD) ;Write out week 1 total OR (both weeks = pay period total).
60 S I=PERIOD
61 W ?53,$J(SAL(2),10,2)
62 W ?65,$J(COMPU(I),12,2)
63 W ?80,$J(COMP(I),12,2)
64 W ?95,$J(OTH(I),12,2)
65 W ?110,$J(OTP(I),17,2),?131,CP
66 Q
67CHK S X1=DATE,X2=DATE(1) D ^%DTC Q
68HDR S CODE="O001",FOOT="VA TIME & ATTENDANCE SYSTEM"
69 D VLIDSH0,FOOT1^PRSRUT0
70 I $E(IOST,1,2)="C-" S DIR(0)="E" D ^DIR K DIR I $D(DIRUT) S POUT=1
71 Q:POUT
72 W @IOF
73HDR1 N CP S CP="|"
74 W !?(IOM-$L(^TMP($J,"OT/CP")))/2,^TMP($J,"OT/CP"),?(IOM-14),"DATE: ",DAT
75 S X="T&L: "_$P(TLE(1),U)_" Employee: "_$S(SW:"ALL",1:$P(PRSRY,U,2))
76 S X=X_" Year: "_YEAR_" Payperiod"
77 S X=X_$S(PPE(1)=PPE(2):": "_PPE(1),1:"s: "_PPE(1)_" to "_PPE(2))
78 W !,?(IOM-$L(X)/2-1),X,!
79 W !,CP,"P/P",?4,CP,?7,"DATE",?14,CP,?25,"NAME",?39,CP,?44,"SSN",?52,CP,?54,"GROSS PAY",?64,CP,?67,"CT/CH USED",?79,CP,?82,"CT/CH BAL",?94,CP,?97,"OVER/T HRS",?109,CP,?118,"OVER/T PAY",?131,CP D VLIDSH0 Q
80 ;
81VLIDSH0 ;
82 W !,"|---|---------|------------------------|------------|-----------|--------------|--------------|--------------|---------------------|" Q
83 ;
84VLIN0 ;
85 W !
86 D TABLANK0,TABLANK1
87 Q
88 ;
89VLINUND ;use leading blank columns & trailing row separator.
90 W ! D TABLANK0,ROWSEP Q
91 ;
92TABLANK0 ;leading blank columns with vertical slash for column breaks.
93 N CP S CP="|"
94 W CP,?4,CP,?14,CP,?39,CP Q
95 ;
96TABLANK1 ;2nd half of blank columns w/ vertical slash for column breaks.
97 N CP S CP="|"
98 W ?52,CP,?64,CP,?79,CP,?94,CP,?109,CP,?131,CP Q
99 ;
100ROWSEP ;row separator (2nd half of line)
101 N CP S CP="|"
102 W ?52,CP," --------- ",CP," ------- "
103 W ?79,CP," ------- "
104 W ?94,CP," ------- "
105 W ?109,CP," ---------- "
106 W ?131,CP,!
107 Q
Note: See TracBrowser for help on using the repository browser.