Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: PRS8TL

PRS8TL.m

Go to the documentation of this file.
  1. PRS8TL ;HISC/MRL-DECOMPOSITION, SELECTIVE T&L ;2/19/93 13:12
  1. ;;4.0;PAID;;Sep 21, 1995
  1. ;
  1. ;This routine is used to decompose, or re-decompose, all entries
  1. ;for a specific T&L for a selective Pay Period. Entries which
  1. ;have already been transmitted will not be affected by this process.
  1. ;
  1. ;Called by Routines: PRS8
  1. ;
  1. S QUIT=0
  1. PP ; --- get Pay Period
  1. S SEE=1 D PY^PRS8 ;get pay period
  1. Q:QUIT G END:'OK S PY(0)=$P(^PRST(458,+PY,0),"^",1)
  1. ;
  1. SHOW ; --- show only
  1. W !!,"Want to just SEE what's stored already and not decompose"
  1. S %=2 D YN^DICN I %<0 G END
  1. I %,%>0 S SHOW=$S(%=2:0,1:1),SHOW(1)=$S(SHOW:"SEE",1:"DECOMPOSE") G DECOM:'SHOW S DECOM=0 G ASK
  1. W !?4,"Answer YES if you wish to display what's been previously decomposed."
  1. W !?4,"Respond NO if you actually want to decompose records."
  1. D OUT G SHOW
  1. ;
  1. DECOM ; --- decompose even if done
  1. W !!,"Should I decompose only those records which have not been decomposed" S %=2 D YN^DICN
  1. S DECOM=0 I % G END:%<0 S DECOM=%-1 G ASK
  1. W !?4,"Answer YES if you wish to decompose only records not previously decomposed."
  1. W !?4,"Respond NO to decompose all records which have been released to payroll but",!?4,"have not yet been transmitted." D OUT G DECOM
  1. ASK ; --- loop thru all T&L's
  1. W !!,"Want to ",SHOW(1)," all T&L's for Pay Period ",PY(0) S %=2 D YN^DICN
  1. I %,QUIT Q
  1. I %=1 S PRS8("DES")="Decomposition of all T&L's for PP ",PRS8("PGM")="TLA^PRS8TL" G DEV
  1. I % G END:%=-1,TL
  1. W !?4,"Answer YES if you wish to ",SHOW(1)," all records for PP ",PY(0),"."
  1. W !?4,"Respond NO if you wish to ",SHOW(1)," records for specific T&L's."
  1. D OUT G ASK
  1. ;
  1. TL ; --- Specific T&L Selection
  1. W ! S CT=0 K TLU
  1. F PRS8=1:1 D Q:+Y'>0
  1. .S DIC="^PRST(455.5,",DIC(0)="AEQMZ",DIC("A")="Select T&L Unit: "
  1. .I CT S DIC("A")="Select ANOTHER: "
  1. .D ^DIC
  1. .I Y>0,$D(TLU(Y(0,0))) W !?4,"T&L has already been selected!!",*7 Q
  1. .I $D(^PRST(455.5,+Y,0)) S CT=CT+1,TLU(Y(0,0))=""
  1. I $O(TLU(0))="" W !?4,"No T&L's have been selected!",*7 Q:QUIT G END
  1. W !! S (CT,CT1)=0,J="" F I=0:0 S J=$O(TLU(J)) Q:J="" D
  1. .S CT=CT+1,CT1=CT1+1 I CT1=7 S CT1=1 W !
  1. .S X=(CT1*10-CT1) W ?X,J
  1. ;
  1. OK ; --- are the selections ok
  1. W !!,$S(CT=1:"Is this the T&L",1:"Are these the T&L's")
  1. W " to be processed" S %=2 D YN^DICN
  1. I %,QUIT Q
  1. I % G TL1:%=1,TL:%=2,END
  1. W !?4,"Answer YES if these are the T&L's you want to ",SHOW(1),"."
  1. W !?4,"Answer NO if you wish to select another T&L (or set of T&L's)."
  1. D OUT G OK
  1. ;
  1. TL1 ; --- T&L's are ok, let's go on
  1. S PRS8("DES")="Decomposition of Specific T&L's",PRS8("PGM")="TL2^PRS8TL" G DEV
  1. ;
  1. TL2 ; --- entry point from QUEUE for running specific T&L's
  1. D COVER^PRS8TL1
  1. S TLU="" F TLU1=0:0 S TLU=$O(TLU(TLU)),NAME="" Q:TLU=""!(PRS8("QUIT")) D ^PRS8TL1
  1. I 'PRS8("QUIT") S PRS8("QUIT")=1 D TOP^PRS8TL1
  1. G END
  1. ;
  1. TLA ; --- entry point from QUEUE for running all T&L's
  1. D COVER^PRS8TL1
  1. S TLU1="ATL00" F S TLU1=$O(^PRSPC(TLU1)),NAME="" Q:TLU1'?1"ATL".E!(PRS8("QUIT")) S TLU=$E(TLU1,4,6) D ^PRS8TL1
  1. I 'PRS8("QUIT") S PRS8("QUIT")=1 D TOP^PRS8TL1
  1. G END
  1. ;
  1. OUT ; --- write exit comment
  1. W !?4,"You may enter an up-arrow [""^""] if you wish to QUIT now!",*7 Q
  1. ;
  1. DEV ; --- select output device
  1. W !!,"WARNING: This report is designed to run with a 132-column Right Margin!"
  1. S PRS8("DES")=PRS8("DES")_" "_PY(0),PRS8("VAR")="PY^PY(^SHOW^DECOM^TLU(" D ^PRS8UT
  1. ;
  1. END ; --- all done here
  1. G ALL^PRS8CV