ASUAPCOR ;DSD/DFM - DIRECT ISSUE CORRETION; [ 04/15/98 2:36 PM ]
;;3.0;SAMS;**1**;AUG 20, 1993
F Q:$G(ASUREPLY("CORRECT"))="Y" Q:$D(DTOUT)!($D(DUOUT))!($D(DIROUT)) D
.Q:$D(DTOUT)!($D(DUOUT))!($D(DIROUT)) Q:ASUREPLY("CORRECT")="Y"
.S DIR(0)="SB^Y:YES;N:NO;3:STATION;4:PURCHASE ORDER;5:SOURCE;6:ACCOUNT;7:OBJECT;8:USER;9:SUB STATION;10:COMMON ACCOUNTING;11:SUB SUB ACTIVITY;12:NUMBER OF LINE ITEMS;13:VALUE;14:VOUCHER"
.D CORRECT^ASUAUYRN Q:ASUREPLY("CORRECT")="Y" D
..D:ASUREPLY("CORRECT")="N"
...S DIR(0)="NOA^3:14:0"
...D GETFIELD^ASUAUYRN
..Q:$D(DTOUT)!($D(DUOUT))!($D(DIROUT)) Q:ASUREPLY("CORRECT")="Y"
..I ASUREPLY("CORRECT")="3" D Q
...S DIR("B")=ASUTRNS(ASUTRNS,"STATION"),ASUTRNS(ASUTRNS,"STATION")=""
...D STAT^ASUAUAST
..I ASUREPLY("CORRECT")="4" D RDPON^ASUAUPON Q
..I ASUREPLY("CORRECT")="5" S ASUV("ITEM #")=5 D ^ASUAUSRC Q
..I ASUREPLY("CORRECT")<12 D
...S ASUV("ITEM #")=6 D ^ASUAUACC Q:$D(DUOUT)!($D(DIROUT))!($D(DTOUT))
...S ASUV("ITEM #")=7 D ^ASUAUDOJ Q:$D(DUOUT)!($D(DIROUT))!($D(DTOUT))
...S ASUV("ITEM #")=8 D ^ASUAPSST Q:$D(DUOUT)!($D(DIROUT))!($D(DTOUT))
...S ASUV("ITEM #")=9 D ^ASUAUUSR Q:$D(DUOUT)!($D(DIROUT))!($D(DTOUT))
...S ASUV("ITEM #")=10 D ^ASUAPCAN Q:$D(DUOUT)!($D(DIROUT))!($D(DTOUT))
...S ASUV("ITEM #")=11 D ^ASUAUSSA
..I ASUREPLY("CORRECT")="12" D ^ASUAPNLI
..I ASUREPLY("CORRECT")="13" S ASUV("ITEM #")=12,ASUV("LOWEST")=1 D ^ASUAUVAL
..I ASUREPLY("CORRECT")="14" S ASUV("ITEM #")=13 D ^ASUAUVOU
..S ASUREPLY("CORRECT")="N" Q
I ASUREPLY("CORRECT")="Y" D ^ASUAPUPD
K X,Y,ASUREPLY("CORRECT")
Q
ASUAPCOR ;DSD/DFM - DIRECT ISSUE CORRETION; [ 04/15/98 2:36 PM ]
+1 ;;3.0;SAMS;**1**;AUG 20, 1993
+2 FOR
IF $GET(ASUREPLY("CORRECT"))="Y"
QUIT
IF $DATA(DTOUT)!($DATA(DUOUT))!($DATA(DIROUT))
QUIT
Begin DoDot:1
+3 IF $DATA(DTOUT)!($DATA(DUOUT))!($DATA(DIROUT))
QUIT
IF ASUREPLY("CORRECT")="Y"
QUIT
+4 SET DIR(0)="SB^Y:YES;N:NO;3:STATION;4:PURCHASE ORDER;5:SOURCE;6:ACCOUNT;7:OBJECT;8:USER;9:SUB STATION;10:COMMON ACCOUNTING;11:SUB SUB ACTIVITY;12:NUMBER OF LINE ITEMS;13:VALUE;14:VOUCHER"
+5 DO CORRECT^ASUAUYRN
IF ASUREPLY("CORRECT")="Y"
QUIT
Begin DoDot:2
+6 IF ASUREPLY("CORRECT")="N"
Begin DoDot:3
+7 SET DIR(0)="NOA^3:14:0"
+8 DO GETFIELD^ASUAUYRN
End DoDot:3
+9 IF $DATA(DTOUT)!($DATA(DUOUT))!($DATA(DIROUT))
QUIT
IF ASUREPLY("CORRECT")="Y"
QUIT
+10 IF ASUREPLY("CORRECT")="3"
Begin DoDot:3
+11 SET DIR("B")=ASUTRNS(ASUTRNS,"STATION")
SET ASUTRNS(ASUTRNS,"STATION")=""
+12 DO STAT^ASUAUAST
End DoDot:3
QUIT
+13 IF ASUREPLY("CORRECT")="4"
DO RDPON^ASUAUPON
QUIT
+14 IF ASUREPLY("CORRECT")="5"
SET ASUV("ITEM #")=5
DO ^ASUAUSRC
QUIT
+15 IF ASUREPLY("CORRECT")<12
Begin DoDot:3
+16 SET ASUV("ITEM #")=6
DO ^ASUAUACC
IF $DATA(DUOUT)!($DATA(DIROUT))!($DATA(DTOUT))
QUIT
+17 SET ASUV("ITEM #")=7
DO ^ASUAUDOJ
IF $DATA(DUOUT)!($DATA(DIROUT))!($DATA(DTOUT))
QUIT
+18 SET ASUV("ITEM #")=8
DO ^ASUAPSST
IF $DATA(DUOUT)!($DATA(DIROUT))!($DATA(DTOUT))
QUIT
+19 SET ASUV("ITEM #")=9
DO ^ASUAUUSR
IF $DATA(DUOUT)!($DATA(DIROUT))!($DATA(DTOUT))
QUIT
+20 SET ASUV("ITEM #")=10
DO ^ASUAPCAN
IF $DATA(DUOUT)!($DATA(DIROUT))!($DATA(DTOUT))
QUIT
+21 SET ASUV("ITEM #")=11
DO ^ASUAUSSA
End DoDot:3
+22 IF ASUREPLY("CORRECT")="12"
DO ^ASUAPNLI
+23 IF ASUREPLY("CORRECT")="13"
SET ASUV("ITEM #")=12
SET ASUV("LOWEST")=1
DO ^ASUAUVAL
+24 IF ASUREPLY("CORRECT")="14"
SET ASUV("ITEM #")=13
DO ^ASUAUVOU
+25 SET ASUREPLY("CORRECT")="N"
QUIT
End DoDot:2
End DoDot:1
+26 IF ASUREPLY("CORRECT")="Y"
DO ^ASUAPUPD
+27 KILL X,Y,ASUREPLY("CORRECT")
+28 QUIT