source: WorldVistAEHR/trunk/r/PAID-PRS/PRS8TL1.m@ 1150

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

initial load of WorldVistAEHR

File size: 4.0 KB
RevLine 
[613]1PRS8TL1 ;HISC/MRL-DECOMPOSITION, SELECTIVE T&L, CONT. ;2/26/93 14:35
2 ;;4.0;PAID;;Sep 21, 1995
3 ;
4 ;This routine is a continuation of PRS8TL. This portion of the
5 ;routine actually loops through file 450 and locates the entries
6 ;identified by the user. If the user has decided to only show
7 ;the information currently stored it is located in file 458 and
8 ;displayed. If decomposition has been selected and the record has
9 ;not yet been transmitted the record will be decomposed and then
10 ;the information (old and new) will be displayed.
11 ;
12 ;Called by Routines: PRS8TL
13 ;
14 D TOP F TLU2=0:0 S NAME=$O(^PRSPC("ATL"_TLU,NAME)),DFN=0 Q:NAME=""!(PRS8("QUIT")) D
15 .F TLU3=0:0 S DFN=$O(^PRSPC("ATL"_TLU,NAME,DFN)) Q:'DFN!(PRS8("QUIT")) D W !
16 ..S X=$G(IOSL) S:'X X=24 S X=X-8 I $Y>X,'PRS8("QUIT") D TOP
17 ..Q:PRS8("QUIT")
18 ..S X=$G(^PRST(458,+PY,"E",+DFN,0)) I X="" Q ;no record for this pp
19 ..W !,$E($P(NAME,",",1)_","_$E($P(NAME,",",2)),1,25)
20 ..S X1=$P($G(^PRSPC(+DFN,0)),"^",9) I X1="" S X1="XXXXXXXXX"
21 ..W ?30,$E(X1,1,3)_"-"_$E(X1,4,5)_"-"_$E(X1,6,9)
22 ..S X1=$P(X,"^",2)
23 ..W ?45,$S(X1="P":"Released to Payroll",X1="X":"Transmitted to Austin",1:"T&L still updating Record")
24 ..I X1="" W !?6,"|OLD| Record has not been released to Payroll...Cannot Decompose..." Q
25 ..S VALUE=$G(^PRST(458,+PY,"E",+DFN,5))
26 ..W !?6,"|OLD| ",$S(VALUE'="":VALUE,1:"No Decomposition currently on File")
27 ..Q:SHOW
28 ..I X1="X"!(VALUE'=""&('DECOM)) W !?6,"|NEW| " D Q
29 ...I X1="X" W "Record already Transmitted...Cannot update Decomposition..." Q
30 ...W "Record already decomposed <see above>...Not updated per user..."
31 ..D UP
32 ..S VALUE(1)=$G(^PRST(458,+PY,"E",+DFN,5))
33 ..W !?6,"|NEW| ",$S(VALUE(1)=VALUE:" ",1:"*"),VALUE(1)
34 Q
35 ;
36UP ; --- decompose
37 S PPI=PY
38 N PRS8,SHOW,VALUE,PY
39 S (SEE,SHOW)=0,SAVE=1
40 D ONE^PRS8
41 Q
42 ;
43TOP ; --- Top of Form
44 S PRS8("PAGE")=PRS8("PAGE")+1
45 I PRS8("PAGE")>1 D
46 .F I=$Y:1:(IOSL)-6 W !
47 .D BOT
48 I PRS8("QUIT") Q
49 W @IOF S X="Decomposition Report for T&L '"_TLU_"'" D CTR
50 S X="Pay Period "_PY(0) D CTR
51 W !!,"Employee Name",?30,"SSN",?45,"Current T&A Status",!
52 S X="",$P(X,"-",(IOM-1))="" W X Q
53 ;
54BOT ; --- bottom of form
55 I IOST["C-" D Q
56 .R !!,"Press <RETURN> to Continue, Enter '^' to QUIT: ",X:DTIME
57 .I X["^"!('$T) S PRS8("QUIT")=1
58 S X="",$P(X,"=",(IOM-1))="" W !!,X
59 W !,PRS8("WHO") S X="Page "_PRS8("PAGE") D CTR1
60 W ?(IOM-($L(PRS8("DATE"))+2)),PRS8("DATE"),! Q
61 ;
62COVER ; --- cover page
63 D NOW^%DTC S Y=% X ^DD("DD") S PRS8("DATE")=Y
64 S X=$P($G(^VA(200,+$G(DUZ),0)),"^",1) ;user
65 S PRS8("WHO")=$S(X'="":X,1:"REQUESTOR UNKNOWN")
66 S (PRS8("PAGE"),PRS8("QUIT"))=0
67 I IOST["C-" Q
68 F I=1:1:10 W !
69 S X="D E C O M P O S I T I O N A C T I V I T Y R E P O R T" D CTR
70 F I=1:1:5 W !
71 S X="Date/Time Started",X1=PRS8("DATE") D FORM
72 S X="User Initiating Report",X1=PRS8("WHO") D FORM
73 W !!! S X="S E A R C H P A R A M E T E R S" D CTR
74 W !! S X="Report is Run for Pay Period",X1=PY(0) D FORM
75 S X="Decompose or Show Data",X1=$S(SHOW:"SHOW",1:"DECOMPOSE") D FORM
76 I 'SHOW S X=$S(DECOM:"",1:"*")_"Decompose All Records",X1=$S(DECOM:"YES",1:"NO") D FORM
77 S X="Process All Records",X1=$S($O(TLU(0))]"":"NO",1:"YES") D FORM
78 I $O(TLU(0))]"" D
79 .W ! S X="The following T&L's are processed in this Report:",X1="" D CTR
80 .S X="",CT=0,J="" F I=0:0 S J=$O(TLU(J)) Q:J="" D
81 ..S CT=CT+1 I (CT*10)>(IOM-10) S CT=1 D CTR S X=""
82 ..S X=X_J_" "
83 .D CTR:X'=""
84 W !! S X="",$P(X,80)="" D CTR
85 S X="NOTE: Records which have not been released to Payroll are never Decomposed." D CTR
86 S X="Additionally, records which have been Transmitted to Austin are not Decomposed." D CTR
87 Q:DECOM!SHOW
88 W ! S X="* You have chosen the feature which will not initiate a decomposition run for" D CTR
89 S X="any record already having been previously decomposed. " D CTR
90 Q
91 ;
92FORM ; --- format X and X1 then fall into CTR (Center)
93 S X=$E(X_"...............................",1,50)_" "
94 S X1=$E(X1,1,20),X1=$J(X1,10),X=X_X1
95 ;
96CTR ; --- center
97 W !
98 ;
99CTR1 ; --- center but don't write line feed
100 W ?(IOM-$L(X)\2),X
101 K X,X1 Q
Note: See TracBrowser for help on using the repository browser.