ASUAUPON ;DSD/DFM - UTILITY ENTER PURCHASE ORDER NUMBER; [ 04/15/98 2:54 PM ]
;;3.0;SAMS;**1**;AUG 20, 1993
RDPORD ;
S DIR("A")="4. ENTER PURCHASE ORDER NUMBER"
S DIR("?")="Enter 1 to 7 Characters - not all 0"
S:'$D(ASUSW("OPTIONAL")) ASUSW("OPTIONAL")="F"
S DIR(0)=ASUSW("OPTIONAL")_"^1:7^D POEDIT^ASUAUPON" D ^DIR
I $D(DTOUT)!($D(DUOUT))!($D(DIROUT)) G EXIT
S ASUTRNS(ASUTRNS,"PURCHASE ORDER #")=X
S:ASUTRNS("TRANSACTION CODE")="5C" ASUSW("CHANGED")=1
EXIT ;RETURN TO CALLING ROUTINE
K DIR,X,Y,ASUSW("OPTIONAL")
Q
POEDIT ;EP ;EDIT PURCHASE ORDER NUMBER
I $E(X)=0,+X=0 K X Q
K:X'?.UNP X
Q
RDPON ;EP ;READ PURCHASE ORDER NUMBER OPTIONAL
I ASUTRNS("TRANSACTION CODE")="22"!(ASUTRNS("TRANSACTION CODE")="02") G RDPORD
S ASUSW("OPTIONAL")="FO"
G RDPORD
REQD ;EP ; READ PURCHASE ORDER NUMBER REQUIRED
S ASUSW("OPTIONAL")="F"
G RDPORD
ASUAUPON ;DSD/DFM - UTILITY ENTER PURCHASE ORDER NUMBER; [ 04/15/98 2:54 PM ]
+1 ;;3.0;SAMS;**1**;AUG 20, 1993
RDPORD ;
+1 SET DIR("A")="4. ENTER PURCHASE ORDER NUMBER"
+2 SET DIR("?")="Enter 1 to 7 Characters - not all 0"
+3 IF '$DATA(ASUSW("OPTIONAL"))
SET ASUSW("OPTIONAL")="F"
+4 SET DIR(0)=ASUSW("OPTIONAL")_"^1:7^D POEDIT^ASUAUPON"
DO ^DIR
+5 IF $DATA(DTOUT)!($DATA(DUOUT))!($DATA(DIROUT))
GOTO EXIT
+6 SET ASUTRNS(ASUTRNS,"PURCHASE ORDER #")=X
+7 IF ASUTRNS("TRANSACTION CODE")="5C"
SET ASUSW("CHANGED")=1
EXIT ;RETURN TO CALLING ROUTINE
+1 KILL DIR,X,Y,ASUSW("OPTIONAL")
+2 QUIT
POEDIT ;EP ;EDIT PURCHASE ORDER NUMBER
+1 IF $EXTRACT(X)=0
IF +X=0
KILL X
QUIT
+2 IF X'?.UNP
KILL X
+3 QUIT
RDPON ;EP ;READ PURCHASE ORDER NUMBER OPTIONAL
+1 IF ASUTRNS("TRANSACTION CODE")="22"!(ASUTRNS("TRANSACTION CODE")="02")
GOTO RDPORD
+2 SET ASUSW("OPTIONAL")="FO"
+3 GOTO RDPORD
REQD ;EP ; READ PURCHASE ORDER NUMBER REQUIRED
+1 SET ASUSW("OPTIONAL")="F"
+2 GOTO RDPORD