ACRPPUR ; GENERATED FROM 'ACR PURCHASING OFFICE' PRINT TEMPLATE (#3892) ; 09/30/09 ; (FILE 9002199.4, MARGIN=80)
G BEGIN
N W !
T W:$X ! I '$D(DIOT(2)),DN,$D(IOSL),$S('$D(DIWF):1,$P(DIWF,"B",2):$P(DIWF,"B",2),1:1)+$Y'<IOSL,$D(^UTILITY($J,1))#2,^(1)?1U1P1E.E X ^(1)
S DISTP=DISTP+1,DILCT=DILCT+1 D:'(DISTP#100) CSTP^DIO2
Q
DT I $G(DUZ("LANG"))>1,Y W $$OUT^DIALOGU(Y,"DD") Q
I Y W $P("JAN^FEB^MAR^APR^MAY^JUN^JUL^AUG^SEP^OCT^NOV^DEC",U,$E(Y,4,5))_" " W:Y#100 $J(Y#100\1,2)_"," W Y\10000+1700 W:Y#1 " "_$E(Y_0,9,10)_":"_$E(Y_"000",11,12) Q
W Y Q
M D @DIXX
Q
BEGIN ;
S:'$D(DN) DN=1 S DISTP=$G(DISTP),DILCT=$G(DILCT)
I $D(DXS)<9 M DXS=^DIPT(3892,"DXS")
S I(0)="^ACRPO(",J(0)=9002199.4
D N:$X>4 Q:'DN W ?4 W "PURCHASING OFFICE......:"
S X=$G(^ACRPO(D0,0)) W ?30 S Y=$P(X,U,1) S Y=$S(Y="":Y,$D(^AUTTLOC(Y,0))#2:$P(^(0),U),1:Y) S Y=$S(Y="":Y,$D(^DIC(4,Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,20)
D N:$X>50 Q:'DN W ?50 W "AREA SETUP:"
W ?63 S Y=$P(X,U,19) S Y=$S(Y="":Y,$D(^ACRSYS(Y,0))#2:$P(^(0),U),1:Y) S Y=$S(Y="":Y,$D(^AUTTAREA(Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,16)
D N:$X>4 Q:'DN W ?4 W "PURCHASING OFFICE CODE.:"
W ?30,$E($P(X,U,7),1,6)
D N:$X>4 Q:'DN W ?4 W "FINANCE OFFICE.........:"
W ?30 S Y=$P(X,U,8) S Y=$S(Y="":Y,$D(^AUTTPRG(Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,30)
D N:$X>4 Q:'DN W ?4 W "REGIONAL FINANCE OFFICE:"
W ?30 S Y=$P(X,U,16) S Y=$S(Y="":Y,$D(^AUTTPRG(Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,30)
D N:$X>4 Q:'DN W ?4 W "AREA OFFICE............:"
W ?30 S Y=$P(X,U,10) S Y=$S(Y="":Y,$D(^AUTTAREA(Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,30)
D N:$X>4 Q:'DN W ?4 W "CONTRACT OFFICER.......:"
W ?30 S Y=$P(X,U,11) S Y(0)=Y S Y=$$NAME2^ACRFUTL1(Y) W $E(Y,1,30)
D N:$X>4 Q:'DN W ?4 W "PURCHASING SUPERVISOR..:"
S X=$G(^ACRPO(D0,0)) W ?30 S Y=$P(X,U,3) S Y=$S(Y="":Y,$D(^ACRPA(Y,0))#2:$P(^(0),U),1:Y) S Y(0)=Y S Y=$$NAME2^ACRFUTL1(Y) W $E(Y,1,30)
D N:$X>4 Q:'DN W ?4 W "SADBUS COORDINATOR.....:"
S X=$G(^ACRPO(D0,"DT")) W ?30 S Y=$P(X,U,7) S Y(0)=Y S Y=$$NAME2^ACRFUTL1(Y) W $E(Y,1,30)
D N:$X>4 Q:'DN W ?4 W "ACCOUNTING POINT.......:"
S X=$G(^ACRPO(D0,0)) W ?30 S Y=$P(X,U,4) S Y=$S(Y="":Y,$D(^AUTTACPT(Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,2)
D N:$X>4 Q:'DN W ?4 W "LOCATION CODE..........:"
W ?30 S Y=$P(X,U,5) S Y=$S(Y="":Y,$D(^AUTTLCOD(Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,30)
D N:$X>4 Q:'DN W ?4 W "PRINTER................:"
W ?30 S Y=$P(X,U,2) S Y=$S(Y="":Y,$D(^%ZIS(1,Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,30)
D N:$X>44 Q:'DN W ?44 W "TRAVEL PRINTER:"
W ?61 S Y=$P(X,U,14) S Y=$S(Y="":Y,$D(^%ZIS(1,Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,15)
D N:$X>4 Q:'DN W ?4 W "AREA PROPERTY PRINTER..:"
W ?30 S Y=$P(X,U,15) S Y=$S(Y="":Y,$D(^%ZIS(1,Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,12)
D N:$X>44 Q:'DN W ?44 W "SUPPLY PRINTER:"
W ?61 S Y=$P(X,U,17) S Y=$S(Y="":Y,$D(^%ZIS(1,Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,15)
D N:$X>4 Q:'DN W ?4 W "AREA PERSONNEL PRINTER.:"
W ?30 S Y=$P(X,U,18) S Y=$S(Y="":Y,$D(^%ZIS(1,Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,12)
D N:$X>44 Q:'DN W ?44 W "CONDENSED PRTR:"
S X=$G(^ACRPO(D0,"DT")) D T Q:'DN W ?2 S Y=$P(X,U,10) S Y=$S(Y="":Y,$D(^%ZIS(1,Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,30)
D N:$X>4 Q:'DN W ?4 W "SIGNATURE WARNING DAYS.:"
S X=$G(^ACRPO(D0,0)) W ?30 S Y=$P(X,U,6) W:Y]"" $J(Y,2,0)
D N:$X>44 Q:'DN W ?44 W "REQ TO FINANCE:"
S X=$G(^ACRPO(D0,"DT")) W ?61 S Y=$P(X,U,9) W:Y]"" $S($D(DXS(1,Y)):DXS(1,Y),1:Y)
D N:$X>4 Q:'DN W ?4 W "PHONE..................:"
S X=$G(^ACRPO(D0,0)) W ?30,$E($P(X,U,9),1,12)
D N:$X>44 Q:'DN W ?44 W "FAX NUMBER....:"
S X=$G(^ACRPO(D0,"DT")) W ?61,$E($P(X,U,8),1,15)
D N:$X>4 Q:'DN W ?4 W "ISSUING OFFICE.........:"
W ?30 S Y=$P(X,U,1) S Y=$S(Y="":Y,$D(^AUTTPRG(Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,30)
D N:$X>4 Q:'DN W ?4 W "SHIP TO................:"
W ?30 S Y=$P(X,U,2) S Y=$S(Y="":Y,$D(^AUTTPRG(Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,30)
D N:$X>4 Q:'DN W ?4 W "MAIL INVOICE TO........:"
W ?30 S Y=$P(X,U,3) S Y=$S(Y="":Y,$D(^AUTTPRG(Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,30)
D N:$X>4 Q:'DN W ?4 W "INSPECTION LOCATION....:"
W ?30 S Y=$P(X,U,4) S Y=$S(Y="":Y,$D(^AUTTPRG(Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,30)
D N:$X>4 Q:'DN W ?4 W "TRAVEL VOUCHER AUDITOR.:"
S X=$G(^ACRPO(D0,0)) W ?30 S Y=$P(X,U,13) S Y(0)=Y S Y=$$NAME2^ACRFUTL1(Y) W $E(Y,1,30)
D N:$X>4 Q:'DN W ?4 W "TRAVEL PAYMT CERTIFIER.:"
S X=$G(^ACRPO(D0,0)) W ?30 S Y=$P(X,U,12) S Y(0)=Y S Y=$$NAME2^ACRFUTL1(Y) W $E(Y,1,30)
D N:$X>4 Q:'DN W ?4 W "PURCHASE ORDER # COPIES:"
S X=$G(^ACRPO(D0,"DT")) W ?30 S Y=$P(X,U,6) W:Y]"" $J(Y,3,0)
K Y
Q
HEAD ;
W !,"--------------------------------------------------------------------------------",!!
ACRPPUR ; GENERATED FROM 'ACR PURCHASING OFFICE' PRINT TEMPLATE (#3892) ; 09/30/09 ; (FILE 9002199.4, MARGIN=80)
+1 GOTO BEGIN
N WRITE !
T IF $X
WRITE !
IF '$DATA(DIOT(2))
IF DN
IF $DATA(IOSL)
IF $SELECT('$DATA(DIWF):1,$PIECE(DIWF,"B",2):$PIECE(DIWF,"B",2),1:1)+$Y'<IOSL
IF $DATA(^UTILITY($JOB,1))#2
IF ^(1)?1U1P1E.E
XECUTE ^(1)
+1 SET DISTP=DISTP+1
SET DILCT=DILCT+1
IF '(DISTP#100)
DO CSTP^DIO2
+2 QUIT
DT IF $GET(DUZ("LANG"))>1
IF Y
WRITE $$OUT^DIALOGU(Y,"DD")
QUIT
+1 IF Y
WRITE $PIECE("JAN^FEB^MAR^APR^MAY^JUN^JUL^AUG^SEP^OCT^NOV^DEC",U,$EXTRACT(Y,4,5))_" "
IF Y#100
WRITE $JUSTIFY(Y#100\1,2)_","
WRITE Y\10000+1700
IF Y#1
WRITE " "_$EXTRACT(Y_0,9,10)_":"_$EXTRACT(Y_"000",11,12)
QUIT
+2 WRITE Y
QUIT
M DO @DIXX
+1 QUIT
BEGIN ;
+1 IF '$DATA(DN)
SET DN=1
SET DISTP=$GET(DISTP)
SET DILCT=$GET(DILCT)
+2 IF $DATA(DXS)<9
MERGE DXS=^DIPT(3892,"DXS")
+3 SET I(0)="^ACRPO("
SET J(0)=9002199.4
+4 IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "PURCHASING OFFICE......:"
+5 SET X=$GET(^ACRPO(D0,0))
WRITE ?30
SET Y=$PIECE(X,U,1)
SET Y=$SELECT(Y="":Y,$DATA(^AUTTLOC(Y,0))#2:$PIECE(^(0),U),1:Y)
SET Y=$SELECT(Y="":Y,$DATA(^DIC(4,Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,20)
+6 IF $X>50
DO N
IF 'DN
QUIT
WRITE ?50
WRITE "AREA SETUP:"
+7 WRITE ?63
SET Y=$PIECE(X,U,19)
SET Y=$SELECT(Y="":Y,$DATA(^ACRSYS(Y,0))#2:$PIECE(^(0),U),1:Y)
SET Y=$SELECT(Y="":Y,$DATA(^AUTTAREA(Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,16)
+8 IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "PURCHASING OFFICE CODE.:"
+9 WRITE ?30,$EXTRACT($PIECE(X,U,7),1,6)
+10 IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "FINANCE OFFICE.........:"
+11 WRITE ?30
SET Y=$PIECE(X,U,8)
SET Y=$SELECT(Y="":Y,$DATA(^AUTTPRG(Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,30)
+12 IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "REGIONAL FINANCE OFFICE:"
+13 WRITE ?30
SET Y=$PIECE(X,U,16)
SET Y=$SELECT(Y="":Y,$DATA(^AUTTPRG(Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,30)
+14 IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "AREA OFFICE............:"
+15 WRITE ?30
SET Y=$PIECE(X,U,10)
SET Y=$SELECT(Y="":Y,$DATA(^AUTTAREA(Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,30)
+16 IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "CONTRACT OFFICER.......:"
+17 WRITE ?30
SET Y=$PIECE(X,U,11)
SET Y(0)=Y
SET Y=$$NAME2^ACRFUTL1(Y)
WRITE $EXTRACT(Y,1,30)
+18 IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "PURCHASING SUPERVISOR..:"
+19 SET X=$GET(^ACRPO(D0,0))
WRITE ?30
SET Y=$PIECE(X,U,3)
SET Y=$SELECT(Y="":Y,$DATA(^ACRPA(Y,0))#2:$PIECE(^(0),U),1:Y)
SET Y(0)=Y
SET Y=$$NAME2^ACRFUTL1(Y)
WRITE $EXTRACT(Y,1,30)
+20 IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "SADBUS COORDINATOR.....:"
+21 SET X=$GET(^ACRPO(D0,"DT"))
WRITE ?30
SET Y=$PIECE(X,U,7)
SET Y(0)=Y
SET Y=$$NAME2^ACRFUTL1(Y)
WRITE $EXTRACT(Y,1,30)
+22 IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "ACCOUNTING POINT.......:"
+23 SET X=$GET(^ACRPO(D0,0))
WRITE ?30
SET Y=$PIECE(X,U,4)
SET Y=$SELECT(Y="":Y,$DATA(^AUTTACPT(Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,2)
+24 IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "LOCATION CODE..........:"
+25 WRITE ?30
SET Y=$PIECE(X,U,5)
SET Y=$SELECT(Y="":Y,$DATA(^AUTTLCOD(Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,30)
+26 IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "PRINTER................:"
+27 WRITE ?30
SET Y=$PIECE(X,U,2)
SET Y=$SELECT(Y="":Y,$DATA(^%ZIS(1,Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,30)
+28 IF $X>44
DO N
IF 'DN
QUIT
WRITE ?44
WRITE "TRAVEL PRINTER:"
+29 WRITE ?61
SET Y=$PIECE(X,U,14)
SET Y=$SELECT(Y="":Y,$DATA(^%ZIS(1,Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,15)
+30 IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "AREA PROPERTY PRINTER..:"
+31 WRITE ?30
SET Y=$PIECE(X,U,15)
SET Y=$SELECT(Y="":Y,$DATA(^%ZIS(1,Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,12)
+32 IF $X>44
DO N
IF 'DN
QUIT
WRITE ?44
WRITE "SUPPLY PRINTER:"
+33 WRITE ?61
SET Y=$PIECE(X,U,17)
SET Y=$SELECT(Y="":Y,$DATA(^%ZIS(1,Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,15)
+34 IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "AREA PERSONNEL PRINTER.:"
+35 WRITE ?30
SET Y=$PIECE(X,U,18)
SET Y=$SELECT(Y="":Y,$DATA(^%ZIS(1,Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,12)
+36 IF $X>44
DO N
IF 'DN
QUIT
WRITE ?44
WRITE "CONDENSED PRTR:"
+37 SET X=$GET(^ACRPO(D0,"DT"))
DO T
IF 'DN
QUIT
WRITE ?2
SET Y=$PIECE(X,U,10)
SET Y=$SELECT(Y="":Y,$DATA(^%ZIS(1,Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,30)
+38 IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "SIGNATURE WARNING DAYS.:"
+39 SET X=$GET(^ACRPO(D0,0))
WRITE ?30
SET Y=$PIECE(X,U,6)
IF Y]""
WRITE $JUSTIFY(Y,2,0)
+40 IF $X>44
DO N
IF 'DN
QUIT
WRITE ?44
WRITE "REQ TO FINANCE:"
+41 SET X=$GET(^ACRPO(D0,"DT"))
WRITE ?61
SET Y=$PIECE(X,U,9)
IF Y]""
WRITE $SELECT($DATA(DXS(1,Y)):DXS(1,Y),1:Y)
+42 IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "PHONE..................:"
+43 SET X=$GET(^ACRPO(D0,0))
WRITE ?30,$EXTRACT($PIECE(X,U,9),1,12)
+44 IF $X>44
DO N
IF 'DN
QUIT
WRITE ?44
WRITE "FAX NUMBER....:"
+45 SET X=$GET(^ACRPO(D0,"DT"))
WRITE ?61,$EXTRACT($PIECE(X,U,8),1,15)
+46 IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "ISSUING OFFICE.........:"
+47 WRITE ?30
SET Y=$PIECE(X,U,1)
SET Y=$SELECT(Y="":Y,$DATA(^AUTTPRG(Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,30)
+48 IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "SHIP TO................:"
+49 WRITE ?30
SET Y=$PIECE(X,U,2)
SET Y=$SELECT(Y="":Y,$DATA(^AUTTPRG(Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,30)
+50 IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "MAIL INVOICE TO........:"
+51 WRITE ?30
SET Y=$PIECE(X,U,3)
SET Y=$SELECT(Y="":Y,$DATA(^AUTTPRG(Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,30)
+52 IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "INSPECTION LOCATION....:"
+53 WRITE ?30
SET Y=$PIECE(X,U,4)
SET Y=$SELECT(Y="":Y,$DATA(^AUTTPRG(Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,30)
+54 IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "TRAVEL VOUCHER AUDITOR.:"
+55 SET X=$GET(^ACRPO(D0,0))
WRITE ?30
SET Y=$PIECE(X,U,13)
SET Y(0)=Y
SET Y=$$NAME2^ACRFUTL1(Y)
WRITE $EXTRACT(Y,1,30)
+56 IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "TRAVEL PAYMT CERTIFIER.:"
+57 SET X=$GET(^ACRPO(D0,0))
WRITE ?30
SET Y=$PIECE(X,U,12)
SET Y(0)=Y
SET Y=$$NAME2^ACRFUTL1(Y)
WRITE $EXTRACT(Y,1,30)
+58 IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "PURCHASE ORDER # COPIES:"
+59 SET X=$GET(^ACRPO(D0,"DT"))
WRITE ?30
SET Y=$PIECE(X,U,6)
IF Y]""
WRITE $JUSTIFY(Y,3,0)
+60 KILL Y
+61 QUIT
HEAD ;
+1 WRITE !,"--------------------------------------------------------------------------------",!!