PRSAOTE ;HISC/REL-OT/CT Edit ;12-SEP-00
;;4.0;PAID;**2,61**;Sep 21, 1995
S PRSTLV=2 D ^PRSAUTL G:TLI<1 EX
K DIC S DIC("A")="Select EMPLOYEE: ",DIC("S")="I $P(^(0),""^"",8)=TLE",DIC(0)="AEQM",DIC="^PRSPC(",D="ATL"_TLE W ! D IX^DIC S DFN=+Y K DIC
I DFN<1 G EX
D HDR^PRSAOTS
K %DT S %DT="AEFX",%DT("A")="Begin with Date: ",%DT("B")="T" W ! D ^%DT K %DT S:$D(DTOUT) Y=0 G:Y<1 EX S DTI=Y
S NUM=1 D DISP^PRSAOTS
G:'CNT EX
X1 R !!,"Edit Which Request #? ",X:DTIME G:'$T!("^"[X) EX I X'?1N.N!(X<1)!(X>CNT) W *7," Enter # of Request to Edit" G X1
S X=+X,DA=R(X),ZOLD=$G(^PRST(458.2,DA,0))
S DDSFILE=458.2,DR="[PRSA OT REQ]" D ^DDS K DS
S %=$P(^PRST(458.2,DA,0),"^",3) I '% S DIK="^PRST(458.2," D ^DIK K DIK G EX
I ZOLD=^PRST(458.2,DA,0) G EX
S STAT=$P(^PRST(458.2,DA,0),"^",8) I STAT?1U K ^PRST(458.2,"A"_STAT,DFN,DA)
S ^PRST(458.2,DA,0)=$P(^PRST(458.2,DA,0),"^",1,12) K ^(1)
D NOW^%DTC S $P(^PRST(458.2,DA,0),"^",8)="R",$P(^(0),"^",11,12)=DUZ_"^"_%,^PRST(458.2,"AR",DFN,DA)=""
S X=$P($G(^PRSPC(DFN,0)),"^",29) I X S:X>100 X=X/2080 S $P(^PRST(458.2,DA,0),"^",10)=+$J(X*1.5*$P(^PRST(458.2,DA,0),"^",6),0,2)
D UPD^PRSASAL,APP^PRSASAL
EX G KILL^XUSCLEAN
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPRSAOTE 1179 printed Dec 13, 2024@02:23:42 Page 2
PRSAOTE ;HISC/REL-OT/CT Edit ;12-SEP-00
+1 ;;4.0;PAID;**2,61**;Sep 21, 1995
+2 SET PRSTLV=2
DO ^PRSAUTL
if TLI<1
GOTO EX
+3 KILL DIC
SET DIC("A")="Select EMPLOYEE: "
SET DIC("S")="I $P(^(0),""^"",8)=TLE"
SET DIC(0)="AEQM"
SET DIC="^PRSPC("
SET D="ATL"_TLE
WRITE !
DO IX^DIC
SET DFN=+Y
KILL DIC
+4 IF DFN<1
GOTO EX
+5 DO HDR^PRSAOTS
+6 KILL %DT
SET %DT="AEFX"
SET %DT("A")="Begin with Date: "
SET %DT("B")="T"
WRITE !
DO ^%DT
KILL %DT
if $DATA(DTOUT)
SET Y=0
if Y<1
GOTO EX
SET DTI=Y
+7 SET NUM=1
DO DISP^PRSAOTS
+8 if 'CNT
GOTO EX
X1 READ !!,"Edit Which Request #? ",X:DTIME
if '$TEST!("^"[X)
GOTO EX
IF X'?1N.N!(X<1)!(X>CNT)
WRITE *7," Enter # of Request to Edit"
GOTO X1
+1 SET X=+X
SET DA=R(X)
SET ZOLD=$GET(^PRST(458.2,DA,0))
+2 SET DDSFILE=458.2
SET DR="[PRSA OT REQ]"
DO ^DDS
KILL DS
+3 SET %=$PIECE(^PRST(458.2,DA,0),"^",3)
IF '%
SET DIK="^PRST(458.2,"
DO ^DIK
KILL DIK
GOTO EX
+4 IF ZOLD=^PRST(458.2,DA,0)
GOTO EX
+5 SET STAT=$PIECE(^PRST(458.2,DA,0),"^",8)
IF STAT?1U
KILL ^PRST(458.2,"A"_STAT,DFN,DA)
+6 SET ^PRST(458.2,DA,0)=$PIECE(^PRST(458.2,DA,0),"^",1,12)
KILL ^(1)
+7 DO NOW^%DTC
SET $PIECE(^PRST(458.2,DA,0),"^",8)="R"
SET $PIECE(^(0),"^",11,12)=DUZ_"^"_%
SET ^PRST(458.2,"AR",DFN,DA)=""
+8 SET X=$PIECE($GET(^PRSPC(DFN,0)),"^",29)
IF X
if X>100
SET X=X/2080
SET $PIECE(^PRST(458.2,DA,0),"^",10)=+$JUSTIFY(X*1.5*$PIECE(^PRST(458.2,DA,0),"^",6),0,2)
+9 DO UPD^PRSASAL
DO APP^PRSASAL
EX GOTO KILL^XUSCLEAN