.script
; 
; dtepo.wsc - Down To Earth Purchase Order scripts
;======================================================================= 
; Copyright 1999 by TAH Software Systems (TAH), Oklahoma City, Oklahoma  
;
;	TAH provides this software under a license and may only be	 
;	used in accordance with the terms and conditions of such	 
;	license and with the inclusion of the above Copyright notice.	 
;======================================================================= 
;
.column pomaintmenu, "Maintenance", select(m)
.entry m_name, "Name/Address"
.entry m_item, "Items"
.entry m_scod, "Codes", sub, select(d)
.entry m_comp, "Company", select(c)
.end
; 
;=============================================================== 
.column potranmenu, "Transaction", select(t)
.entry t_oent, "Enter orders"
.entry t_prnt, "Print purchase orders"
.entry t_wsht, "Print receivings worksheets"
.entry t_recl, "Print receivings label pages"
.line
.entry t_por1, "One step receivings", sub
.entry t_por2, "Two step receivings", sub
.end
; 
.column t_por1, "t_por1"
.entry t_sent, "Enter receivings"
.entry t_prof, "Proof receivings"
.entry t_lbls, "Print price labels"
.entry t_rept, "Daily receivings report"
.entry t_back, "List back-ordered receivings"
.entry t_post, "Post receivings"
.end
; 
.column t_por2, "t_por2"
.entry t_rdok, "Receive at dock"
.entry t_prof, "Proof receivings"
.entry t_slbl, "Print stock labels"
.entry t_stok, "Stock inventory"
.entry t_rept, "Daily receivings report"
.entry t_atdk, "Items at dock report"
.entry t_back, "List back-ordered receivings"
.entry t_post, "Post receivings"
.end
;
;=============================================================== 
.column poreptmenu, "Reports/Inquiry", select(r)
.entry i_inqy, "Inquiry", sub, select(i)
.line
.entry r_scod, "Codes", sub
.entry r_orde, "Orders entered"
.entry r_vopn, "Open PO by vendor"
.entry r_iopn, "Open PO by item"
.entry r_oage, "Aged Open PO items"
.entry r_hist, "History"
.entry r_cost, "Receivings cost"
.entry r_vper, "Vendor performance"
.line
.entry r_ranl, "Receivings item cost"
.entry r_rinv, "Receivings invoice cost"
.entry r_rfrt, "Receivings freight cost"
.entry r_rnyi, "Receivings not invoiced"
.entry r_pcrp, "Custom reports"
.entry r_pque, "Queued reports"
.end
;
;=============================================================== 
.column pomiscmenu, "Miscellaneous", select(z)
.entry z_clos, "Close order"
.entry z_open, "Re-open order"
.line
.entry z_puri, "Purge orders"
.entry z_purh, "Purge history"
.entry z_purr, "Purge receivings"
.line
.entry z_resi, "Reset onorder quantities"
.end
;
;=============================================================== 
.input pohedrsrch, 2, 40
.placement 8, 10
.paint _

.field phorno, d6, pos(1,1), prompt("Order no"), fpos(1,14), -
 help(POORDRNO), format("ZZZZZX")

.field phvend, d8, pos(2,1), prompt("Vendor"), fpos(2,14), -
 help(POVENDNO), format("XXXXXXXX"), user('#Drill/Req#'), -
 drill_method("NAMAST_FIND")

.end
;
;=============================================================== 
.input i_lpohedr, 1, 32
.placement 10, 8
.title " Purchase Orders "
.field l_head, a1, -
 user(" Order   VendID    Date")
.field l_order, d6, pos(1,1)
.field l_vendid, d8, pos(1,9)
.field l_orddate, d8, pos(1,19), date
.structure rec1, <2>,l_order,<1>,l_vendid,<154>,l_orddate
.set set1, rec1, l_order,l_vendid,l_orddate
.end
;
;=============================================================== 
.listclass l_pohist, items(8), headers(1), load_method("POLL_POHIST")
.end
;
.input i_lpohist, 1, 76
.placement 10, 3
.title " Purchase Order History "
.field l_head, a1, -
 user(" Order Lin Item-ID/Description                         Quantity    Price Uom")
.field l_order, d6, pos(1,1)
.field l_line, d3, pos(1,8)
.field l_item, a45, pos(1,12)
.field l_oqty, d6, pos(1,57), format('ZZZZZZ-')
.field l_amnt, d9.3, pos(1,64), format('ZZZZZZ.XXX-')
.field l_uomc, a3, pos(1,74)
.structure rec1, <6>,l_order,l_line,l_item,l_oqty,l_amnt,l_uomc
.set set1, rec1, l_order,l_line,l_item,l_oqty,l_amnt,l_uomc
.end
;
;=============================================================== 
.listclass l_poitem, items(8), headers(1), load_method("POLL_POITEM")
.end
;
.input i_lpoitem, 1, 80
.placement 12, 15
.title " P/O Line Items "
.field l_head, a1, -
 user(" Order Lin  Loc  Byr    VendID    Ordered     Required    Ord-Qty  Rcvd-Qty")
.field l_order, d6, pos(1,1)
.field l_line, d3, pos(1,8)
.field l_locn, a3, pos(1,13)
.field l_buyr, a3, pos(1,18)
.field l_vend, d8, pos(1,24), format('XXXXXXXX')
.field l_odate, d8, date, pos(1,33)
.field l_rdate, d8, date, pos(1,45)
.field l_oqty, d9.3, pos(1,58), format('ZZZZZZ.XXX-')
.field l_rqty, d9.3, pos(1,66), format('ZZZZZZ.XXX-')

.structure rec1, l_order,l_line,l_locn,l_buyr,l_vend,l_odate,l_rdate, -
	l_oqty,l_rqty
.set set1, rec1, l_order,l_line,l_locn,l_buyr,l_vend,l_odate,l_rdate, -
	l_oqty,l_rqty
.end
;
;=============================================================== 
.listclass l_poline, items(8), headers(1), load_method("POLL_POLINE")
.end
;
.input i_lpoline, 1, 104
.display_area 1, 1, 1, 105
.placement 10, 5
.title " Line Items "
.field l_head, a1, -
 user("Seq Item-ID                  Description                       Ordered    At-Doc")
.field l_heado, a1, -
 user("k     Posted   Unit-Cost")
.field l_line, d3, pos(1,1)
.field l_item, a24, pos(1,5)
.field l_desc, a30, pos(1,30)
.field l_orqt, d9.3, pos(1,61), format('ZZZZZZ.XXX-')
.field l_atdk, d9.3, pos(1,72), format('ZZZZZZ.XXX-')
.field l_post, d9.3, pos(1,83), format('ZZZZZZ.XXX-')
.field l_cost, d9.3, pos(1,94), format('ZZZZZZ.XXX-')
.structure rec1, <8>,l_line,<1>,l_item,<3>,l_desc,<30>,l_orqt,l_atdk,-
	<18>,l_post,l_cost
.set set1, rec1, l_line,l_item,l_desc,l_orqt,l_atdk,l_post,l_cost
.end
;
;=============================================================== 
.listclass l_pomail, items(8), headers(1), load_method("POLL_POMAIL")
.end
;
.input i_lpomail, 1, 75
.placement 10, 4
.title " Mail To Locations "
.field l_head, a1, -
 user(" MailTo   Ship Address                   City                 ST Zip-Code")
.field l_mail, d8, pos(1,1), format('XXXXXXXX')
.field l_shto, a5, pos(1,10)
.field l_add1, a25, pos(1,14)
.field l_city, a20, pos(1,40)
.field l_stat, a2, pos(1,61)
.field l_zip, a10, pos(1,64), format('@@@@@-@@@@')
.structure rec1, <2>,l_mail,l_shto,<25>,l_add1,<25>,l_city,l_stat,l_zip
.set set1, rec1, l_mail,l_shto,l_add1,l_city,l_stat,l_zip
.end
;
;=============================================================== 
.listclass l_poordr, items(8), headers(1), load_method("POLL_POORDR")
.end
;
.input i_lpoordr, 1, 68
.placement 10, 25
.title " Purchase Order Status "
.field l_head, a1, -
 user(" Order Vendor                          Ordered Required P R S L C")
.field l_order, d6, pos(1,1)
.field l_vend, a30, pos(1,8)
.field l_odate, d8, date(short), pos(1,39)
.field l_rdate, d8, date(short), pos(1,48)
.field l_flag1, a1, pos(1,57)
.field l_flag2, a1, pos(1,59)
.field l_flag3, a1, pos(1,61)
.field l_flag4, a1, pos(1,63)
.field l_flag5, a1, pos(1,65)
.structure rec1, l_order,l_vend,l_odate,l_rdate,l_flag1,l_flag2, -
	l_flag3,l_flag4,l_flag5
.set set1, rec1, l_order,l_vend,l_odate,l_rdate,l_flag1,l_flag2, -
	l_flag3,l_flag4,l_flag5
.end
;
;=============================================================== 
.listclass l_porecv, items(8), headers(1), load_method("POLL_PORECV")
.end
;
.input i_lporecv, 1, 78
.placement 10, 1
.title " Receivings "
.field l_head, a1, -
 user("Seq Item-ID                  Description                  Quantity  Unit-Cost")
.field l_line, d3, pos(1,1)
.field l_item, a24, pos(1,5)
.field l_desc, a26, pos(1,30)
.field l_orqt, d9.3, pos(1,57), format('ZZZZZZ.XXX-')
.field l_cost, d9.3, pos(1,68), format('ZZZZZZ.XXX-')
.structure rec1, <8>,l_line,<5>,l_item,<3>,l_desc,<12>,l_orqt,<27>,l_cost
.set set1, rec1, l_line,l_item,l_desc,l_orqt,l_cost
.end
;
;=============================================================== 
.input i_lposlno, 1, 58
.placement 10, 20
.title " Serial/Lot "
.field l_head, a1, -
 user("Serial/Lot No        Quantity")
.field l_lslno, a20, pos(1,1)
.field l_lqty, d6, pos(1,22), format("ZZZ,ZZX")

.structure rec1, <11>,l_lslno,<11>,l_lqty
.set set1, rec1, l_lslno,l_lqty
.end
;
;===============================================================
.input po2600, 15, 98
.placement 3, 5
.title ' Purchase Order Inquiry ', highlight
.line Line1, 94, pos(7,1), horizontal
.paint _

.field phorno, d6, pos(1,1), prompt("Order no"), fpos(1,10), -
 format("ZZZZZX")

.field phvend, d8, pos(2,1), prompt("Vendor"), fpos(2,10), -
 format('XXXXXXXX')

.field phmail, d8, pos(2,20), prompt("Mail to"), fpos(2,28), -
 format('XXXXXXXX')
.field phname, a30, fpos(3,5)
.field phadd1, a30, fpos(4,5)
.field phadd2, a30, fpos(5,5)
.field phcity, a20, fpos(6,5)
.field phstat, a2, fpos(6,26)
.field phzip, a10, fpos(6,29)

.field phship, d8, pos(2,40), prompt("Ship to"), fpos(2,48), -
 format('XXXXXXXX')
.field phshto, a30, fpos(3,43)
.field phsha1, a30, fpos(4,43)
.field phsha2, a30, fpos(5,43)
.field phshct, a20, fpos(6,43)
.field phshst, a2, fpos(6,64)
.field phshzp, a10, fpos(6,68)

.field phphone, a14, pos(2,75), prompt("Telephone no"), fpos(3,77), -
 format("(@@@)@@@-@@@@/@@@@")
 
.field phfax, a10, pos(4,75), prompt("Fax no"), fpos(5,77), -
 format("(@@@)@@@-@@@@")

.field phdate, d8, pos(8,1), prompt("PO date"), fpos(8,12), -
 date

.field phrqdt, d8, pos(9,1), prompt("Required by"), fpos(9,12), -
 date

.field phstus, a1, pos(10,1), prompt("Status"), fpos(10,13)

.field phfob, a1, pos(11,1), prompt("FOB"), fpos(11,13)

.field phcoll, a1, pos(12,1), prompt("Coll/Prepd"), fpos(12,13)

.field phcom1, a40, pos(14,1), prompt("Comments"), fpos(14,13)
.field phcom2, a40, fpos(15,13)

.field phsvia, a3, pos(8,27), prompt("Ship via"), fpos(8,37)
.field phsvia_descr, a25, fpos(8,41), paint(" ")

.field phlocn, a3, pos(9,27), prompt("Location"), fpos(9,37)
.field phlocn_descr, a25, fpos(9,41), paint(" ")

.field phbuyr, a3, pos(10,27), prompt("Buyer"), fpos(10,37)
.field phbuyr_descr, a25, fpos(10,41), paint(" ")

.field phterm, a3, pos(11,27), prompt("Terms"), fpos(11,37)
.field phterm_descr, a25, fpos(10,41), paint(" ")

.field phconf, a20, pos(12,27), prompt("Confirm"), fpos(12,37)

.field photyp, a1, pos(8,68), prompt("Type"), fpos(8,75)

.field phflg1, a1, pos(9,68), prompt("P:"), fpos(9,70)
.field phflg2, a1, pos(9,73), prompt("R:"), fpos(9,75)
.field phflg3, a1, pos(9,78), prompt("S:"), fpos(9,80)
.field phflg4, a1, pos(9,83), prompt("L:"), fpos(9,85)

.field phcust, d8, pos(10,68), prompt("Cust ID"), fpos(10,84)
.field phord, d6, pos(11,68), prompt("Order"), fpos(11,86)

.field phtota, d9.2, pos(12,68), prompt("Total"), fpos(12,80), -
 format("Z,ZZZ,ZZZ.XX")

.field phtotr, d9.2, pos(13,68), prompt("Received"), fpos(13,80), -
 format("Z,ZZZ,ZZZ.XX")

.structure rec1, <2>,phorno,photyp,phvend,phmail,phname,phadd1,phadd2,-
        phcity,phstat,phzip,phphone,phfax,phdate,phrqdt,phsvia,phbuyr,phterm, -
        phconf,phfob,phcoll,phlocn,phstus,phcom1,phcom2,phcust,phord,phship,phshto,phsha1, -
        phsha2,phshct,phshst,phshzp,phflg1,phflg2,phflg3,phflg4,phtota,phtotr
.set set_chg, rec1, phorno
.set set_show, rec1, phorno,phvend,phmail,phvend,phname,phadd1,phadd2,phcity,-
	phstat,phzip,phship,phshto,phsha1,phsha2,phshct,-
	phshst,phshzp,phdate,phrqdt,phsvia,phlocn,phbuyr,phstus,-
        photyp,phflg1,phflg2,phflg3,phflg4,phtota,phtotr,phphone,phfax,phterm, -
        phconf,phfob,phcoll,phcom1,phcom2,phcust,phord
.button LIN, text("Lines"), select("L")
.button API, text("A/P invc"), select("A")
.button_set bottom, end
.end
;
;=============================================================== 
.input po2600l, 19, 75
.placement 8, 25
.title ' Line Items ', highlight
.paint _

.field plline, d3, pos(1,1), prompt("Line No"), fpos(1,16), -
 format("XXX")

.field plltyp, a1, pos(2,1), prompt("Type"), fpos(2,16)

.field pllocn, a3, pos(2,40), prompt("Location"), fpos(2,49)

.field plitem, a24, pos(3,1), prompt("Item ID"), fpos(3,16)

.field pldesc, a30, fpos(3,40)

.field plvnid, a12, pos(4,1), prompt("Vendor item"), fpos(4,16)

.field plbuom, a3, pos(5,1), prompt("UOM"), fpos(5,16)
.field buomd, a25, fpos(5,20), paint(" ")
.field plsl, a1, pos(6,1), prompt("Ser/Lot/Kit"), fpos(6,16)
.field plstat, a1, pos(6,40), prompt("Status"), fpos(6,48)

.field plorqt, d9.3, pos(7,1), prompt("Qty ordered"), fpos(7,16), -
 format("ZZZ,ZZZ.XXX-")
.field pltamt, d9.2, fpos(7,37), -
 format("$Z,ZZZ,ZZZ.XX-"), paint(" ")

.field platdk, d9.3, pos(8,1), prompt("Qty at dock"), fpos(8,16), -
 format("ZZZ,ZZZ.XXX-")
.field pldamt, d9.2, fpos(8,37), -
 format("$Z,ZZZ,ZZZ.XX-"), paint(" ")

.field placpt, d9.3, pos(9,1), prompt("Qty accepted"), fpos(9,16), -
 format("ZZZ,ZZZ.XXX-")
.field plaamt, d9.2, fpos(9,37), -
 format("$Z,ZZZ,ZZZ.XX-"), paint(" ")

.field plrjct, d9.3, pos(10,1), prompt("Qty rejected"), fpos(10,16), -
 format("ZZZ,ZZZ.XXX-")
.field plramt, d9.2, fpos(10,37), -
 format("$Z,ZZZ,ZZZ.XX-"), paint(" ")

.field plpost, d9.3, pos(11,1), prompt("Qty posted"), fpos(11,16), -
 format("ZZZ,ZZZ.XXX-")
.field plpamt, d9.2, fpos(11,37), -
 format("$Z,ZZZ,ZZZ.XX-"), paint(" ")

.field plcost, d9.3, pos(12,1), prompt("Unit cost"), fpos(12,16), -
 format("ZZZ,ZZZ.XXX-")

.field pldisc, d4.2, pos(13,1), prompt("Disc pct"), fpos(13,16), -
 format("ZZ.XX-")

.field plrqdt, d8, pos(14,1), prompt("Date required"), fpos(14,16), -
 date

.field plrcdt, d8, pos(14,40), prompt("Date received"), fpos(14,54), -
 date
.field remark1, a60, pos(15,1), prompt("Remarks:"), fpos(15,12)
.field remark2, a60, fpos(16,12)

.field refrnc1, a60, pos(17,1), prompt("Reference:"), fpos(17,12)
.field refrnc2, a60, fpos(18,12)

.structure rec1, <8>,plline,plltyp,plitem,pllocn,pldesc,plvnid,<12>,plbuom,-
	<3>,plorqt,platdk,placpt,plrjct,plpost,plcost,pldisc,<9>,-
        plrqdt,plrcdt,plsl,plstat,<21>,remark1,<1>,remark2,<241>,refrnc1,<1>,refrnc2
.set set_show, rec1, plline,plltyp,pllocn,plitem,pldesc,plvnid,plbuom,plorqt,-
        platdk,placpt,plrjct,plpost,plcost,pldisc,plrqdt,plrcdt,plsl,plstat, -
        remark1,remark2,refrnc1,refrnc2
.end
;
;=============================================================== 
.input po2700, 2, 28
.placement 6, 20
.title ' P O Status Inquiry ', highlight
.paint _
 
.field begord, d6, pos(1,1), prompt("Beginning order no"), fpos(1,22), -
 help(POINBORD), default(0)
 
.structure rec1, begord
.set set1, rec1, begord
.end
;
;=============== Sales Order entry (totals) ================== 
.input po4000d, 4, 22
.placement 3, 90
.title " Order Totals ", highlight
.paint " "

.field ordtot, d9.2, pos(1,1), prompt("Dollars"), fpos(1,9), -
 format("Z,ZZZ,ZZZ.XX-")

.field ordwgt, d9.2, pos(2,1), prompt("Weight"), fpos(2,9), -
 format("Z,ZZZ,ZZZ.XX-")

.field ordcub, d5, pos(3,1), prompt("Cubes"), fpos(3,15), -
 format("ZZ,ZZX-")

.field ordunt, d6.0, pos(4,1), prompt("Units"), fpos(4,14), -
 format("ZZZ,ZZX-")

.end
;
;=============== Purchase Order entry extended description ================== 
.input po4000e, 4, 60
.placement 12, 10
.title ' Description ', highlight
.paint ' '

.field descr, 4a60, fpos(1,1), -
 help(PODESCR)

.structure rec1, <326>,descr
.set set1, rec1, descr
.button i_ok, text("OK"), select(O)
.button po_indesc, text("IN Descr"), select(I)
.button_set bottom, end
.end
;
;=============== Purchase Order entry (line Reference) ==================
.input po4000f, 4, 74
.placement 15, 1
.title ' Reference ', highlight
.paint _

.field plref1, a60, pos(1,1), prompt("Reference 1"), fpos(1,14), -
 help(POREMARK), change_method("ANYFLD_CHANGE")

.field plr1p, a1, pos(2,1), prompt("Locate 1"), fpos(2,14), -
 help(POREMPRT), select(1,3,,"Purchase order","Worksheet","Both","Nowhere")

.field plref2, a60, pos(3,1), prompt("Reference 2"), fpos(3,14), -
 help(POREMARK)

.field plr2p, a1, pos(4,1), prompt("Locate 2"), fpos(4,14), -
 help(POREMPRT), select(1,3,,"Purchase order","Worksheet","Both","Nowhere")

.structure rec1, <566>,plr1p,plref1,plr2p,plref2
.set set1, rec1, plref1,plr1p,plref2,plr2p
.end
;=============================================================== 
.input po4000h, 18, 95
.placement 2, 1
.title ' Order Header ', highlight
.line Line1, 16, pos(1,47), vertical
.line Line2, 47, pos(8,47), horizontal
.line Line3, 93, pos(16,1), horizontal
.line Line4, 47, pos(8,1), horizontal
.paint _
 
.field phorno, d6, pos(1,1), prompt("Order no"), fpos(1,15), -
 help(POORDRNO), change_method("ANYFLD_CHANGE"), required, format("ZZZZZX")
 
.field phvend, d8, pos(2,1), prompt("Vendor"), fpos(2,8), -
 help(POINQVENDOR), user('#Drill/Req/V#'), drill_method("NAMAST_FIND"), -
 change_method("NAMAST_CHANGE"), hyperlink_method("NAMAST_HYPER")
 
.field phmail, d8, pos(2,25), prompt("MailTo"), fpos(2,32), -
 help(POMAILID), user('#Drill/Opt/M#'), drill_method("NAMAST_FIND"), -
 change_method("NAMAST_CHANGE"), hyperlink_method("NAMAST_HYPER")
 
.field phvend_descr, a30, fpos(3,3)
.field phvend_addr1, a30, fpos(4,3)
.field phvend_addr2, a30, fpos(5,3)
.field phvend_city, a20, fpos(6,3)
.field phvend_state, a2, fpos(6,24)
.field phvend_zip, a10, fpos(6,27)
 
.field phcfrm, a20, pos(7,1), prompt("Confirm with"), fpos(7,15), -
 help(POCONFRM)
 
.field phship, d8, pos(9,1), prompt("ShipTo"), fpos(9,15), -
 help(POSHIPTONO), user('#Drill/Opt#'), drill_method("NAMAST_FIND"), -
 change_method("NAMAST_CHANGE"), hyperlink_method("NAMAST_HYPER"), negative
 
.field phshto, a30, fpos(10,3), help(POSHPNAM)
.field phsha1, a30, fpos(11,3), help(POSHPAD1)
.field phsha2, a30, fpos(12,3), help(POSHPAD2)
.field phshct, a20, fpos(13,3), help(POSHPCTY)
.field phshst, a2, fpos(13,24), help(POSHPSTE), uc
.field phshzp, a10, fpos(13,27), help(POSHPZIP)
 
.field phphon, a14, pos(14,1), prompt("Telephone"), fpos(14,15), -
 help(POCUSTPHONE), copy, format("(@@@)@@@-@@@@/@@@@")
 
.field phfax, a10, pos(15,1), prompt("Fax"), fpos(15,15), -
 help(POMLFAX), copy, format("(@@@)@@@-@@@@")
 
.field photyp, a1, pos(1,48), prompt("Order type"), fpos(1,62), -
 help(POORDTYP), change_method("ANYFLD_CHANGE"), -
 select(1,3,,"Order","Hold")
 
.field phdate, d8, pos(2,48), prompt("Order date"), fpos(2,62), -
 help(POORDATE), date(today)
 
.field phrqdt, d8, pos(3,48), prompt("Required by"), fpos(3,62), -
 help(POORDRQD), date(today)
 
.field phcust, d8, pos(4,48), prompt("Customer ID"), fpos(4,62), -
 help(POCUSTNO), user('#Drill/Opt/C#'), -
 drill_method("NAMAST_FIND"), change_method("NAMAST_CHANGE")
 
.field phcorn, d6, pos(5,48), prompt("Cust order"), fpos(5,62), -
 help(POCUSTORDER), format("ZZZZZZ")
 
.field phstus, a1, pos(6,48), prompt("Order status"), fpos(6,62), -
 help(POORDSTATUS), select(1,3,,"Open","Partial","Closed")
 
.field phlocn, a3, pos(9,48), prompt("Location"), fpos(9,62), -
 help(POORDLOC), copy, user('#Drill/Req/L#'), drill_method("SMCODE_FIND"), -
 change_method("SMCODE_CHANGE"), hyperlink_method("SMCODE_HYPER")
.field phlocn_descr, a25, fpos(9,69), paint(" ")
 
.field phterm, a3, pos(10,48), prompt("Terms"), fpos(10,62), -
 help(POORDTRM), copy, user('#Drill/Req/Y#'), drill_method("SMCODE_FIND"), -
 change_method("SMCODE_CHANGE"), hyperlink_method("SMCODE_HYPER")
.field phterm_descr, a25, fpos(10,69), paint(" ")
 
.field phbuyr, a3, pos(11,48), prompt("Buyer"), fpos(11,62), -
 help(POORDBUY), copy, user('#Drill/Req/B#'), drill_method("SMCODE_FIND"), -
 change_method("SMCODE_CHANGE"), hyperlink_method("SMCODE_HYPER")
.field phbuyr_descr, a25, fpos(11,69), paint(" ")
 
.field phsvia, a3, pos(12,48), prompt("Ship via"), fpos(12,62), -
 help(POORDVIA), copy, user('#Drill/Req/V#'), drill_method("SMCODE_FIND"), -
 change_method("SMCODE_CHANGE"), hyperlink_method("SMCODE_HYPER")
.field phsvia_descr, a25, fpos(12,69), paint(" ")
 
.field phfobc, a1, pos(13,48), prompt("FOB"), fpos(13,62), -
 help(POORFOBC), copy, select(1,3,,"Orig","Dest")
 
.field phclpd, a1, pos(14,48), prompt("Col/PPD"), fpos(14,62), -
 help(POORDCOLPPD), copy, select(1,3,,"Prepaid","Collect")
 
.field phcmt1, 2a40, pos(17,1), prompt("Comments"), fpos(17,10), -
 help(POORDCMT)
 
.structure rec1, <2>,phorno,photyp,phvend,phmail,phvend_descr,phvend_addr1,-
	phvend_addr2,phvend_city,phvend_state,phvend_zip,-
	phphon,phfax,phdate,phrqdt,phsvia,phbuyr,phterm,-
	phcfrm,phfobc,phclpd,phlocn,phstus,phcmt1,phcust,phcorn,-
	phship,phshto,phsha1,phsha2,phshct,phshst,phshzp
.set set_add, rec1, phorno,phvend,phmail,phcfrm,phship,phshto,phsha1,-
	phsha2,phshct,phshst,phshzp,phphon,phfax,photyp,phdate,phrqdt,phcust,-
	phcorn,phstus,phlocn,phterm,phbuyr,phsvia,phfobc,phclpd,phcmt1
.set set_chg, rec1, phvend,phmail,phcfrm,phship,phshto,phsha1,phsha2,-
	phshct,phshst,phshzp,phphon,phfax,photyp,phdate,phrqdt,phcust,-
	phcorn,phstus,phlocn,phterm,phbuyr,phsvia,phfobc,phclpd,phcmt1
.set set_show, rec1, phorno,phvend,phmail,phship,phshto,phsha1,phsha2,phshct,-
	phshst,phshzp,phphon,phfax,phcfrm,photyp,phdate,phrqdt,phcust,-
	phcorn,phstus,phlocn,phterm,phbuyr,phsvia,phfobc,phclpd,phcmt1
.set set_shto, rec1, phship,phshto,phsha1,phsha2,phshct,phshst,phshzp
.button detl, text("Entries"), select("E")
.button prnt, text("Print"), select("P")
.button copy, text("Copy"), select("C")
.button_set bottom, end
.end
;
;====================================================================== 
.listclass l_po4000l, items(12), headers(1), load_method("poll_po4000")
.end
;
.input i_po4000l, 1, 72
.placement 7, 1
.title " Purchase Order Lines "
.field l_no, d3, pos(1,1)
.field l_deleted, a1, pos(1,4)
.field l_item, a24, pos(1,5)
.field l_descr, a30, pos(1,30)
.field l_ordqty, d9.3, pos(1,61), format("ZZZ,ZZZ.XXX-")
.structure rec1, l_no,l_item,l_descr,l_ordqty,l_deleted
.set set1, rec1, l_no,l_deleted,l_item,l_descr,l_ordqty
.end
;
;====================================================================== 
.input po4000m, 11, 78
.placement 11, 23
.title ' Line Item Detail', highlight
.paint _
 
.field plltyp, a1, pos(1,1), prompt("Line type"), fpos(1,14), -
 help(POLINTYP), change_method("ANYFLD_CHANGE"), -
 select(1,3,,"I-stock item","N-non stock")
 
.field plitem, a24, pos(2,1), prompt("Item ID"), fpos(2,14), -
 help(POITEMID), user('#Drill/Req#'), drill_method("INITEM_FIND"), -
 change_method("INITEM_CHANGE"), hyperlink_method("INITEM_HYPER")
 
.field pllocn, a3, pos(3,1), prompt("Location"), fpos(3,14), -
 help(POLOCATION), user('#Drill/Req/L#'), drill_method("SMCODE_FIND"), -
 change_method("SMCODE_CHANGE"), hyperlink_method("SMCODE_HYPER")
.field pllocn_descr, a25, fpos(3,20), paint(" ")
 
.field pldesc, a30, pos(4,1), prompt("Description"), fpos(4,14), -
 help(PODESCRIP)
 
.field plorqt, d9.3, pos(5,1), prompt("Order qty"), fpos(5,14), -
 help(POQTYORD), default(1), change_method("ANYFLD_CHANGE"), -
 format("ZZZ,ZZZ.XXX-"), negative
 
.field plcost, d9.3, pos(6,1), prompt("Unit cost"), fpos(6,14), -
 help(POUCOST), copy, change_method("ANYFLD_CHANGE"), -
 format("ZZZ,ZZZ.XXX-"), negative
 
.field plbuom, a3, pos(7,1), prompt("UOM"), fpos(7,14), -
 help(POITEMUOM), copy, user('#Drill/Req/U#'), drill_method("SMCODE_FIND"), -
 change_method("SMCODE_CHANGE"), hyperlink_method("SMCODE_HYPER")
.field plbuom_descr, a25, fpos(7,20), paint(" ")
 
.field plcatg, a3, pos(8,1), prompt("Category"), fpos(8,14), -
 help(POCATEGORY), copy, user('#Drill/Req/C#'), drill_method("SMCODE_FIND"), -
 change_method("SMCODE_CHANGE"), hyperlink_method("SMCODE_HYPER")
.field plcatg_descr, a25, fpos(8,20), paint(" ")
 
.field plvnid, a24, pos(9,1), prompt("Vendor item"), fpos(9,14), -
 help(POVNITEM), copy, change_method("ANYFLD_CHANGE")
 
.field plrqdt, d8, pos(1,46), prompt("Date required"), fpos(1,62), -
 help(POREQDATE), copy, date
 
.field pldisc, d4.2, pos(2,46), prompt("Discount %"), fpos(2,62), -
 help(PODISCPCT), format("ZZ.XX-"), negative
 
.field plcube, d4.2, pos(3,46), prompt("Cubes"), fpos(3,62), -
 help(POCUBE), copy, format("ZZ.XX")
 
.field plwght, d6.2, pos(4,46), prompt("Weight"), fpos(4,62), -
 help(POWEIGHT), copy, format("ZZZZ.XX")
 
.field plupdt, a1, pos(5,46), prompt("Update IN cost"), fpos(5,62), -
 help(POUPDTCOST), selwnd(1,3,yesno)
 
.structure rec1, <11>,plltyp,plitem,pllocn,pldesc,plvnid,plbuom,plcatg,-
	plorqt,<36>,plcost,pldisc,<9>,plrqdt,<10>,plupdt,<6>,-
	plwght,plcube
.set set_ordr, rec1, plltyp,plitem,pllocn,pldesc,plorqt,plcost,plbuom,plcatg,-
	plvnid,plrqdt,pldisc,plcube,plwght,plupdt
.set set_show, rec1, plltyp,plitem,pllocn,pldesc,plorqt,plcost,plbuom,plcatg,-
	plvnid,plrqdt,pldisc,plcube,plwght,plupdt
.button i_ok, text("OK"), select(O)
.button abort, text("Cancel"), select(C)
.button po_remk, text("Remarks"), select("R")
.button po_refr, text("Reference"), select("f")
.button po_extd, text("Ext Desc"), select("E")
.button po_hist, text("History"), select("H")
.button po_rtot, text("Re-Total"), select("T")
.button pic, text("Picture"), select ("i")
.button_set bottom, end
.end
;
;
;=============== Purchase Order entry (line remarks) ================== 
.input po4000r, 4, 72
.placement 15, 1
.title ' Remarks ', highlight
.paint _

.field plrem1, a60, pos(1,1), prompt("Remarks 1"), fpos(1,12), -
 help(POREMARK), change_method("ANYFLD_CHANGE")

.field plr1p, a1, pos(2,1), prompt("Locate 1"), fpos(2,12), -
 help(POREMPRT), select(1,3,,"Purchase order","Worksheet","Both","Nowhere")

.field plrem2, a60, pos(3,1), prompt("Remarks 2"), fpos(3,12), -
 help(POREMARK)

.field plr2p, a1, pos(4,1), prompt("Locate 2"), fpos(4,12), -
 help(POREMPRT), select(1,3,,"Purchase order","Worksheet","Both","Nowhere")

.structure rec1, <204>,plr1p,plrem1,plr2p,plrem2
.set set1, rec1, plrem1,plr1p,plrem2,plr2p
.end
;
;===============================================================
;
.input po4000v, 2, 35
.placement 6, 18
.title ' Copy Order ', highlight

.field ordno, d6, pos(1,1), prompt("Order No"), fpos(1,14), -
 help(POINVOICENO)

.field type, a1, pos(2,1), prompt("Open/Posted"), fpos(2,14), -
 help(POCOPYTYPE), select(1,3,,"Open order","Posted order")

.structure rec1, ordno,type
.set set1, rec1, ordno,type
.end
;
;
;===============================================================
.input po4100, 7, 60
.placement 4, 13
.title ' Purchase Orders ', highlight
.line Line1, 54, pos(2,1), horizontal
.line Line2, 54, pos(5,1), horizontal
.paint _
 
.field option, a1, pos(1,1), prompt("Option"), fpos(1,20), -
 help(POPRTOPT), change_method("ANYFLD_CHANGE"), -
 select(1,3,,"One order","All")
 
.field order, d6, pos(3,1), prompt("Order no"), fpos(3,20), -
 help(POORDERNO), required, change_method("ANYFLD_CHANGE")
 
.field vendid, d8, pos(4,1), prompt("Vendor ID"), fpos(4,20), -
 change_method("NAMAST_CHANGE")
.field vendid_descr, a30, fpos(4,30)
 
.field begord, d6, pos(6,1), prompt("Beginning order no"), fpos(6,20), -
 help(POBEGORD), default(1), required
 
.field endord, d6, pos(7,1), prompt("Ending order no"), fpos(7,20), -
 help(POENDORD), default(999999), required
 
.structure rec1, option,order,begord,endord
.set set1, rec1, option,order,begord,endord
.end
;
;=============================================================== 
.input po4200, 6, 60
.placement 6, 13
.title ' Receivings Worksheets ', highlight
.line Line1, 54, pos(3,1), horizontal
.line Line2, 54, pos(5,1), horizontal
.paint _

.field order, d6, pos(1,1), prompt("Order number"), fpos(1,20), -
 help(PORWORDN), change_method("ANYFLD_CHANGE"), format ("ZZZZZX")

.field vend, d8, pos(2,1), prompt("Vendor ID"), fpos(2,20), -
 help(POVENDNO), user('#Drill/Req#'), -
 drill_method("NAMAST_FIND"), change_method("NAMAST_CHANGE") 
.field vend_descr, a30, fpos(2,29)

.field cutdat, d8, pos(4,1), prompt("Due date cut-off"), fpos(4,20), -
 help(POWKSHTDATE), date(today), change_method("ANYFLD_CHANGE")

.field correct, a1, pos(6,1), prompt("Correct"), fpos(6,20), - 
 help(UTYNNDEF), selwnd(0,3,yesno)

.structure rec1, order,cutdat,correct
.set set1, rec1, order,cutdat
.set set2, rec1, correct
.end
;
;=============================================================== 
.input po4210, 3, 60
.placement 4, 13
.title ' Receivings Label Sheets ', highlight
.paint _

.field all, a1, pos(1,1), prompt("Selection"), fpos(1,20), -
 help(POPGSELECT), select(1,3,,'All lines','Select line')

.field order, d6, pos(2,1), prompt("Order number"), fpos(2,20), -
 help(PORWORDN), break, format("ZZZZZX")

.field vend, d8, pos(3,1), prompt("Vendor ID"), fpos(3,20), -
 help(POVENDNO), user('#Drill/Req#'), -
 drill_method("NAMAST_FIND"), change_method("NAMAST_CHANGE") 
.field vend_descr, a30, fpos(3,29)

.structure rec1, order,all
.set set1, rec1, all,order
.end
;
;=============================================================== 
.input po4300, 13, 60
.placement 6, 25
.title ' Set PO Receivings (1-step) ', highlight
.line Line1, 59, pos(2,1), horizontal
.line Line2, 59, pos(7,1), horizontal
.paint _
 
.field scan, a10, pos(1,1), prompt("Scan data"), fpos(1,20), -
 help(POSCANDATA), change_method("ANYFLD_CHANGE")
 
.field podate, d8, pos(1,40), prompt("Date"), fpos(1,47), -
 help(PORECDATE), date(today)
 
.field phvend, d8, pos(3,1), prompt("Vendor"), fpos(3,8), format('XXXXXXXX')
.field phname, a30, fpos(3,21)
.field phadr1, a30, fpos(4,21)
.field phadr2, a30, fpos(5,21)
.field phcity, a20, fpos(6,21)
.field phstat, a2, fpos(6,42)
.field phzipc, a10, fpos(6,46)
 
.field item, a24, pos(8,1), prompt("Item ID"), fpos(8,20)
 
.field desc, a30, pos(9,1), prompt("Description"), fpos(9,20)
 
.field rcvd, d9.3, pos(10,1), prompt("Qty remaining"), fpos(10,20), -
 help(POQTYRCVD), copy, format("ZZZ,ZZZ.XXX-")
 
.field acpt, d9.3, pos(11,1), prompt("Qty accepted"), fpos(11,20), -
 help(POQTYACPT), copy, format("ZZZ,ZZZ.XXX-")
 
.field rjct, d9.3, pos(12,1), prompt("Qty rejected"), fpos(12,20), -
 help(POQTYRJCT), copy, format("ZZZ,ZZZ.XXX-")
 
.field abin, a8, pos(13,1), prompt("Bin"), fpos(13,20), -
 help(PORECABIN)

.structure rec1, scan,abin,rcvd,acpt,rjct
.structure rec2, podate
.structure rec8, phvend,phname,phadr1,phadr2,phcity,phstat,phzipc
.structure rec9, item,desc
.set set1, rec1, scan
.set set2, rec1, rcvd
.set set3, rec1, acpt,rjct,abin
.set set8, rec8, phvend,phname,phadr1,phadr2,phcity,phstat,phzipc
.set set9, rec9, item,desc
.set set99, rec2, podate
.end
;
;=============================================================== 
.listclass l_po4300k, items(12), headers(1), footers(1), -
 load_method("posl_po4300k")
.end
;
.input i_po4300k, 1, 35
.placement 7, 1
.title " Serial/Lot Nos "
.field l_no, d3, pos(1,1)
.field l_deleted, a1, pos(1,4)
.field l_snlt, a20, pos(1,6)
.field l_qty, d6, pos(1,28), format("ZZZ,ZZX")
.structure rec1, l_no,l_snlt,l_qty,l_deleted
.set set1, rec1, l_no,l_deleted,l_snlt,l_qty
.end
;
;=============== Purchase Order entry (kit serial/lot numbers) ===============
.input po4300k, 4, 40
.placement 11, 30
.title ' Serial/Lot Number ', highlight
.line Line1, 40, pos(2,1), horizontal
.paint " "

.field positem, a24, pos(1,1), prompt("Kit item"), fpos(1,16)

.field possnlot, a20, pos(3,1), prompt("Serial/Lot no"), fpos(3,16), -
 help(POSERLOTNO), user('#Drill/Req#'), -
 drill_method("INSNLT_FIND"), change_method("ANYFLD_CHANGE")

.field posqty, d9.3, pos(4,1), prompt("Quantity"), fpos(4,16), -
 format("ZZZ,ZZZ.XXX-")

.structure rec1, <39>,possnlot,posqty
.set set1, rec1, possnlot
.set set2, rec1, possnlot,posqty
.end
;
;=============================================================== 
.listclass l_po4300s, items(12), headers(1), footers(1), -
 load_method("posl_po4300")
.end
;
.input i_po4300s, 1, 35
.placement 7, 1
.title " Serial/Lot Nos "
.field l_no, d3, pos(1,1)
.field l_deleted, a1, pos(1,4)
.field l_snlt, a20, pos(1,6)
.field l_qty, d6, pos(1,28), format("ZZZ,ZZX")
.structure rec1, l_no,l_snlt,l_qty,l_deleted
.set set1, rec1, l_no,l_deleted,l_snlt,l_qty
.end
;
;=============== Sales Order entry (serial/lot numbers) ================== 
.input po4300s, 2, 40
.placement 12, 20
.title ' Serial/Lot Number ', highlight
.paint " "

.field possnlot, a20, pos(1,1), prompt("Serial/Lot no"), fpos(1,16), -
 help(POSERLOTNO), user('#Drill/Req#'), -
 drill_method("INSNLT_FIND"), change_method("ANYFLD_CHANGE")

.field posqty, d9.3, pos(2,1), prompt("Quantity"), fpos(2,16), -
 format("ZZZ,ZZZ.XXX-")

.structure rec1, <39>,possnlot,posqty
.set set1, rec1, possnlot
.set set2, rec1, possnlot,posqty
.end
;
;=============================================================== 
.input po4320, 7, 60
.placement 6, 13
.title ' Receivings Labels ', highlight
.line Line1, 54, pos(4,1), horizontal
.line Line1, 54, pos(6,1), horizontal
.paint _
 
.field price, a1, pos(1,1), prompt("Price"), fpos(1,20),-
 help(PORLBLPRICE), -
 select(1,3,,"N - none","1 - price 1","2 - price 2","3 - price 3",-
	     "4 - price 4","5 - price 5","A - avg cost markup",-
	     "L - last cost markup")
 
.field order, d6, pos(2,1), prompt("Order no"), fpos(2,20), -
 help(PORLBLORDNO), change_method("ANYFLD_CHANGE")
 
.field vendid, d8, pos(3,1), prompt("Vendor ID"), fpos(3,20), -
 format('XXXXXXXX')
.field vendid_descr, a30, fpos(3,29)
 
.field cutdat, d8, pos(5,1), prompt("Due date cut-off"), fpos(5,20), -
 help(POSHPCUT), date(today), change_method("ANYFLD_CHANGE")
 
.field correct, a1, pos(7,1), prompt("Correct"), fpos(7,20), -
 help(UTYNNDEF), selwnd(0,3,yesno)
 
.structure rec1, price,order,cutdat,correct
.set set1, rec1, price,order,cutdat
.set set2, rec1, correct
.end
;=============================================================== 
.input po4350d, 2, 25
.placement 6, 18
.title ' Post Date ', highlight
 
.field pdate, d8, pos(1,1), prompt("Post date"), fpos(1,12), -
 help(POPOSTDATE), date(today)

.structure rec1, pdate
.set set1 ,rec1, pdate
.end
;
;=============================================================== 
.input po4350, 15, 60
.placement 5, 25
.title ' Set PO Receivings (2-step) ', highlight
.line Line1, 59, pos(2,1), horizontal
.line Line2, 59, pos(7,1), horizontal
.paint _
 
.field scan, a10, pos(1,1), prompt("Scan data"), fpos(1,20), -
 help(POSCANDATA), change_method("ANYFLD_CHANGE")
 
.field pdate, d8, fpos(1,45), date

.field phvend, d8, pos(3,1), prompt("Vendor"), fpos(3,8), format('XXXXXXXX')
.field phname, a30, fpos(3,21)
.field phadr1, a30, fpos(4,21)
.field phadr2, a30, fpos(5,21)
.field phcity, a20, fpos(6,21)
.field phstat, a2, fpos(6,42)
.field phzipc, a10, fpos(6,46)
 
.field item, a24, pos(8,1), prompt("Item ID"), fpos(8,20)
 
.field desc, a30, pos(9,1), prompt("Description"), fpos(9,20)
 
.field rcvd, d9.3, pos(10,1), prompt("Qty received"), fpos(10,20), -
 help(POQTYRCVD), copy, format("ZZZ,ZZZ.XXX-")
 
.field bin, a8, pos(11,1), prompt("Bin"), fpos(11,20), -
 HELP(POSTKTOBIN)
 
.field acpt, d9.3, pos(12,1), prompt("Qty accepted"), fpos(12,20), -
 help(POQTYACPT), copy, format("ZZZ,ZZZ.XXX-")
 
.field rjct, d9.3, pos(13,1), prompt("Qty rejected"), fpos(13,20), -
 help(POQTYRJCT), copy, format("ZZZ,ZZZ.XXX-")
 
.field rcde, a3, pos(14,1), prompt("Reject code"), fpos(14,20), -
 help(POCODERJCT), user('#Drill/Opt/K#'), -
 drill_method("SMCODE_FIND"), change_method("SMCODE_CHANGE")
.field rcde_descr, a20, fpos(14,26), paint(" ")
 
.field ucost, d9.3, pos(15,1), prompt("Unit cost"), fpos(15,20), -
 help(PORECVUCOST), format("ZZZ,ZZZ.XXX-")

.structure rec1, scan,bin,rcvd,acpt,rjct,rcde,ucost
.structure rec8, phvend,phname,phadr1,phadr2,phcity,phstat,phzipc
.structure rec9, item,desc
.set set1, rec1, scan
.set set2, rec1, rcvd
.set set3, rec1, bin,acpt,rjct,rcde,ucost
.set set8, rec8, phvend,phname,phadr1,phadr2,phcity,phstat,phzipc
.set set9, rec9, item,desc
.end
;
;=============================================================== 
.input po4360, 6, 50
.placement 6, 15
.title ' Print Stocking Labels ', highlight
.line Line1, 50, pos(2,1), horizontal
.line Line2, 50, pos(5,1), horizontal
.paint _

.field scan, a10, pos(1,1), prompt("Scan data"), fpos(1,20), -
 help(POSCANDATA), change_method("ANYFLD_CHANGE")

.field item, a24, pos(3,1), prompt("Item ID"), fpos(3,20)

.field desc, a30, pos(4,1), prompt("Description"), fpos(4,20)

.field labels, d3, pos(6,1), prompt("No of labels"), fpos(6,20), -
 help(POQTYLABELS), copy, format("ZZX")

.structure rec1, scan,labels
.set set1, rec1, scan
.set set2, rec1, labels
.end
;
;=============================================================== 
.input po4500, 2, 35
.placement 6, 20
.title ' Daily Receivings Report ', highlight
.paint _
 
.field purdate, d8, pos(1,1), prompt("Date to print"), fpos(1,20), -
 help(POPRTDATE), date(today)
 
.structure rec1, purdate
.set set1, rec1, purdate
.end
;
;=============================================================== 
.input po6000, 4, 35
.placement 3, 25
.title ' Orders Entered Report ', highlight
.paint _

.field strdate, d8, pos(1,1), prompt("Starting date"), fpos(1,22), -
 help(POSTRDTE), date(today)

.field enddate, d8, pos(2,1), prompt("Ending date"), fpos(2,22), -
 help(POENDDTE), date(today)

.field strorder, d6, pos(3,1), prompt("Starting order"), fpos(3,22), -
 help(POSTRORDER), default(0)

.field endorder, d6, pos(4,1), prompt("Ending order"), fpos(4,22), -
 help(POENDORDER), default(999999)

.structure rec1, strdate,enddate,strorder,endorder
.set set1, rec1, strdate,enddate,strorder,endorder
.end
;
;=============================================================== 
.input po6100, 7, 60
.placement 3, 20
.title ' Open Orders by Vendor ', highlight
.paint _

.field strvend, d8, pos(1,1), prompt("Starting vendor"), fpos(1,20), -
 help(POSTRVND), default(0), user('#Drill/All#'), -
 drill_method("NAMAST_FIND"), change_method("NAMAST_CHANGE") 
.field strvend_descr, a30, fpos(1,31)

.field endvend, d8, pos(2,1), prompt("Ending vendor"), fpos(2,20), -
 help(POENDVND), default(99999999), user('#Drill/All#'), -
 drill_method("NAMAST_FIND"), change_method("NAMAST_CHANGE") 
.field endvend_descr, a30, fpos(2,31)

.field strbuyer, a3, pos(3,1), prompt("Starting buyer"), fpos(3,20), -
 help(POSTRBUYER), default("*"), user('#Drill/All/B#'), -
 drill_method("SMCODE_FIND"), change_method("SMCODE_CHANGE")
.field strbuyer_descr, a25, fpos(3,26)

.field endbuyer, a3, pos(4,1), prompt("Ending buyer"), fpos(4,20), -
 help(POENDBUYER), default("*"), user('#Drill/All/B#'), -
 drill_method("SMCODE_FIND"), change_method("SMCODE_CHANGE")
.field endbuyer_descr, a25, fpos(4,26)

.field strdate, d8, pos(5,1), prompt("Starting date"), fpos(5,20), -
 help(POSTRREQ), date, default(19010101)

.field enddate, d8, pos(6,1), prompt("Ending date"), fpos(6,20), -
 help(POENDREQ), date(today)

.field dayslate, d3, pos(7,1), prompt("Late days"), fpos(7,20), -
 help(POPRDAYS), format("ZZX")

.structure rec1, strvend,endvend,strbuyer,endbuyer,strdate,enddate,dayslate
.set set1, rec1, strvend,endvend,strbuyer,endbuyer,strdate,enddate,dayslate
.end
;
;=============================================================== 
.input po6200, 5, 78
.placement 3, 15
.title ' Open Orders by Item ', highlight
.paint _

.field stritem, a24, pos(1,1), prompt("Starting item"), fpos(1,20), -
 help(POSTRITM), default("*"), user('#Drill/All#'), -
 drill_method("INITEM_FIND"), change_method("INITEM_CHANGE")
.field stritem_descr, a30, fpos(1,48)

.field enditem, a24, pos(2,1), prompt("Ending item"), fpos(2,20), -
 help(POENDITM), default("*"), user('#Drill/All#'), -
 drill_method("INITEM_FIND"), change_method("INITEM_CHANGE")
.field enditem_descr, a30, fpos(2,48)

.field strdate, d8, pos(3,1), prompt("Starting date"), fpos(3,20), -
 help(POSTRREQ), date, default(19010101)

.field enddate, d8, pos(4,1), prompt("Ending date"), fpos(4,20), -
 help(POENDREQ), date(today)

.field dayslate, d3, pos(5,1), prompt("Late days"), fpos(5,20), -
 help(POPRDAYS), format("ZZX")

.structure rec1, stritem,enditem,strdate,enddate,dayslate
.set set1, rec1, stritem,enditem,strdate,enddate,dayslate
.end
;
;=============================================================== 
.input po6250, 3, 78
.placement 3, 15
.title ' Aged Open Orders ', highlight
.paint _

.field stritem, a24, pos(1,1), prompt("Starting item"), fpos(1,20), -
 help(POSTRITM), default("*"), user('#Drill/All#'), -
 drill_method("INITEM_FIND"), change_method("INITEM_CHANGE")
.field stritem_descr, a30, fpos(1,48)

.field enditem, a24, pos(2,1), prompt("Ending item"), fpos(2,20), -
 help(POENDITM), default("*"), user('#Drill/All#'), -
 drill_method("INITEM_FIND"), change_method("INITEM_CHANGE")
.field enditem_descr, a30, fpos(2,48)

.field agedat, d8, pos(3,1), prompt("Aging date"), fpos(3,20), -
 help(POAGEDATE), date(today)

.structure rec1, stritem,enditem,agedat
.set set1, rec1, stritem,enditem,agedat
.end
;
;=============================================================== 
.input po6300, 2, 44
.placement 3, 1
.title ' Drop Ship Orders ', highlight
.paint _

.field strdate, d8, pos(1,1), prompt("Starting ship date"), fpos(1,20), -
 help(OESTRREQ), date, default(19010101)

.field enddate, d8, pos(2,1), prompt("Ending ship date"), fpos(2,20), -
 help(OEENDREQ), date(today)

.structure rec1, strdate,enddate
.set set1, rec1, strdate,enddate
.end
;
;=============================================================== 
.input po6400, 4, 60
.placement 3, 20
.title ' Vendor Performance ', highlight
.paint _

.field strvend, d8, pos(1,1), prompt("Starting vendor"), fpos(1,20), -
 help(POSTRVND), default(0), user('#Drill/All#'), -
 drill_method("NAMAST_FIND"), change_method("NAMAST_CHANGE") 
.field strvend_descr, a30, fpos(1,31)

.field endvend, d8, pos(2,1), prompt("Ending vendor"), fpos(2,20), -
 help(POENDVND), default(99999999), user('#Drill/All#'), -
 drill_method("NAMAST_FIND"), change_method("NAMAST_CHANGE") 
.field endvend_descr, a30, fpos(2,31)

.field strdate, d8, pos(3,1), prompt("Starting date"), fpos(3,20), -
 help(POSTRDTE), date, default(19010101)

.field enddate, d8, pos(4,1), prompt("Ending date"), fpos(4,20), -
 help(POENDDTE), date(today)

.structure rec1, strvend,endvend,strdate,enddate
.set set1, rec1, strvend,endvend,strdate,enddate
.end
;
;=============================================================== 
.input po6600, 5, 78
.placement 3, 15
.title ' Purchase Receiving Cost Report ', highlight
.paint _
 
.field strdate, d8, pos(1,1), prompt("Starting date"), fpos(1,20), -
 help(POSTRDTE), date, default(19010101)
 
.field enddate, d8, pos(2,1), prompt("Ending date"), fpos(2,20), -
 help(POENDDTE), date(today)
 
.field stritem, a24, pos(3,1), prompt("Starting item"), fpos(3,20), -
 help(POSTRITM), default("*"), user('#Drill/All#'), -
 drill_method("INITEM_FIND"), change_method("INITEM_CHANGE")
.field stritem_descr, a30, fpos(3,48)
 
.field enditem, a24, pos(4,1), prompt("Ending item"), fpos(4,20), -
 help(POENDITM), default("*"), user('#Drill/All#'), -
 drill_method("INITEM_FIND"), change_method("INITEM_CHANGE")
.field enditem_descr, a30, fpos(4,48)
 
.field outtype, a1, pos(5,1), prompt("Output type"), fpos(5,20), -
 help(PORPTTYPE), select(1,3,,"Report","Export")

.structure rec1, strdate,enddate,stritem,enditem,outtype
.set set1, rec1, strdate,enddate,stritem,enditem,outtype
.end
; 
;==========================================================
.input po6700, 2, 45
.placement 3, 25
.title ' Receivings Item Analysis ', highlight
.paint _

.field strdate, d8, pos(1,1), prompt("Beginning receive date"), fpos(1,29), -
 help(POSTRDATE), date(today)

.field enddate, d8, pos(2,1), prompt("Ending receive date"), fpos(2,29), -
 help(POENDDATE), date(today)

.structure rec1, strdate,enddate
.set set1, rec1, strdate,enddate
.end
; 
;==========================================================
.input po6720, 2, 45
.placement 3, 25
.title ' Receivings Invoice Analysis ', highlight
.paint _

.field strdate, d8, pos(1,1), prompt("Beginning invoice date"), fpos(1,29), -
 help(POSTRDATE), date(today)

.field enddate, d8, pos(2,1), prompt("Ending invoice date"), fpos(2,29), -
 help(POENDDATE), date(today)

.structure rec1, strdate,enddate
.set set1, rec1, strdate,enddate
.end
; 
;==========================================================
.input po6740, 2, 45
.placement 3, 25
.title ' Receivings Freight Analysis ', highlight
.paint _

.field strdate, d8, pos(1,1), prompt("Beginning invoice date"), fpos(1,29), -
 help(POSTRDATE), date(today)

.field enddate, d8, pos(2,1), prompt("Ending invoice date"), fpos(2,29), -
 help(POENDDATE), date(today)

.structure rec1, strdate,enddate
.set set1, rec1, strdate,enddate
.end
; 
;==========================================================
.input po6760, 4, 60
.placement 3, 25
.title ' Receivings Not Invoiced ', highlight
.paint _
 
.field strdate, d8, pos(1,1), prompt("Beginning receive date"), fpos(1,27), -
 help(POSTRDATE), date(today)
 
.field enddate, d8, pos(2,1), prompt("Ending receive date"), fpos(2,27), -
 help(POENDDATE), date(today)
 
.field locncode, a3, pos(3,1), prompt("Location"), fpos(3,27), -
 help(POORDLOC), default("*"), user('#Drill/All/L#'), -
 drill_method("SMCODE_FIND"), change_method("SMCODE_CHANGE")
.field locncode_descr, a25, fpos(3,31)
 
.field nonstock, a1, pos(4,1), prompt("Items to include"), fpos(4,27), -
 help(PONONSTOCK), select(1,3,,'Both','Stock','Non-stock')
 
.structure rec1, strdate,enddate,locncode,nonstock
.set set1, rec1, strdate,enddate,locncode,nonstock
.end
;
;=============================================================== 
.input po6800, 10, 90
.placement 3, 15
.title ' Purchase Order History Report ', highlight
.paint _

.field strvend, d8, pos(1,1), prompt("Starting vendor"), fpos(1,25), -
 help(POSTRVND), default(0), user('#Drill/All#'), -
 drill_method("NAMAST_FIND"), change_method("NAMAST_CHANGE") 
.field strvend_descr, a30, fpos(1,31)

.field endvend, d8, pos(2,1), prompt("Ending vendor"), fpos(2,25), -
 help(POENDVND), default(99999999), user('#Drill/All#'), -
 drill_method("NAMAST_FIND"), change_method("NAMAST_CHANGE") 
.field endvend_descr, a30, fpos(2,31)

.field stritem, a24, pos(3,1), prompt("Starting item"), fpos(3,25), -
 help(POSTRITM), default("*"), user('#Drill/All#'), -
 drill_method("INITEM_FIND"), change_method("INITEM_CHANGE")
.field stritem_descr, a30, fpos(3,48)

.field enditem, a24, pos(4,1), prompt("Ending item"), fpos(4,25), -
 help(POENDITM), default("*"), user('#Drill/All#'), -
 drill_method("INITEM_FIND"), change_method("INITEM_CHANGE")
.field enditem_descr, a30, fpos(4,48)

.field locncode, a3, pos(5,1), prompt("Location"), fpos(5,25), -
 help(POORDLOC), default("*"), user('#Drill/All/L#'), -
 drill_method("SMCODE_FIND"), change_method("SMCODE_CHANGE")
.field locncode_descr, a25, fpos(5,26)

.field strdate, d8, pos(6,1), prompt("Starting recv date"), fpos(6,25), -
 help(POSTRDTE), date, default(19010101)

.field enddate, d8, pos(7,1), prompt("Ending recv date"), fpos(7,25), -
 help(POENDDTE), date(today)

.field rptseq, a1, pos(8,1), prompt("Report sequence"), fpos(8,25), -
 help(POHISSEQ), select(0,3,,"Vendor","Item")

.field stock, a1, pos(9,1), prompt("Record types"), fpos(9,25), -
 help(POHISRECTYP), -
 select(0,3,,"Item stock","Non-stock","Both")

.field incsnl, a1, pos(10,1), prompt("Include serial/lot no?"), fpos(10,25), -
 help(ININCSNL), selwnd (0,3,noyes)

.structure rec1, strvend,endvend,stritem,enditem,locncode,strdate,enddate, -
	rptseq,stock,incsnl
.set set1, rec1, strvend,endvend,stritem,enditem,locncode,strdate,enddate, -
	rptseq,stock,incsnl
.end
;
;=============================================================== 
.input po8000, 9, 66
.placement 3, 20
.title ' Purge Purchase Orders ', highlight
.line Line1, 66, pos(4,1), horizontal
.line Line2, 66, pos(8,1), horizontal
.paint _

.field purdat, d8, pos(1,1), prompt("Purge through date"), fpos(1,23), -
 help(POPGPODATE), date, required

.field option, a1, pos(2,1), prompt("Option"), fpos(2,23), -
 help(POPGPOOPT), change_method("ANYFLD_CHANGE"), -
 select(1,3,,"One order","All posted")

.field order, d6, pos(3,1), prompt("Order ID"), fpos(3,23), -
 help(POPGORNO), change_method("ANYFLD_CHANGE"), required, -
 user('#f/pohedr/0/f/#')

.field vend, d8, pos(5,1), prompt("Vendor ID"), fpos(5,13), -
 format('XXXXXXXX')
.field vend_descr, a30, fpos (5,25)

.field status1, a45, pos(6,1), prompt("Status"), fpos(6,13)
.field status2, a45, fpos(7,13)

.field confirm, a3, pos(9,1), prompt("Confirm"), fpos(9,13), - 
 help(UTCONFRM), default("NO"), uc, allow(YES,NO)

.structure rec1, purdat,option,order,vend,vend_descr,status1,status2,confirm
.set set1, rec1, purdat,option,order
.set set2, rec1, vend,vend_descr,status1,status2
.set set3, rec1, confirm
.end
;
;=============================================================== 
.input po8200, 3, 40
.placement 3, 35
.title ' Purge Order History ', highlight
.paint _

.field purdate, d8, pos(1,1), prompt("Purge through date"), fpos(1,26), -
 help(POPGDATE), date, required

.field write, a1, pos(2,1), prompt("Save deleted records"), fpos(2,26), -
 help(UTSAVEDEL), selwnd(1,3,"YESNO")

.field confirm, a3, pos(3,1), prompt("Confirm"), fpos(3,26), - 
 help(UTCONFRM), default("NO"), uc, allow(YES,NO)

.structure rec1, purdate,write,confirm
.set set1, rec1, purdate,write,confirm
.end
;
;=============================================================== 
.input po8300, 6, 66
.placement 3, 20
.title ' Close Purchase Orders ', highlight
.line Line1, 66, pos(2,1), horizontal
.line Line2, 66, pos(5,1), horizontal
.paint _

.field order, d6, pos(1,1), prompt("Order ID"), fpos(1,13), -
 help(POPGORNO), change_method("ANYFLD_CHANGE"), required

.field vend, d8, pos(3,1), prompt("Vendor ID"), fpos(3,13), -
 format('XXXXXXXX')
.field vend_descr, a30, fpos (3,22)

.field status, a45, pos(4,1), prompt("Status"), fpos(4,13)

.field confirm, a3, pos(6,1), prompt("Confirm"), fpos(6,13), - 
 help(UTCONFRM), default("NO"), uc, allow(YES,NO)

.structure rec1, order,vend,vend_descr,status,confirm
.set set1, rec1, order
.set set2, rec1, vend,vend_descr,status
.set set3, rec1, confirm
.end
;
;=============================================================== 
.input po8400, 6, 66
.placement 3, 20
.title ' Re-open Purchase Orders ', highlight
.line Line1, 66, pos(2,1), horizontal
.line Line2, 66, pos(5,1), horizontal
.paint _

.field order, d6, pos(1,1), prompt("Order ID"), fpos(1,13), -
 help(POPGORNO), change_method("ANYFLD_CHANGE"), required

.field vend, d8, pos(3,1), prompt("Vendor ID"), fpos(3,13), -
 format('XXXXXXXX')
.field vend_descr, a30, fpos (3,22)

.field status, a45, pos(4,1), prompt("Status"), fpos(4,13)

.field confirm, a3, pos(6,1), prompt("Confirm"), fpos(6,13), - 
 help(UTCONFRM), default("NO"), uc, allow(YES,NO)

.structure rec1, order,vend,vend_descr,status,confirm
.set set1, rec1, order
.set set2, rec1, vend,vend_descr,status
.set set3, rec1, confirm
.end
;
;=============================================================== 
.input po8500, 3, 45
.placement 3, 35
.title ' Purge Receivings ', highlight
.paint _

.field purdate, d8, pos(1,1), prompt("Purge through date"), fpos(1,27), -
 help(POPGDATE), date, required

.field write, a1, pos(2,1), prompt("Save deleted records"), fpos(2,27), -
 help(UTSAVEDEL), selwnd(1,3,"YESNO")

.field confirm, a3, pos(3,1), prompt("Confirm"), fpos(3,27), - 
 help(UTCONFRM), default("NO"), uc, allow(YES,NO)

.structure rec1, purdate,write,confirm
.set set1, rec1, purdate,write,confirm
.end
;=============================================================== 

