ACRPSS1 ; GENERATED FROM 'ACR ORDER FOR SUP/SER' PRINT TEMPLATE (#3918) ; 09/29/09 ; (continued)
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)
D N:$X>0 Q:'DN W ?0 I $D(ACRPOL),ACRPOL>5 W "17. SCHEDULE (SEE SCHEDULE OF ITEM(S) 1" K DIP K:DN Y
I $D(ACRPOL),ACRPOL>5 W:ACRJ>1 " THROUGH ",ACRJ K DIP K:DN Y
I $D(ACRPOL),ACRPOL>5 W " ON CONTINUATION SHEET)" K DIP K:DN Y
W ?11 I $D(ACRPOL),ACRPOL<6 D PAUSE^ACRFWARN K DIP K:DN Y
D N:$X>19 Q:'DN W ?19 I $D(ACRPOL),ACRPOL<6 W "17. SCHEDULE OF SUPPLIES/SERVICES" K DIP K:DN Y
D N:$X>0 Q:'DN W ?0 X DXS(21,9) K DIP K:DN Y
I $D(ACRPOL),ACRPOL<6 S ACRDOCDA=D0,ACRDOC=$P(^ACRDOC(D0,0),U,2) D DISPLAY^ACRFSS12 K DIP K:DN Y
D N:$X>0 Q:'DN W ?0 W "--------------------------------------------------------------------------------"
D N:$X>0 Q:'DN W ?0 W "18. SHIPPING POINT"
D N:$X>19 Q:'DN W ?19 W "|19. GROSS SHIP WT"
D N:$X>39 Q:'DN W ?39 W "|20. INVOICE NO."
D N:$X>59 Q:'DN W ?59 W "|17(H) TOTAL"
S X=$G(^ACRDOC(D0,"PO")) D T Q:'DN W ?2,$E($P(X,U,14),1,20)
D N:$X>19 Q:'DN W ?19 W "|"
D N:$X>24 Q:'DN W ?24,$E($P(X,U,15),1,10)
D N:$X>39 Q:'DN W ?39 W "|"
D N:$X>44 Q:'DN W ?44,$E($P(X,U,16),1,15)
D N:$X>59 Q:'DN W ?59 W "|"
D N:$X>0 Q:'DN W ?0 W "--------------------------------------------------------------------------------"
D N:$X>0 Q:'DN W ?0 W "21. MAIL INVOICE TO:"
D N:$X>59 Q:'DN W ?59 W "|17(I) GRAND TOTAL"
S X=$G(^ACRDOC(D0,"POMI")) D N:$X>4 Q:'DN W ?4 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>59 Q:'DN W ?59 W "|"
D N:$X>4 Q:'DN W ?4 X DXS(22,9.2) S X=$P(DIP(101),U,1) S D0=I(0,0) K DIP K:DN Y W X
D N:$X>59 Q:'DN W ?59 W "|"
W ?62 W:$D(ACRPOTOT) $J($FN(ACRPOTOT,"P,",2),17) K DIP K:DN Y
D N:$X>4 Q:'DN W ?4 X DXS(23,9.2) S X=$P(DIP(101),U,2) S D0=I(0,0) K DIP K:DN Y W X
D N:$X>59 Q:'DN W ?59 W "|"
D N:$X>4 Q:'DN W ?4 X DXS(24,9.2) S X=$P(DIP(101),U,3) S D0=I(0,0) K DIP K:DN Y W X
W ", "
X DXS(25,9.3) S X=$P(DIP(201),U,2) S D0=I(0,0) K DIP K:DN Y W X
W " "
X DXS(26,9.2) S X=$P(DIP(101),U,5) S D0=I(0,0) K DIP K:DN Y W X
D N:$X>59 Q:'DN W ?59 W "|"
D N:$X>4 Q:'DN W ?4 W "PHONE:"
W ?12 X DXS(27,9.2) S X=$P(DIP(101),U,6) S D0=I(0,0) K DIP K:DN Y W X
D N:$X>59 Q:'DN W ?59 W "|"
W ?62 D PAUSE^ACRFWARN K DIP K:DN Y
D T Q:'DN W ?2 D ^ACRFPAPV K DIP K:DN Y
W ?13 I $D(ACRPOL),ACRPOL>5 W @IOF N DXS,DIP,DN D ^ACRPSH K DIP K:DN Y
I $D(ACRPOL),ACRPOL>5 S ACRDOCDA=D0,ACRDOC=$P(^ACRDOC(D0,0),U,2) D DISPLAY^ACRFSS12 K DIP K:DN Y
W ?24 D PBOIL^ACRFBOIL K DIP K:DN Y
K Y
Q
HEAD ;
W !,"--------------------------------------------------------------------------------",!!
ACRPSS1 ; GENERATED FROM 'ACR ORDER FOR SUP/SER' PRINT TEMPLATE (#3918) ; 09/29/09 ; (continued)
+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 $X>0
DO N
IF 'DN
QUIT
WRITE ?0
IF $DATA(ACRPOL)
IF ACRPOL>5
WRITE "17. SCHEDULE (SEE SCHEDULE OF ITEM(S) 1"
KILL DIP
IF DN
KILL Y
+3 IF $DATA(ACRPOL)
IF ACRPOL>5
IF ACRJ>1
WRITE " THROUGH ",ACRJ
KILL DIP
IF DN
KILL Y
+4 IF $DATA(ACRPOL)
IF ACRPOL>5
WRITE " ON CONTINUATION SHEET)"
KILL DIP
IF DN
KILL Y
+5 WRITE ?11
IF $DATA(ACRPOL)
IF ACRPOL<6
DO PAUSE^ACRFWARN
KILL DIP
IF DN
KILL Y
+6 IF $X>19
DO N
IF 'DN
QUIT
WRITE ?19
IF $DATA(ACRPOL)
IF ACRPOL<6
WRITE "17. SCHEDULE OF SUPPLIES/SERVICES"
KILL DIP
IF DN
KILL Y
+7 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
XECUTE DXS(21,9)
KILL DIP
IF DN
KILL Y
+8 IF $DATA(ACRPOL)
IF ACRPOL<6
SET ACRDOCDA=D0
SET ACRDOC=$PIECE(^ACRDOC(D0,0),U,2)
DO DISPLAY^ACRFSS12
KILL DIP
IF DN
KILL Y
+9 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "--------------------------------------------------------------------------------"
+10 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "18. SHIPPING POINT"
+11 IF $X>19
DO N
IF 'DN
QUIT
WRITE ?19
WRITE "|19. GROSS SHIP WT"
+12 IF $X>39
DO N
IF 'DN
QUIT
WRITE ?39
WRITE "|20. INVOICE NO."
+13 IF $X>59
DO N
IF 'DN
QUIT
WRITE ?59
WRITE "|17(H) TOTAL"
+14 SET X=$GET(^ACRDOC(D0,"PO"))
DO T
IF 'DN
QUIT
WRITE ?2,$EXTRACT($PIECE(X,U,14),1,20)
+15 IF $X>19
DO N
IF 'DN
QUIT
WRITE ?19
WRITE "|"
+16 IF $X>24
DO N
IF 'DN
QUIT
WRITE ?24,$EXTRACT($PIECE(X,U,15),1,10)
+17 IF $X>39
DO N
IF 'DN
QUIT
WRITE ?39
WRITE "|"
+18 IF $X>44
DO N
IF 'DN
QUIT
WRITE ?44,$EXTRACT($PIECE(X,U,16),1,15)
+19 IF $X>59
DO N
IF 'DN
QUIT
WRITE ?59
WRITE "|"
+20 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "--------------------------------------------------------------------------------"
+21 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "21. MAIL INVOICE TO:"
+22 IF $X>59
DO N
IF 'DN
QUIT
WRITE ?59
WRITE "|17(I) GRAND TOTAL"
+23 SET X=$GET(^ACRDOC(D0,"POMI"))
IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
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)
+24 IF $X>59
DO N
IF 'DN
QUIT
WRITE ?59
WRITE "|"
+25 IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
XECUTE DXS(22,9.2)
SET X=$PIECE(DIP(101),U,1)
SET D0=I(0,0)
KILL DIP
IF DN
KILL Y
WRITE X
+26 IF $X>59
DO N
IF 'DN
QUIT
WRITE ?59
WRITE "|"
+27 WRITE ?62
IF $DATA(ACRPOTOT)
WRITE $JUSTIFY($FNUMBER(ACRPOTOT,"P,",2),17)
KILL DIP
IF DN
KILL Y
+28 IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
XECUTE DXS(23,9.2)
SET X=$PIECE(DIP(101),U,2)
SET D0=I(0,0)
KILL DIP
IF DN
KILL Y
WRITE X
+29 IF $X>59
DO N
IF 'DN
QUIT
WRITE ?59
WRITE "|"
+30 IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
XECUTE DXS(24,9.2)
SET X=$PIECE(DIP(101),U,3)
SET D0=I(0,0)
KILL DIP
IF DN
KILL Y
WRITE X
+31 WRITE ", "
+32 XECUTE DXS(25,9.3)
SET X=$PIECE(DIP(201),U,2)
SET D0=I(0,0)
KILL DIP
IF DN
KILL Y
WRITE X
+33 WRITE " "
+34 XECUTE DXS(26,9.2)
SET X=$PIECE(DIP(101),U,5)
SET D0=I(0,0)
KILL DIP
IF DN
KILL Y
WRITE X
+35 IF $X>59
DO N
IF 'DN
QUIT
WRITE ?59
WRITE "|"
+36 IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "PHONE:"
+37 WRITE ?12
XECUTE DXS(27,9.2)
SET X=$PIECE(DIP(101),U,6)
SET D0=I(0,0)
KILL DIP
IF DN
KILL Y
WRITE X
+38 IF $X>59
DO N
IF 'DN
QUIT
WRITE ?59
WRITE "|"
+39 WRITE ?62
DO PAUSE^ACRFWARN
KILL DIP
IF DN
KILL Y
+40 DO T
IF 'DN
QUIT
WRITE ?2
DO ^ACRFPAPV
KILL DIP
IF DN
KILL Y
+41 WRITE ?13
IF $DATA(ACRPOL)
IF ACRPOL>5
WRITE @IOF
NEW DXS,DIP,DN
DO ^ACRPSH
KILL DIP
IF DN
KILL Y
+42 IF $DATA(ACRPOL)
IF ACRPOL>5
SET ACRDOCDA=D0
SET ACRDOC=$PIECE(^ACRDOC(D0,0),U,2)
DO DISPLAY^ACRFSS12
KILL DIP
IF DN
KILL Y
+43 WRITE ?24
DO PBOIL^ACRFBOIL
KILL DIP
IF DN
KILL Y
+44 KILL Y
+45 QUIT
HEAD ;
+1 WRITE !,"--------------------------------------------------------------------------------",!!