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

ASUAPDUP.m

Go to the documentation of this file.
ASUAPDUP ;DSD/DFM - DIRECT ISSUE DUPLICATION;  [ 04/15/98  2:37 PM ]
 ;;3.0;SAMS;**1**;AUG 20, 1993
DUPFLDS ;
 K DIR("B")
 W !,"1. ENTER TRANSACTION CODE: ",ASUTRNS("TRANSACTION CODE")
 D AREA^ASUAUAST
 W !,"3. ENTER STATION CODE: ",ASUTRNS(ASUTRNS,"STATION")
 W !,"4. ENTER PURCHASE ORDER NUMBER: ",ASUTRNS(ASUTRNS,"PURCHASE ORDER #")
 G:ASUTRNS("TRANSACTION CODE")="02" OPTSRC
 G:$E(ASUTRNS("TRANSACTION CODE"),2,2)?1A OPTSRC
 W !,"5. ENTER SOURCE CODE: ",ASUTRNS(ASUTRNS,"SOURCE CODE") G ACCT
OPTSRC ;
 S:ASUTRNS(ASUTRNS,"SOURCE CODE")]"" DIR("B")=ASUTRNS(ASUTRNS,"SOURCE CODE")
 S ASUV("ITEM #")=5 D ^ASUAUSRC Q:$D(DUOUT)!($D(DIROUT))!($D(DTOUT))
ACCT ;
 S:ASUTRNS(ASUTRNS,"ACCOUNT")]"" DIR("B")=ASUTRNS(ASUTRNS,"ACCOUNT")
 S ASUV("ITEM #")=6 D ^ASUAUACC Q:$D(DUOUT)!($D(DIROUT))!($D(DTOUT))
 S:ASUTRNS(ASUTRNS,"SUB OBJECT")]"" DIR("B")=ASUTRNS(ASUTRNS,"SUB OBJECT")
 S ASUV("ITEM #")=7 D ^ASUAUDOJ Q:$D(DUOUT)!($D(DIROUT))!($D(DTOUT))
 S ASUSW("OPTIONAL")="PO"
 S ASUV("ITEM #")=8 D ^ASUAPSST Q:$D(DUOUT)!($D(DIROUT))!($D(DTOUT))
 K ASUSW("OPTIONAL")
 S:ASUTRNS(ASUTRNS,"USER")]"" DIR("B")=ASUTRNS(ASUTRNS,"USER")
 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 Q:$D(DUOUT)!($D(DIROUT))!($D(DTOUT))
 D ^ASUAPNLI Q:$D(DUOUT)!($D(DIROUT))!($D(DTOUT))
 S ASUV("ITEM #")=13,ASUV("LOWEST")=1 D ^ASUAUVAL
 W !,"14. ENTER VOUCHER NUMBER: ",ASUTRNS(ASUTRNS,"VOUCHER #")
EXIT ;RETURN TO CALLING ROUTINE
 K X,Y,ASUV("ITEM #")
 Q