ACRPSS ; GENERATED FROM 'ACR ORDER FOR SUP/SER' PRINT TEMPLATE (#3918) ; 09/29/09 ; (FILE 9002196, 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(3918,"DXS")
S I(0)="^ACRDOC(",J(0)=9002196
W ?0 D ^ACRFSSPO K DIP K:DN Y
W ?11 I $E($G(IOST),1,2)="C-" W @IOF K DIP K:DN Y
W ?22 I $E($G(IOST),1,2)="P-",$Y>1 W @IOF K DIP K:DN Y
W ?33 K ACRX I '$D(^ACROBL(D0,"APV")) S ACRX="" K DIP K:DN Y
W ?44 I '$D(ACRX),$D(^ACROBL(D0,"APV")),$P(^("APV"),U,8)'="A" S ACRX="" K DIP K:DN Y
W ?55 X DXS(1,9) K DIP K:DN Y
D N:$X>2 Q:'DN W ?2 X DXS(2,9) K DIP K:DN Y
D N:$X>0 Q:'DN W ?0 W "--------------------------------------------------------------------------------"
D N:$X>0 Q:'DN W ?0 I $E($G(IOST),1,2)="C-" W "ARMS REF: ",$P($G(^ACRDOC(D0,0)),U,6),"/",D0 K DIP K:DN Y
D N:$X>24 Q:'DN W ?24 W "ORDER FOR SUPPLIES OR SERVICES"
I 1 S DC=$S($D(DC)#2:DC+1,1:1) K DIP K:DN Y
D N:$X>66 Q:'DN W ?66 W "|PAGE OF PAGES"
D N:$X>0 Q:'DN W ?0 W "IMPORTANT: MARK ALL PACKAGES & PAPERS WITH CONTRACT &/OR ORDER NO."
D N:$X>66 Q:'DN W ?66 W "|"
W ?69 S X=$S($D(DC)#2:DC,1:"") K DIP K:DN Y W X
D N:$X>73 Q:'DN W ?73 W "|"
W:$D(ACRPOPG) ?77,ACRPOPG K DIP K:DN Y
D N:$X>0 Q:'DN W ?0 W "--------------------------------------------------------------------------------"
D N:$X>0 Q:'DN W ?0 W "1. DATE OF ORDER"
D N:$X>19 Q:'DN W ?19 W "|2. CONTRACT NO."
D N:$X>39 Q:'DN W ?39 W "|3. ORDER NO."
D N:$X>59 Q:'DN W ?59 W "|4. REQUISITION/REF #"
S X=$G(^ACRDOC(D0,"PO")) D N:$X>3 Q:'DN W ?3 S Y=$P(X,U,1) D DT
D N:$X>19 Q:'DN W ?19 W "|"
D N:$X>23 Q:'DN W ?23,$E($P(X,U,2),1,15)
D N:$X>39 Q:'DN W ?39 W "|"
S X=$G(^ACRDOC(D0,0)) D N:$X>43 Q:'DN W ?43,$E($P(X,U,2),1,15)
D N:$X>59 Q:'DN W ?59 W "|"
D N:$X>63 Q:'DN W ?63,$E($P(X,U,1),1,17)
D N:$X>19 Q:'DN W ?19 W "| DHHS NO. "
W $$EXPDN^ACRFUTL(D0) K DIP K:DN Y
D N:$X>59 Q:'DN W ?59 W "|"
D REQOFF^ACRFRRPT K DIP K:DN Y
D N:$X>0 Q:'DN W ?0 W "--------------------------------------------------------------------------------"
D N:$X>0 Q:'DN W ?0 W "5. ISSUING OFFICE:"
D N:$X>39 Q:'DN W ?39 W "|6. SHIP TO:"
D N:$X>3 Q:'DN W ?3 W "USPHS INDIAN HEALTH SERVICE"
D N:$X>39 Q:'DN W ?39 W "| USPHS INDIAN HEALTH SERVICE"
S X=$G(^ACRDOC(D0,"POIO")) D N:$X>3 Q:'DN W ?3 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>39 Q:'DN W ?39 W "|"
S X=$G(^ACRDOC(D0,"POST")) D N:$X>43 Q:'DN W ?43 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>3 Q:'DN W ?3 X DXS(3,9.2) S X=$P(DIP(101),U,1) S D0=I(0,0) K DIP K:DN Y W X
D N:$X>39 Q:'DN W ?39 W "|"
D N:$X>43 Q:'DN W ?43 X DXS(4,9.2) S X=$P(DIP(101),U,1) S D0=I(0,0) K DIP K:DN Y W X
D N:$X>3 Q:'DN W ?3 X DXS(5,9.2) S X=$P(DIP(101),U,2) S D0=I(0,0) K DIP K:DN Y W X
D N:$X>39 Q:'DN W ?39 W "|"
D N:$X>43 Q:'DN W ?43 X DXS(6,9.2) S X=$P(DIP(101),U,2) S D0=I(0,0) K DIP K:DN Y W X
D N:$X>3 Q:'DN W ?3 X DXS(7,9.2) S X=$P(DIP(101),U,3) S D0=I(0,0) K DIP K:DN Y W X
W ", "
X DXS(8,9.3) S X=$P(DIP(201),U,2) S D0=I(0,0) K DIP K:DN Y W X
W " "
X DXS(9,9.2) S X=$P(DIP(101),U,5) S D0=I(0,0) K DIP K:DN Y W X
D N:$X>39 Q:'DN W ?39 W "|"
D N:$X>43 Q:'DN W ?43 X DXS(10,9.2) S X=$P(DIP(101),U,3) S D0=I(0,0) K DIP K:DN Y W X
W ", "
X DXS(11,9.3) S X=$P(DIP(201),U,2) S D0=I(0,0) K DIP K:DN Y W X
W " "
X DXS(12,9.2) S X=$P(DIP(101),U,5) S D0=I(0,0) K DIP K:DN Y W X
S X=$G(^ACRDOC(D0,"PA")) D N:$X>3 Q:'DN W ?3 S Y=$P(X,U,1) S Y=$S(Y="":Y,$D(^ACRPA(Y,0))#2:$P(^(0),U),1:Y) S Y=$S(Y="":Y,$D(^VA(200,Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,20)
W ?25 W "("
X DXS(13,9.2) S X=$P(DIP(101),U,6) S D0=I(0,0) K DIP K:DN Y W X
W ")"
D N:$X>39 Q:'DN W ?39 W "|"
D N:$X>43 Q:'DN W ?43 W "PHONE:"
W ?51 X DXS(14,9.2) S X=$P(DIP(101),U,6) S D0=I(0,0) K DIP K:DN Y W X
W ?62 W:$E($G(ACREIN))=2 ?67,"(",ACREIN,")" K DIP K:DN Y
D N:$X>0 Q:'DN W ?0 W "--------------------------------------------------------------------------------"
D N:$X>0 Q:'DN W ?0 W "7. TO: CONTRACTOR"
W ?19 W:$E($G(ACREIN))=1 ?$X+2,ACREIN K DIP K:DN Y
D N:$X>44 Q:'DN W ?44 W "|8. TYPE OF ORDER"
S X=$G(^ACRDOC(D0,"PO")) D N:$X>3 Q:'DN W ?3 S Y=$P(X,U,5) S Y=$S(Y="":Y,$D(^AUTTVNDR(Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,30)
D N:$X>44 Q:'DN W ?44 W "|"
D N:$X>48 Q:'DN W ?48 S Y=$P(X,U,6) W:Y]"" $S($D(DXS(28,Y)):DXS(28,Y),1:Y)
D N:$X>3 Q:'DN W ?3 X DXS(15,9.2) S X=$P(DIP(101),U,1) S D0=I(0,0) K DIP K:DN Y W X
D N:$X>44 Q:'DN W ?44 W "| REFERENCE:"
D N:$X>3 Q:'DN W ?3 X DXS(16,9.2) S X=$P(DIP(101),U,10) S D0=I(0,0) K DIP K:DN Y W X
D N:$X>44 Q:'DN W ?44 W "|"
S X=$G(^ACRDOC(D0,"POIO")) D N:$X>48 Q:'DN W ?48,$E($P(X,U,7),1,30)
D N:$X>3 Q:'DN W ?3 X DXS(17,9.2) S X=$P(DIP(101),U,2) S D0=I(0,0) K DIP K:DN Y W X
W ", "
X DXS(18,9) K DIP K:DN Y W X
W " "
X DXS(19,9.2) S X=$P(DIP(101),U,4) S D0=I(0,0) K DIP K:DN Y W X
D N:$X>44 Q:'DN W ?44 W "| AUTHORITY:"
S X=$G(^ACRDOC(D0,"PO")) W ?60 S Y=$P(X,U,22) W:Y]"" $S($D(DXS(29,Y)):DXS(29,Y),1:Y)
D N:$X>3 Q:'DN W ?3 W "PHONE:"
W ?11 X DXS(20,9.2) S X=$P(DIP(101),U,9) S D0=I(0,0) K DIP K:DN Y W X
I $P($G(^AUTTVNDR(+$P($G(^ACRDOC(D0,"PO")),U,5),19)),U)]"" W " (EFT)" K DIP K:DN Y
D N:$X>34 Q:'DN W ?34 W "CUSTOMER ACCT NO.:"
S X=$G(^ACRDOC(D0,"PO")) W ?54,$E($P(X,U,23),1,20)
D PAUSE^ACRFWARN K DIP K:DN Y
D ^ACRFPSS K DIP K:DN Y
D N:$X>0 Q:'DN W ?0 W "--------------------------------------------------------------------------------"
D N:$X>0 Q:'DN W ?0 W "12. FOB POINT"
D N:$X>19 Q:'DN W ?19 W "|14. GOV'T B/L NO."
D N:$X>39 Q:'DN W ?39 W "|15. DELIVER TO FOB"
D N:$X>59 Q:'DN W ?59 W "|16. DISCOUNT TERMS"
S X=$G(^ACRDOC(D0,"PO")) D N:$X>4 Q:'DN W ?4 S Y=$P(X,U,9) W:Y]"" $S($D(DXS(30,Y)):DXS(30,Y),1:Y)
D N:$X>19 Q:'DN W ?19 W "|"
D N:$X>24 Q:'DN W ?24,$E($P(X,U,10),1,10)
D N:$X>39 Q:'DN W ?39 W "| PT ON OR BEFORE|"
D N:$X>0 Q:'DN W ?0 W "---------------------------------------"
D N:$X>39 Q:'DN W ?39 W "|"
D N:$X>59 Q:'DN W ?59 W "|"
D N:$X>64 Q:'DN W ?64 S DIP(1)=$S($D(^ACRDOC(D0,"PO")):^("PO"),1:"") S X=$P(DIP(1),U,13),DIP(2)=$G(X) S X=1,DIP(3)=$G(X) S X=15,X=$E(DIP(2),DIP(3),X) K DIP K:DN Y W X
D N:$X>0 Q:'DN W ?0 W "13. PLACE INSPECT/ACCPT"
D N:$X>39 Q:'DN W ?39 W "|"
S X=$G(^ACRDOC(D0,"PO")) D N:$X>44 Q:'DN W ?44 S Y=$P(X,U,12) D DT
D N:$X>59 Q:'DN W ?59 W "|"
D N:$X>64 Q:'DN W ?64 S DIP(1)=$S($D(^ACRDOC(D0,"PO")):^("PO"),1:"") S X=$P(DIP(1),U,13),DIP(2)=$G(X) S X=16,DIP(3)=$G(X) S X=30,X=$E(DIP(2),DIP(3),X) K DIP K:DN Y W X
S X=$G(^ACRDOC(D0,"PO")) D N:$X>0 Q:'DN W ?0 S Y=$P(X,U,11) S Y=$S(Y="":Y,$D(^AUTTPRG(Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,30)
D N:$X>39 Q:'DN W ?39 W "|"
D N:$X>0 Q:'DN W ?0 W "--------------------------------------------------------------------------------"
G ^ACRPSS1
ACRPSS ; GENERATED FROM 'ACR ORDER FOR SUP/SER' PRINT TEMPLATE (#3918) ; 09/29/09 ; (FILE 9002196, 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(3918,"DXS")
+3 SET I(0)="^ACRDOC("
SET J(0)=9002196
+4 WRITE ?0
DO ^ACRFSSPO
KILL DIP
IF DN
KILL Y
+5 WRITE ?11
IF $EXTRACT($GET(IOST),1,2)="C-"
WRITE @IOF
KILL DIP
IF DN
KILL Y
+6 WRITE ?22
IF $EXTRACT($GET(IOST),1,2)="P-"
IF $Y>1
WRITE @IOF
KILL DIP
IF DN
KILL Y
+7 WRITE ?33
KILL ACRX
IF '$DATA(^ACROBL(D0,"APV"))
SET ACRX=""
KILL DIP
IF DN
KILL Y
+8 WRITE ?44
IF '$DATA(ACRX)
IF $DATA(^ACROBL(D0,"APV"))
IF $PIECE(^("APV"),U,8)'="A"
SET ACRX=""
KILL DIP
IF DN
KILL Y
+9 WRITE ?55
XECUTE DXS(1,9)
KILL DIP
IF DN
KILL Y
+10 IF $X>2
DO N
IF 'DN
QUIT
WRITE ?2
XECUTE DXS(2,9)
KILL DIP
IF DN
KILL Y
+11 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "--------------------------------------------------------------------------------"
+12 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
IF $EXTRACT($GET(IOST),1,2)="C-"
WRITE "ARMS REF: ",$PIECE($GET(^ACRDOC(D0,0)),U,6),"/",D0
KILL DIP
IF DN
KILL Y
+13 IF $X>24
DO N
IF 'DN
QUIT
WRITE ?24
WRITE "ORDER FOR SUPPLIES OR SERVICES"
+14 IF 1
SET DC=$SELECT($DATA(DC)#2:DC+1,1:1)
KILL DIP
IF DN
KILL Y
+15 IF $X>66
DO N
IF 'DN
QUIT
WRITE ?66
WRITE "|PAGE OF PAGES"
+16 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "IMPORTANT: MARK ALL PACKAGES & PAPERS WITH CONTRACT &/OR ORDER NO."
+17 IF $X>66
DO N
IF 'DN
QUIT
WRITE ?66
WRITE "|"
+18 WRITE ?69
SET X=$SELECT($DATA(DC)#2:DC,1:"")
KILL DIP
IF DN
KILL Y
WRITE X
+19 IF $X>73
DO N
IF 'DN
QUIT
WRITE ?73
WRITE "|"
+20 IF $DATA(ACRPOPG)
WRITE ?77,ACRPOPG
KILL DIP
IF DN
KILL Y
+21 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "--------------------------------------------------------------------------------"
+22 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "1. DATE OF ORDER"
+23 IF $X>19
DO N
IF 'DN
QUIT
WRITE ?19
WRITE "|2. CONTRACT NO."
+24 IF $X>39
DO N
IF 'DN
QUIT
WRITE ?39
WRITE "|3. ORDER NO."
+25 IF $X>59
DO N
IF 'DN
QUIT
WRITE ?59
WRITE "|4. REQUISITION/REF #"
+26 SET X=$GET(^ACRDOC(D0,"PO"))
IF $X>3
DO N
IF 'DN
QUIT
WRITE ?3
SET Y=$PIECE(X,U,1)
DO DT
+27 IF $X>19
DO N
IF 'DN
QUIT
WRITE ?19
WRITE "|"
+28 IF $X>23
DO N
IF 'DN
QUIT
WRITE ?23,$EXTRACT($PIECE(X,U,2),1,15)
+29 IF $X>39
DO N
IF 'DN
QUIT
WRITE ?39
WRITE "|"
+30 SET X=$GET(^ACRDOC(D0,0))
IF $X>43
DO N
IF 'DN
QUIT
WRITE ?43,$EXTRACT($PIECE(X,U,2),1,15)
+31 IF $X>59
DO N
IF 'DN
QUIT
WRITE ?59
WRITE "|"
+32 IF $X>63
DO N
IF 'DN
QUIT
WRITE ?63,$EXTRACT($PIECE(X,U,1),1,17)
+33 IF $X>19
DO N
IF 'DN
QUIT
WRITE ?19
WRITE "| DHHS NO. "
+34 WRITE $$EXPDN^ACRFUTL(D0)
KILL DIP
IF DN
KILL Y
+35 IF $X>59
DO N
IF 'DN
QUIT
WRITE ?59
WRITE "|"
+36 DO REQOFF^ACRFRRPT
KILL DIP
IF DN
KILL Y
+37 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "--------------------------------------------------------------------------------"
+38 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "5. ISSUING OFFICE:"
+39 IF $X>39
DO N
IF 'DN
QUIT
WRITE ?39
WRITE "|6. SHIP TO:"
+40 IF $X>3
DO N
IF 'DN
QUIT
WRITE ?3
WRITE "USPHS INDIAN HEALTH SERVICE"
+41 IF $X>39
DO N
IF 'DN
QUIT
WRITE ?39
WRITE "| USPHS INDIAN HEALTH SERVICE"
+42 SET X=$GET(^ACRDOC(D0,"POIO"))
IF $X>3
DO N
IF 'DN
QUIT
WRITE ?3
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)
+43 IF $X>39
DO N
IF 'DN
QUIT
WRITE ?39
WRITE "|"
+44 SET X=$GET(^ACRDOC(D0,"POST"))
IF $X>43
DO N
IF 'DN
QUIT
WRITE ?43
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)
+45 IF $X>3
DO N
IF 'DN
QUIT
WRITE ?3
XECUTE DXS(3,9.2)
SET X=$PIECE(DIP(101),U,1)
SET D0=I(0,0)
KILL DIP
IF DN
KILL Y
WRITE X
+46 IF $X>39
DO N
IF 'DN
QUIT
WRITE ?39
WRITE "|"
+47 IF $X>43
DO N
IF 'DN
QUIT
WRITE ?43
XECUTE DXS(4,9.2)
SET X=$PIECE(DIP(101),U,1)
SET D0=I(0,0)
KILL DIP
IF DN
KILL Y
WRITE X
+48 IF $X>3
DO N
IF 'DN
QUIT
WRITE ?3
XECUTE DXS(5,9.2)
SET X=$PIECE(DIP(101),U,2)
SET D0=I(0,0)
KILL DIP
IF DN
KILL Y
WRITE X
+49 IF $X>39
DO N
IF 'DN
QUIT
WRITE ?39
WRITE "|"
+50 IF $X>43
DO N
IF 'DN
QUIT
WRITE ?43
XECUTE DXS(6,9.2)
SET X=$PIECE(DIP(101),U,2)
SET D0=I(0,0)
KILL DIP
IF DN
KILL Y
WRITE X
+51 IF $X>3
DO N
IF 'DN
QUIT
WRITE ?3
XECUTE DXS(7,9.2)
SET X=$PIECE(DIP(101),U,3)
SET D0=I(0,0)
KILL DIP
IF DN
KILL Y
WRITE X
+52 WRITE ", "
+53 XECUTE DXS(8,9.3)
SET X=$PIECE(DIP(201),U,2)
SET D0=I(0,0)
KILL DIP
IF DN
KILL Y
WRITE X
+54 WRITE " "
+55 XECUTE DXS(9,9.2)
SET X=$PIECE(DIP(101),U,5)
SET D0=I(0,0)
KILL DIP
IF DN
KILL Y
WRITE X
+56 IF $X>39
DO N
IF 'DN
QUIT
WRITE ?39
WRITE "|"
+57 IF $X>43
DO N
IF 'DN
QUIT
WRITE ?43
XECUTE DXS(10,9.2)
SET X=$PIECE(DIP(101),U,3)
SET D0=I(0,0)
KILL DIP
IF DN
KILL Y
WRITE X
+58 WRITE ", "
+59 XECUTE DXS(11,9.3)
SET X=$PIECE(DIP(201),U,2)
SET D0=I(0,0)
KILL DIP
IF DN
KILL Y
WRITE X
+60 WRITE " "
+61 XECUTE DXS(12,9.2)
SET X=$PIECE(DIP(101),U,5)
SET D0=I(0,0)
KILL DIP
IF DN
KILL Y
WRITE X
+62 SET X=$GET(^ACRDOC(D0,"PA"))
IF $X>3
DO N
IF 'DN
QUIT
WRITE ?3
SET Y=$PIECE(X,U,1)
SET Y=$SELECT(Y="":Y,$DATA(^ACRPA(Y,0))#2:$PIECE(^(0),U),1:Y)
SET Y=$SELECT(Y="":Y,$DATA(^VA(200,Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,20)
+63 WRITE ?25
WRITE "("
+64 XECUTE DXS(13,9.2)
SET X=$PIECE(DIP(101),U,6)
SET D0=I(0,0)
KILL DIP
IF DN
KILL Y
WRITE X
+65 WRITE ")"
+66 IF $X>39
DO N
IF 'DN
QUIT
WRITE ?39
WRITE "|"
+67 IF $X>43
DO N
IF 'DN
QUIT
WRITE ?43
WRITE "PHONE:"
+68 WRITE ?51
XECUTE DXS(14,9.2)
SET X=$PIECE(DIP(101),U,6)
SET D0=I(0,0)
KILL DIP
IF DN
KILL Y
WRITE X
+69 WRITE ?62
IF $EXTRACT($GET(ACREIN))=2
WRITE ?67,"(",ACREIN,")"
KILL DIP
IF DN
KILL Y
+70 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "--------------------------------------------------------------------------------"
+71 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "7. TO: CONTRACTOR"
+72 WRITE ?19
IF $EXTRACT($GET(ACREIN))=1
WRITE ?$X+2,ACREIN
KILL DIP
IF DN
KILL Y
+73 IF $X>44
DO N
IF 'DN
QUIT
WRITE ?44
WRITE "|8. TYPE OF ORDER"
+74 SET X=$GET(^ACRDOC(D0,"PO"))
IF $X>3
DO N
IF 'DN
QUIT
WRITE ?3
SET Y=$PIECE(X,U,5)
SET Y=$SELECT(Y="":Y,$DATA(^AUTTVNDR(Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,30)
+75 IF $X>44
DO N
IF 'DN
QUIT
WRITE ?44
WRITE "|"
+76 IF $X>48
DO N
IF 'DN
QUIT
WRITE ?48
SET Y=$PIECE(X,U,6)
IF Y]""
WRITE $SELECT($DATA(DXS(28,Y)):DXS(28,Y),1:Y)
+77 IF $X>3
DO N
IF 'DN
QUIT
WRITE ?3
XECUTE DXS(15,9.2)
SET X=$PIECE(DIP(101),U,1)
SET D0=I(0,0)
KILL DIP
IF DN
KILL Y
WRITE X
+78 IF $X>44
DO N
IF 'DN
QUIT
WRITE ?44
WRITE "| REFERENCE:"
+79 IF $X>3
DO N
IF 'DN
QUIT
WRITE ?3
XECUTE DXS(16,9.2)
SET X=$PIECE(DIP(101),U,10)
SET D0=I(0,0)
KILL DIP
IF DN
KILL Y
WRITE X
+80 IF $X>44
DO N
IF 'DN
QUIT
WRITE ?44
WRITE "|"
+81 SET X=$GET(^ACRDOC(D0,"POIO"))
IF $X>48
DO N
IF 'DN
QUIT
WRITE ?48,$EXTRACT($PIECE(X,U,7),1,30)
+82 IF $X>3
DO N
IF 'DN
QUIT
WRITE ?3
XECUTE DXS(17,9.2)
SET X=$PIECE(DIP(101),U,2)
SET D0=I(0,0)
KILL DIP
IF DN
KILL Y
WRITE X
+83 WRITE ", "
+84 XECUTE DXS(18,9)
KILL DIP
IF DN
KILL Y
WRITE X
+85 WRITE " "
+86 XECUTE DXS(19,9.2)
SET X=$PIECE(DIP(101),U,4)
SET D0=I(0,0)
KILL DIP
IF DN
KILL Y
WRITE X
+87 IF $X>44
DO N
IF 'DN
QUIT
WRITE ?44
WRITE "| AUTHORITY:"
+88 SET X=$GET(^ACRDOC(D0,"PO"))
WRITE ?60
SET Y=$PIECE(X,U,22)
IF Y]""
WRITE $SELECT($DATA(DXS(29,Y)):DXS(29,Y),1:Y)
+89 IF $X>3
DO N
IF 'DN
QUIT
WRITE ?3
WRITE "PHONE:"
+90 WRITE ?11
XECUTE DXS(20,9.2)
SET X=$PIECE(DIP(101),U,9)
SET D0=I(0,0)
KILL DIP
IF DN
KILL Y
WRITE X
+91 IF $PIECE($GET(^AUTTVNDR(+$PIECE($GET(^ACRDOC(D0,"PO")),U,5),19)),U)]""
WRITE " (EFT)"
KILL DIP
IF DN
KILL Y
+92 IF $X>34
DO N
IF 'DN
QUIT
WRITE ?34
WRITE "CUSTOMER ACCT NO.:"
+93 SET X=$GET(^ACRDOC(D0,"PO"))
WRITE ?54,$EXTRACT($PIECE(X,U,23),1,20)
+94 DO PAUSE^ACRFWARN
KILL DIP
IF DN
KILL Y
+95 DO ^ACRFPSS
KILL DIP
IF DN
KILL Y
+96 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "--------------------------------------------------------------------------------"
+97 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "12. FOB POINT"
+98 IF $X>19
DO N
IF 'DN
QUIT
WRITE ?19
WRITE "|14. GOV'T B/L NO."
+99 IF $X>39
DO N
IF 'DN
QUIT
WRITE ?39
WRITE "|15. DELIVER TO FOB"
+100 IF $X>59
DO N
IF 'DN
QUIT
WRITE ?59
WRITE "|16. DISCOUNT TERMS"
+101 SET X=$GET(^ACRDOC(D0,"PO"))
IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
SET Y=$PIECE(X,U,9)
IF Y]""
WRITE $SELECT($DATA(DXS(30,Y)):DXS(30,Y),1:Y)
+102 IF $X>19
DO N
IF 'DN
QUIT
WRITE ?19
WRITE "|"
+103 IF $X>24
DO N
IF 'DN
QUIT
WRITE ?24,$EXTRACT($PIECE(X,U,10),1,10)
+104 IF $X>39
DO N
IF 'DN
QUIT
WRITE ?39
WRITE "| PT ON OR BEFORE|"
+105 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "---------------------------------------"
+106 IF $X>39
DO N
IF 'DN
QUIT
WRITE ?39
WRITE "|"
+107 IF $X>59
DO N
IF 'DN
QUIT
WRITE ?59
WRITE "|"
+108 IF $X>64
DO N
IF 'DN
QUIT
WRITE ?64
SET DIP(1)=$SELECT($DATA(^ACRDOC(D0,"PO")):^("PO"),1:"")
SET X=$PIECE(DIP(1),U,13)
SET DIP(2)=$GET(X)
SET X=1
SET DIP(3)=$GET(X)
SET X=15
SET X=$EXTRACT(DIP(2),DIP(3),X)
KILL DIP
IF DN
KILL Y
WRITE X
+109 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "13. PLACE INSPECT/ACCPT"
+110 IF $X>39
DO N
IF 'DN
QUIT
WRITE ?39
WRITE "|"
+111 SET X=$GET(^ACRDOC(D0,"PO"))
IF $X>44
DO N
IF 'DN
QUIT
WRITE ?44
SET Y=$PIECE(X,U,12)
DO DT
+112 IF $X>59
DO N
IF 'DN
QUIT
WRITE ?59
WRITE "|"
+113 IF $X>64
DO N
IF 'DN
QUIT
WRITE ?64
SET DIP(1)=$SELECT($DATA(^ACRDOC(D0,"PO")):^("PO"),1:"")
SET X=$PIECE(DIP(1),U,13)
SET DIP(2)=$GET(X)
SET X=16
SET DIP(3)=$GET(X)
SET X=30
SET X=$EXTRACT(DIP(2),DIP(3),X)
KILL DIP
IF DN
KILL Y
WRITE X
+114 SET X=$GET(^ACRDOC(D0,"PO"))
IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
SET Y=$PIECE(X,U,11)
SET Y=$SELECT(Y="":Y,$DATA(^AUTTPRG(Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,30)
+115 IF $X>39
DO N
IF 'DN
QUIT
WRITE ?39
WRITE "|"
+116 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "--------------------------------------------------------------------------------"
+117 GOTO ^ACRPSS1