PRT.LINE: *
          LD.GET LDID

          PN = LD(1)
          IF NOT(NUM(PN)) THEN RETURN

          GET.ALL.PRD BR,PN,QSIGN,GROUP
          * release 8 start
          * GET.PRDD.BR STK.BR,PN
          * release 8 end
          STAT = PRD(3)

          * release 8 start
          PRD.BR.GET.VAL STK.BR,PN,25,SERIAL.TRACKING
          IF SERIAL.TRACKING ='I' OR SERIAL.TRACKING ='A' OR SERIAL.TRACKING='D' THEN

          * IF PRD(74)<1,STK.BR>='I' OR PRD(74)<1,STK.BR>='A' OR PRD(74)<1,STK.BR>='D' THEN
          * release 8 end
             SERIAL = YES
          END
          BEGIN CASE
          CASE STAT=1;    STAT = 'S'
          CASE STAT=2;    STAT = 'N'
          CASE STAT=3;    STAT = 'M'
          CASE STAT=4;    STAT = 'D'
          CASE STAT=5;    STAT = 'R'
          CASE STAT=6;    STAT = 'C'
          END CASE
          OE.DESC.GET DESC,'',"POE Printing"
          KEYW = PRD(4)<1,1>
          CODE = FIELD(KEYW," ",2)
*----Kits
          IF LD(31)#'' AND PRD(86)<1,2> = '1' THEN
             KCMPS = LD(31)
             KQTYS = LD(30)
             GET.KIT.COMPS KCMPS,KQTYS,35,DESC
          END

    *     RETURN
*-------------------------------------------------------------------------*
PRT.PN:   *
          TQTY = (SUM(LD(5)<1,GEN>) + SUM(LD(6)<1,GEN>)) * QSIGN
          IF TQTY   = 0 THEN GOTO NO.PTR
          TQTYS = ADDS(LD(5)<1,GEN>,LD(6)<1,GEN>)
          TQ.CNT = DCOUNT(TQTYS,SVM)
          FOR TQ = 1 TO TQ.CNT
          TQNT   = TQTYS<1,1,TQ>
          SHP.TYP.LOC = LD(7)<1,GEN,TQ>
          LOCA    = FIELD(FIELD(SHP.TYP.LOC,'~',2),'^',1)
          IF LOCA='' THEN
             PRD.LOCATION.GET PRI.LOC,PN,STK.BR
             LOCA = PRI.LOC
          END
          TAG = FIELD(LOCA,'^',2)
          IF TAG # '' THEN LOCA = FIELD(TAG,".",1)
          GOSUB PRT.PO
          NEXT TQ

          BEGIN CASE
          CASE PRT.OPT[1,1]='S' AND STAT # 'S'; GOTO SKIPPRT
          CASE PRT.OPT[1,1]='N' AND STAT = 'S'; GOTO SKIPPRT
          END CASE
      * Print All tag Qtys first
          TYP.LOCS = LD(7)<1,GEN>
          LOC.CT   = DCOUNT(TYP.LOCS,SVM)
          TAG.FLAG = YES
          FOR LOC  = 1 TO LOC.CT
          TYPE = FIELD(TYP.LOCS<1,1,LOC>,'~',1)
          IF TYPE = 'T' THEN
             TAG     = TYP.LOCS<1,1,LOC>
             ORN     = FIELD(TAG,'^',2)
             OID     = FIELD(ORN,'.',1)
             LDID    = FIELD(ORN,'.',2)+0
             GID     = ''
             TYPE    = ''
             TORN    = ''
             CTAG    = '-T'
             SHP.QTY = LD(6)<1,GEN,LOC>
             SBR     = STK.BR
             GOSUB PRT.QTY

             TQTY   -= SHP.QTY
          END
          NEXT LOC
          TAG.FLAG = NO

      * Print Stock committments until P/O Qty is used up
          GOSUB SET.PRIS

          ID.CT = DCOUNT(IDS,SVM)
          FOR J =1 TO ID.CT
          IF TQTY <= 0 AND CMTD THEN EXIT

          SHP.QTY = -QTYS<1,1,J>+0
          ID      = IDS<1,1,J>
          SBR     = SBRS<1,1,J>

          IF SHP.QTY > 0 AND FIELD(ID,'~',6)#'D' THEN
             OID  = FIELD(ID,'~',3)
             GID  = FIELD(ID,'~',5)
             TYPE = FIELD(ID,'~',6)
             TORN = FIELD(ID,'~',7)
             LDID = ''
             CTAG = ''

*** Don't print the tagged qtys if they ask not to.
             IF TYPE = 'T' AND NOT(PRT.TGS) THEN GOTO NEXTJ

             GOSUB PRT.QTY
             TQTY -= SHP.QTY
          END
NEXTJ:    NEXT J

          GOSUB PRT.XFER
          PRINT STR('-',80)
          LINE.CT -= 1

SKIPPRT:  GOSUB SUBT.ONE
          PRINT

NO.PTR:   RETURN


__________________________




PRT.PO:   *
          GOSUB SUBT.ONE
          PRINT CODE        "L#9":
          PRINT TQNT        "R#7":
          PRINT ' |     |'  "L#9":
          PRINT DESC<1,1>   "L#46":
          PRINT STAT        "L#1":' |':
          PRINT LOCA       "L#6"
          DESC = DELETE(DESC,1,1)
          GOSUB PRT.XDESC
          RETURN