ENWOME2 ;(WASH ISC)/SAB-WORK ORDER MULTIPLE ENTRY, PRINT NEW WO ;1.6.96
;;7.0;ENGINEERING;**35**;Aug 17, 1993
; Input Variables
; ENPRT("DEV") = selected output device
; ENWODA = ien of master work order (File #6920)
; ^TMP($J,equip ien) selected equipment array
; = work order ien^work order number
QUETSK ; queue task to print new work orders
S ZTRTN="DQ^ENWOME2",ZTDESC="Multiple Work Order Hardcopy Print"
S ZTDTH=$H,ZTIO=ENPRT("DEV")
S ZTSAVE("ENWODA")="",ZTSAVE("^TMP($J,")=""
D ^%ZTLOAD,HOME^%ZIS K ZTSK
Q
DQ ; queued entry point
; get software setting for barcodes
S ENBARCD=0
S ENI=$O(^ENG(6910.2,"B","PRINT BAR CODES ON W.O.",0))
I ENI,$P($G(^ENG(6920.2,ENI,0)),U,2)="Y" S ENBARCD=1
; get software setting for long/short format wo
S ENI=$O(^ENG(6910.2,"B","AUTO PRINT NEW W.O.",0))
S ENPRT("AUTO")=$S(ENI:$P($G(^ENG(6910.2,ENI,0)),U,2),1:"")
; print work orders in appropriate format
S DA=ENWODA N IOINHI,IOINLOW D ZIS^ENUTL
I ENPRT("AUTO")="S" D FDAT4^ENWOP3
I ENPRT("AUTO")'="S" D PRT1^ENWOD W @$G(IOF)
S ENI=0 F S ENI=$O(^TMP($J,ENI)) Q:'ENI S ENDA=$P($G(^(ENI)),U) D:ENDA
. S DA=ENDA N IOINHI,IOINLOW D ZIS^ENUTL
. I ENPRT("AUTO")="S" D FDAT4^ENWOP3
. I ENPRT("AUTO")'="S" D PRT1^ENWOD W @$G(IOF)
I $D(ZTQUEUED) S ZTREQ="@" K ^TMP($J)
K DA,ENBARCD,ENDA,ENI,ENPRT,ENSHKEY,ENWODA
Q
;ENWOME2
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HENWOME2 1379 printed Dec 13, 2024@01:56:20 Page 2
ENWOME2 ;(WASH ISC)/SAB-WORK ORDER MULTIPLE ENTRY, PRINT NEW WO ;1.6.96
+1 ;;7.0;ENGINEERING;**35**;Aug 17, 1993
+2 ; Input Variables
+3 ; ENPRT("DEV") = selected output device
+4 ; ENWODA = ien of master work order (File #6920)
+5 ; ^TMP($J,equip ien) selected equipment array
+6 ; = work order ien^work order number
QUETSK ; queue task to print new work orders
+1 SET ZTRTN="DQ^ENWOME2"
SET ZTDESC="Multiple Work Order Hardcopy Print"
+2 SET ZTDTH=$HOROLOG
SET ZTIO=ENPRT("DEV")
+3 SET ZTSAVE("ENWODA")=""
SET ZTSAVE("^TMP($J,")=""
+4 DO ^%ZTLOAD
DO HOME^%ZIS
KILL ZTSK
+5 QUIT
DQ ; queued entry point
+1 ; get software setting for barcodes
+2 SET ENBARCD=0
+3 SET ENI=$ORDER(^ENG(6910.2,"B","PRINT BAR CODES ON W.O.",0))
+4 IF ENI
IF $PIECE($GET(^ENG(6920.2,ENI,0)),U,2)="Y"
SET ENBARCD=1
+5 ; get software setting for long/short format wo
+6 SET ENI=$ORDER(^ENG(6910.2,"B","AUTO PRINT NEW W.O.",0))
+7 SET ENPRT("AUTO")=$SELECT(ENI:$PIECE($GET(^ENG(6910.2,ENI,0)),U,2),1:"")
+8 ; print work orders in appropriate format
+9 SET DA=ENWODA
NEW IOINHI,IOINLOW
DO ZIS^ENUTL
+10 IF ENPRT("AUTO")="S"
DO FDAT4^ENWOP3
+11 IF ENPRT("AUTO")'="S"
DO PRT1^ENWOD
WRITE @$GET(IOF)
+12 SET ENI=0
FOR
SET ENI=$ORDER(^TMP($JOB,ENI))
if 'ENI
QUIT
SET ENDA=$PIECE($GET(^(ENI)),U)
if ENDA
Begin DoDot:1
+13 SET DA=ENDA
NEW IOINHI,IOINLOW
DO ZIS^ENUTL
+14 IF ENPRT("AUTO")="S"
DO FDAT4^ENWOP3
+15 IF ENPRT("AUTO")'="S"
DO PRT1^ENWOD
WRITE @$GET(IOF)
End DoDot:1
+16 IF $DATA(ZTQUEUED)
SET ZTREQ="@"
KILL ^TMP($JOB)
+17 KILL DA,ENBARCD,ENDA,ENI,ENPRT,ENSHKEY,ENWODA
+18 QUIT
+19 ;ENWOME2