source: WorldVistAEHR/trunk/r/PAID-PRS/PRSRL21.m@ 846

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

initial load of WorldVistAEHR

File size: 3.5 KB
Line 
1PRSRL21 ;HISC/JH-IND. OR ALL EMPLOYEE LEAVE REQUEST REPORT CONT. ;8/27/01
2 ;;4.0;PAID;**2,26,39,69**;Sep 21, 1995
3PRT1 S (FR,FR(1))=0 F I=0:0 S FR=$O(^TMP($J,"REQ",FR)) Q:FR'>0 D Q:POUT
4 . S NAM="" F I=0:0 S NAM=$O(^TMP($J,"REQ",FR,NAM)) Q:NAM="" D Q:POUT
5 . . S DA=0 F S DA=$O(^TMP($J,"REQ",FR,NAM,DA)) Q:DA'>0 D Q:POUT
6 . . . S TOUR=$G(^TMP($J,"REQ",FR,NAM,DA)),BEG=$E(FR,4,5)_"/"_$E(FR,6,7)_"/"_$E(FR,2,3),END=$P(TOUR,U,3),END=$E(END,4,5)_"/"_$E(END,6,7)_"/"_$E(END,2,3)
7 . . . S X=$P(TOUR,U,9) S X=$S(X:X_$S($P(TOUR,U,10)="D":" days",1:" hrs"),1:"")
8 . . . S DENT=$P(TOUR,U,6),DENT=$E(DENT,4,5)_"/"_$E(DENT,6,7)_"/"_$E(DENT,2,3),DAPR=$P(TOUR,U,7),DAPR=$S(DAPR:$E(DAPR,4,5)_"/"_$E(DAPR,6,7)_"/"_$E(DAPR,2,3),1:""),SUPR=$S($P(TOUR,U,8)'="":$P($G(^VA(200,$P(TOUR,U,8),0)),U),1:"")
9 . . . D:$Y>(IOSL-5) HDR Q:POUT D VLIN1:FR(1)'=FR
10 . . . W !,"|",BEG,?10,$P(TOUR,U,1),?17,"|",END,?27,$P(TOUR,U,2),?34,"|",$E(NAM,1,20),?57,"|",?58,$J(X,10),?68,"|",?69,$E($P(TOUR,U,4),1,18),?88,"|",?89,DENT,?98,"|",?99,DAPR,?108,"|",?109,$E(SUPR,1,22),?131,"|"
11 . . . S FR(1)=FR
12 Q
13 ;
14PRT2 S FR=0 F I=0:0 S FR=$O(^TMP($J,"REQ",FR)) Q:FR'>0 D Q:POUT
15 . S NAM="" F I=0:0 S NAM=$O(^TMP($J,"REQ",FR,NAM)) Q:NAM="" D Q:POUT
16 . . S DA=0 F S DA=$O(^TMP($J,"REQ",FR,NAM,DA)) Q:DA'>0 D Q:POUT
17 . . . S TOUR=$G(^TMP($J,"REQ",FR,NAM,DA)),BEG=$E(FR,4,5)_"/"_$E(FR,6,7)_"/"_$E(FR,2,3),END=$P(TOUR,U,3),END=$E(END,4,5)_"/"_$E(END,6,7)_"/"_$E(END,2,3)
18 . . . S X=$P(TOUR,U,9) S X=$S(X:X_$S($P(TOUR,U,10)="D":" days",1:" hrs"),1:"")
19 . . . S DENT=$P(TOUR,U,6),DENT=$E(DENT,4,5)_"/"_$E(DENT,6,7)_"/"_$E(DENT,2,3),DAPR=$P(TOUR,U,7),DAPR=$S(DAPR:$E(DAPR,4,5)_"/"_$E(DAPR,6,7)_"/"_$E(DAPR,2,3),1:""),SUPR=$S($P(TOUR,U,8)'="":$P($G(^VA(200,$P(TOUR,U,8),0)),U),1:"")
20 . . . D:$Y>(IOSL-5) HDR Q:POUT
21 . . . W !,"|",BEG,?11,$P(TOUR,U,1),?18,"|",END,?29,$P(TOUR,U,2),?36,"|",?37,$J(X,10),?47,"|",?48,$E($P(TOUR,U,4),1,23),?72,"|",?74,DENT,?84,"|",?86,DAPR,?96,"|",?99,$E(SUPR,1,34),?131,"|"
22 Q
23 ;
24HDR ; page header
25 I $D(ZTQUEUED),$$S^%ZTLOAD S ZSTOP=1,POUT=1 Q
26 D VLIDSH:'SW,VLIDSH1:SW S CODE=$S(SW=0:"L001",1:"L002"),FOOT="VA TIME & ATTENDANCE SYSTEM" D FOOT1^PRSRUT0 Q:POUT
27 I $E(IOST,1,2)="C-" R !!,"Press Return/Enter to continue or ""^"" to quit. ",X:DTIME S:X="^"!('$T) POUT=1
28 Q:POUT
29 W @IOF
30 D HDR1:SW,HDR2:'SW Q
31HDR1 ; page header for all employee report
32 W !?(IOM-$L(^TMP($J,"REQ",0)))/2,^TMP($J,"REQ",0),?(IOM-14),"DATE: ",DAT,!?(IOM-$L(" from: "_XX_" to: "_YY))/2," from: ",XX," to: ",YY,!?(IOM-$L(" for T&L: "_$P(TLE(1),U)))/2," for T&L: ",$P(TLE(1),U),!! D VLIDSH1
33 W !,"|","FROM",?17,"|","TO",?34,"|","EMPLOYEE",?57,"|",?58,"LENGTH",?68,"|",?69,"TYPE LEAVE",?88,"|",?89,"DATE-REQ",?98,"|",?99,"DATE-APP",?108,"|",?109,"APPROVING SUPERVISOR",?131,"|" D VLIDSH1 Q
34HDR2 ; page header for single employee report
35 W !?(IOM-$L(^TMP($J,"REQ",0)))/2,^TMP($J,"REQ",0),?(IOM-14),"DATE: ",DAT,!,?48," from ",XX," to ",YY,!,?IOM-($L(NAM)+$L(ORG))/2-5,"for: ",NAM," - ",ORG,!! D VLIDSH
36 W !,"|",?6,"FROM",?18,"|",?27,"TO",?36,"|",?39,"LENGTH",?47,"|",?54,"TYPE LEAVE",?72,"|",?74,"DATE-REQ",?84,"|",?86,"DATE-APP",?96,"|",?99,"APPROVING SUPERVISOR",?131,"|" D VLIDSH Q
37VLIDSH W !,"|-----------------|-----------------|----------|------------------------|-----------|-----------|----------------------------------|" Q
38VLIDSH1 W !,"|----------------|----------------|----------------------|----------|-------------------|---------|---------|----------------------|" Q
39VLIN1 W !,"|",?17,"|",?34,"|",?57,"|",?68,"|",?88,"|",?98,"|",?108,"|",?131,"|" Q
40VLIN W !,"|",?18,"|",?36,"|",?47,"|",?72,"|",?84,"|",?96,"|",?131,"|" Q
Note: See TracBrowser for help on using the repository browser.