.script                                               
; dteap.wsc - Down To Earth Accounts Payable scripts.
;
; 02/02/2017 - lso/wsc Add check# range to apcdst purge, ap8200
;
;======================================================================= 
; 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 apmaintmenu, "Maintenance", select(m)
.entry m_name, "Name/Address"
.entry m_scod, "Codes", sub, select(d)
.entry m_comp, "Company"
.end
;
;===================================================================
.column aptranmenu, "Transaction", select(t)
.entry t_tent, "Enter invoices"
.entry t_void, "Enter void checks"
.entry t_prof, "Proof invoices"
.entry t_post, "Post transactions"
.line
.entry t_rent, "Enter recurring invoices"
.entry t_rprf, "Proof recurring invoices"
.entry t_rpst, "Post recurring invoices"
.line
.entry t_setp, "Manually pay invoices"
.entry t_cidd, "Change invoice due date"
.end
;
;===================================================================
.column apchekmenu, "Checks", select(c)
.entry c_payp, "Prepare payment(s)"
.entry c_lnup, "Print lineup checks"
.entry c_chek, "Print checks"
.entry c_chkr, "Print register (detail)"
.entry c_chks, "Print register (summary)"
.entry c_post, "Post checks"
.line
.entry c_blnk, "Print blank checks"
.end
;
;===================================================================
.column apreptmenu, "Reports/Inquiry", select(r)
.entry i_inqy, "Inquiry", sub, select(i)
.line
.entry r_scod, "Codes", sub, select(d)
.entry r_agtb, "Aged trial balance"
.entry r_creq, "Cash requirements"
.entry r_vola, "Vendor volume analysis"
.entry r_vhst, "History by vendor"
.entry r_chst, "History by check"
.entry r_apgl, "A/P to G/L distribution"
.entry r_balr, "Balancing report"
.entry r_pcrp, "Custom reports"
.entry r_pque, "Queued reports"
.end
;
;===================================================================
.column apmiscmenu, "Miscellaneous", select(z)
.entry z_purh, "Purge history"
.entry z_purr, "Purge recurring transactions"
.entry z_purc, "Purge check distributions"
.entry z_pur1, "Purge 1099 history"
.entry z_svnd, "Set vendor totals"
.line
.entry z_apgl, "Clear A/P to G/L distribution"
.line
.entry z_109m, "1099 maintenance"
.entry z_109r, "Print 1099 reports", sub
.entry z_109s, "Set 1099 limits", sub
.entry z_109f, "Print 1099 forms", sub
.end

.column z_109r, "1099 Reports"
.entry z_19mr, "1099-MISC report"
.entry z_19dr, "1099-DIV report"
.entry z_19vf, "1099 verification report"
.end

.column z_109s, "1099 Limits"
.entry z_19ms, "Set 1099-MISC limits"
.entry z_19ds, "Set 1099-DIV limits"
.end

.column z_109f, "1099 Forms"
.entry z_19mf, "1099-MISC forms"
.entry z_19df, "1099-DIV forms"
.end
;
;===============================================================
.input ap1099srch, 2, 26
.paint _
.placement 16, 4
.title " Find 1099 ", highlight

.field year, d4, pos(1,1), prompt("Year"), fpos(1,12), -
 help(AP1099YR), format('XXXX')

.field vendor, d8, pos(2,1), prompt("Vendor ID"), fpos(2,12), -
 help(APTRANVN), user('#Drill/Opt/V#'), drill_method("APVEND_FIND")

.end
;
;===============================================================
.input apopensrch, 2, 50
.placement 15, 14
.title " Find A/P Invoice ", highlight
.line Line1, 2, pos(1,24), vertical

.field vendor, d8, pos(1,1), prompt("Vendor ID"), fpos(1,12), -
 help(APTRANVN), user('#Drill/Opt/V#'), drill_method("APVEND_FIND"), -
 blank_if_zero, break

.field vochnum, d6, pos(2,1), prompt("Voucher"), fpos(2,12), -
 help(APVOCHNO), blank_if_zero, break

.field invcnum, a12, pos(1,26), prompt("Invoice"), fpos(1,36), -
 help(APINVCNO), break

.end
;
;===============================================================
.input aprecrsrch, 2, 36
.placement 7, 40
.title " Find A/P Recurring ", highlight

.field vendor, d8, pos(1,1), prompt("Vendor ID"), fpos(1,12), -
 help(APTRANVN), user('#Drill/Opt/V#'), drill_method("APVEND_FIND"), -
 blank_if_zero

.field invcnum, a12, pos(2,1), prompt("Invoice"), fpos(2,12), -
 help(APINVCNO), break

.end
;
;===============================================================
.input aptransrch, 2, 36
.placement 9, 40
.title " Find A/P Transaction ", highlight

.field vendor, d8, pos(1,1), prompt("Vendor ID"), fpos(1,12), -
 help(APTRANVN), user('#Drill/Opt/V#'), drill_method("APVEND_FIND"), -
 blank_if_zero

.field invcnum, a12, pos(2,1), prompt("Invoice"), fpos(2,12), -
 help(APINVCNO), break

.end
;
;===============================================================
.input i_lap1099, 1, 16
.placement 10, 12
.title " 1099 Data "
.field l_head, a1, -
 user("Year   Vendor  ")
.field l_year, d4, pos(1,1)
.field l_vend, d8, pos(1,7), format('XXXXXXXX')
.structure rec1, l_year,<2>,l_vend
.set set1, rec1, l_year,l_vend
.end
;
;===============================================================
.listclass l_aphist, items(8), headers(1), load_method("APLL_APHIST")
.end
;
.input i_laphist, 1, 90
.placement 10, 14
.title " A/P History "
.field l_head, a1, -
 user("Vouchr Invoice        Invc-Date    Invc-Amt    Disc-Amt     Chk-Date Chk-No    P")
.field l_heado, a1, -
 user("O#  Typ")

.field l_vch, d6, pos(1,1), format('ZZZZZX')
.field l_inno, a12, pos(1,8)
.field l_indt, d8, date, pos(1,21)
.field l_amnt, d9.2, pos(1,32), format('Z,ZZZ,ZZZ.XX-')
.field l_damt, d8.2, pos(1,45), format('ZZZ,ZZZ.XX-')
.field l_ckdt, d8, date, pos(1,58), bzro
.field l_ckno, d6, pos(1,70), format('ZZZZZZ')
.field l_pono, d6, pos(1,77), format('ZZZZZZ')
.field l_type, d1, pos(1,86)

.structure rec1, <10>,l_vch,l_type,l_inno,l_indt,<19>,l_amnt,l_damt,l_ckdt,l_ckno,l_pono
.set set1, rec1, l_vch,l_inno,l_indt,l_amnt,l_damt,l_ckdt,l_ckno,l_pono,l_type
.end
;
;=======================================================================;
.listclass l_apopen, items(8), headers(1), load_method("APLL_APOPEN")
.end
;
.input i_lapopen, 1, 92
.placement 10, 14
.title " A/P Open "
.field l_head, a1, -
 user("Vouchr Invoice        Invc-Date   Due-Date  Disc-Date    Invc-Amt    Disc-Amt  ") 
.field l_heado, a1, -
 user("Term  Stat")

.field l_vch, d6, pos(1,1), format('ZZZZZX')
.field l_inno, a12, pos(1,8)
.field l_indt, d8, date, pos(1,21)
.field l_due, d8, date, pos(1,32)
.field l_disc, d8, date, pos(1,43), bzro
.field l_amnt, d9, pos(1,54), format('Z,ZZZ,ZZZ.XX-')
.field l_damt, d8, pos(1,68), format('ZZZ,ZZZ.XX-')
.field l_term, a3, pos(1,81), format('@@@')
.field l_flag, a1, pos(1,88), format('@')

.structure rec1, <10>,l_vch,<1>,l_inno,l_indt,l_term,l_due,l_disc,l_amnt, -
        l_damt,l_flag
.set set1, rec1, l_vch,l_inno,l_indt,l_due,l_disc,l_amnt,l_damt,l_term, -
        l_flag
.end
;
;===============================================================
.listclass l_aprecr, items(8), headers(1), load_method("APLL_APRECR")
.end
;
.input i_laprecr, 1, 44
.placement 10, 12
.title " Recurring "
.field l_head, a1, -
 user(" Vendor  Invoice      Typ       Amount  User")
.field l_vend, d8, pos(1,1)
.field l_inno, a12, pos(1,10)
.field l_type, a1, pos(1,24)
.field l_amnt, d9.2, pos(1,27), format('Z,ZZZ,ZZZ.XX-')
.field l_user, a3, pos(1,41)
.structure rec1, <2>,l_vend,l_inno,<6>,l_type,<27>,l_amnt,<58>,l_user
.set set1, rec1, l_vend,l_inno,l_type,l_amnt,l_user
.end
;
;===================================================================
.input i_laptran, 1, 44
.placement 10, 12
.title " Transactions "
.field l_head, a1, -
 user(" Vendor  Invoice      Typ       Amount  User")
.field l_vend, d8, pos(1,1)
.field l_inno, a12, pos(1,10)
.field l_type, a1, pos(1,24)
.field l_amnt, d9.2, pos(1,27), format('Z,ZZZ,ZZZ.XX-')
.field l_user, a3, pos(1,41)
.structure rec1, <2>,l_vend,l_inno,l_type,<39>,l_amnt,<74>,l_user
.set set1, rec1, l_vend,l_inno,l_type,l_amnt,l_user
.end
;
;===================================================================
.listclass l_apvhst, items(8), headers(1), load_method("APLL_APVHST")
.end
;
.input i_lapvhst, 1, 142
.display_area 1, 1, 1, 110
.placement 10, 5
.title " Vendor Summary "
.field l_head, a1, -
 user("Year Typ    January   February      March      April        May       June")
.field l_heado, a1, -
 user(" July     August  September    October   November   December")

.field l_year, d4, pos(1,1), format('XXXX')
.field l_type, a3, pos(1,6)

.field l_vch01, d4, pos(1,15), format('Z,ZZX')
.field l_vch02, d4, pos(1,26), format('Z,ZZX')
.field l_vch03, d4, pos(1,37), format('Z,ZZX')
.field l_vch04, d4, pos(1,48), format('Z,ZZX')
.field l_vch05, d4, pos(1,59), format('Z,ZZX')
.field l_vch06, d4, pos(1,70), format('Z,ZZX')
.field l_vch07, d4, pos(1,81), format('Z,ZZX')
.field l_vch08, d4, pos(1,92), format('Z,ZZX')
.field l_vch09, d4, pos(1,103), format('Z,ZZX')
.field l_vch10, d4, pos(1,114), format('Z,ZZX')
.field l_vch11, d4, pos(1,125), format('Z,ZZX')
.field l_vch12, d4, pos(1,136), format('Z,ZZX')

.field l_pur01, d9, pos(1,10), format('ZZZZZZZ.XX-')
.field l_pur02, d9, pos(1,21), format('ZZZZZZZ.XX-')
.field l_pur03, d9, pos(1,32), format('ZZZZZZZ.XX-')
.field l_pur04, d9, pos(1,43), format('ZZZZZZZ.XX-')
.field l_pur05, d9, pos(1,54), format('ZZZZZZZ.XX-')
.field l_pur06, d9, pos(1,65), format('ZZZZZZZ.XX-')
.field l_pur07, d9, pos(1,76), format('ZZZZZZZ.XX-')
.field l_pur08, d9, pos(1,87), format('ZZZZZZZ.XX-')
.field l_pur09, d9, pos(1,98), format('ZZZZZZZ.XX-')
.field l_pur10, d9, pos(1,109), format('ZZZZZZZ.XX-')
.field l_pur11, d9, pos(1,120), format('ZZZZZZZ.XX-')
.field l_pur12, d9, pos(1,131), format('ZZZZZZZ.XX-')

.structure rec1, l_year,l_type,l_vch01,l_vch02,l_vch03,l_vch04,l_vch05,-
	l_vch06,l_vch07,l_vch08,l_vch09,l_vch10,l_vch11,l_vch12,-
	l_pur01,l_pur02,l_pur03,l_pur04,l_pur05,-
	l_pur06,l_pur07,l_pur08,l_pur09,l_pur10,l_pur11,l_pur12
.set set1, rec1, l_year,l_type,l_vch01,l_vch02,l_vch03,l_vch04,l_vch05,-
	l_vch06,l_vch07,l_vch08,l_vch09,l_vch10,l_vch11,l_vch12
.set set2, rec1, l_year,l_type,l_pur01,l_pur02,l_pur03,l_pur04,l_pur05,-
	l_pur06,l_pur07,l_pur08,l_pur09,l_pur10,l_pur11,l_pur12
.end
;
;=============================================================== 
.input ap2300, 10, 80
.placement 3, 15
.title ' Vendor Inquiry ', highlight
.line Line1, 79, pos(2,1), horizontal
.line Line2, 79, pos(8,1), horizontal
.paint _
 
.field vendor, d6, pos(1,1), prompt("Vendor ID"), fpos(1,18)
.field vendor_descr, a30, position(1,26), paint(" ")

.field sortname, a10, pos(3,1), prompt("Sort name"), fpos(3,18)
.field status, a1, pos(3,50), prompt("Status"), fpos(3,65)

.field ssno, a11, pos(4,1), prompt("SSN/Tax ID"), fpos(4,18)
.field poreq, a1, pos(4,50), prompt("PO required?"), fpos(4,65)

.field pr1099, a1, pos(5,1), prompt("Print 1099"), fpos(5,18)
.field def1099, a3, pos(5,50), prompt("Default 1099"), fpos(5,65)

.field terms, a3, pos(6,1), prompt("Terms"), fpos(6,18)
.field terms_descr, a25, fpos(6,24)
.field grpno, d2, pos(6,50), prompt("Group no"), fpos(6,65)

.field defacct, a6, pos(7,1), prompt("Default acct"), fpos(7,18)
.field defdiv, a4, fpos(7,24)
.field defdept, a4, fpos(7,29)

.field last_act, d8, pos(9,1), prompt("Last Activity"), fpos(9,18), date
.field created, d8, pos(9,50), prompt("Created"), fpos(9,64), date

.structure rec1, <2>,vendor,<2>,sortname,<2>,status,pr1099,terms,<1>, -
 ssno,last_act,created,def1099,defacct,defdiv,defdept,<124>,poreq,grpno
.set set_chg, rec1, vendor
.set set_show, rec1, vendor,sortname,status,pr1099,terms,ssno, -
 last_act,created,def1099,defacct,defdiv,defdept,poreq,grpno

.button HST, text("History"), select(H)
.button CUR, text("Current"), select(C)
.button SUM, text("Summary"), select(S)
.button_set right
.end
;
;===ap4000============================================================ 
.input ap4000i, 15, 66
.placement 3, 5
.title ' Invoice Entry ', highlight
.line Line1, 66, pos(4,1), horizontal
.paint _

.field vendor, d8, pos(1,1), prompt("Vendor ID"), fpos(1,20), -
 help(APTRANVN), user('#Drill/Req/V#'), drill_method("APVEND_FIND"), -
 change_method("NAMAST_CHANGE"), hyperlink_method("APVEND_HYPER")
.field vendor_descr, a30, fpos(1,32)

.field invcnum, a12, pos(2,1), prompt("Invoice number"), fpos(2,20), -
 help(APINVNUM), required, change_method("ANYFLD_CHANGE"), -
 drill_method("AP4000_RECUR")

.field type, a1, pos(3,1), prompt("Type"), fpos(3,20), -
 help(APTRTYPE), change_method("ANYFLD_CHANGE"), -
 select(1,3,,"1-Invoice","2-Prepaid","3-CR memo","9-Void check")

.field termsc, a3, pos(5,1), prompt("Terms code"), fpos(5,20), -
 help(APTRANTC), copy, user('#Drill/Req/Y#'), drill_method("SMCODE_FIND"), -
 change_method("SMCODE_CHANGE"), hyperlink_method("SMCODE_HYPER")
.field termsc_descr, a25, fpos(5,26)

.field invdate, d8, pos(6,1), prompt("Invoice date"), fpos(6,20), -
 help(APINVCDATE), date(today), change_method("ANYFLD_CHANGE")

.field duedate, d8, pos(7,1), prompt("Due date"), fpos(7,20), -
 help(APDUEDTE), date, required

.field dscdate, d8, pos(8,1), prompt("Discount date"), fpos(8,20), -
 help(APDSCDTE), date

.field dstdate, d8, pos(9,1), prompt("Distribution date"), fpos(9,20), -
 help(APESPDTE), date, required, change_method("ANYFLD_CHANGE")

.field invamt, d9.2, pos(10,1), prompt("Invoice amount"), fpos(10,20), -
 help(APINVAMT), negative, change_method("ANYFLD_CHANGE"), -
 format("Z,ZZZ,ZZZ.XX-"), required

.field netamt, d8.2, pos(11,1), prompt("Non-discount amt"), fpos(11,20), -
 help(APNETAMT), negative, change_method("ANYFLD_CHANGE"), -
 format("ZZZ,ZZZ.XX-")

.field discamt, d8.2, pos(12,1), prompt("Discount amount"), fpos(12,20), -
 help(APDSCAMT), negative, change_method("ANYFLD_CHANGE"), -
 format("ZZZ,ZZZ.XX-")

.field invdesc, a25, pos(13,1), prompt("Invoice comments"), fpos(13,20), -
 help(APINVDESC)

.field pono, d6, pos(14,1), prompt("Purchase order"), fpos(14,20), -
 help(APPONUM), change_method("ANYFLD_CHANGE")

.field checkno, d6, pos(15,1), prompt("Check number"), fpos(15,20), -
 help(APCHKNUM)

.field checkdt, d8, pos(15,30), prompt("Check date"), fpos(15,42), -
 help(APCHKDTE), date(today)

.field userid, a3, fpos(1,64)

.structure rec1, <2>,vendor,invcnum,type,<4>,invdate,termsc,-
	duedate,dscdate,dstdate,invamt,netamt,discamt,checkno,-
	checkdt,<6>,pono,invdesc,<7>,userid
.set set_add, rec1, vendor,invcnum,type,termsc,invdate,duedate,-
	dscdate,dstdate,invamt,netamt,discamt,invdesc,pono,checkno,checkdt
.set set_chg, rec1, termsc,invdate,duedate,-
	dscdate,dstdate,invamt,netamt,discamt,invdesc,pono,checkno,checkdt
.set set_show, rec1, vendor,invcnum,type,termsc,invdate,duedate,dscdate,-
	dstdate,invamt,netamt,discamt,invdesc,pono,checkno,checkdt,userid
.button detl, text("Entries")
.button_set bottom, end
.end
;
;=============================================================== 
.input ap4000p, 3, 24
.placement 7, 60
.title " Purchase Order Totals ", highlight
.paint " "

.field totamt, d9.2, pos(1,1), prompt("Total amt"), fpos(1,12), -
 format("Z,ZZZ,ZZZ.XX-")

.field totrcvd, d9.2, pos(2,1), prompt("Received"), fpos(2,12), -
 format("Z,ZZZ,ZZZ.XX-")

.field totinvcd, d9.2, pos(3,1), prompt("Invoiced"), fpos(3,12), -
 format("Z,ZZZ,ZZZ.XX-")

.end
;
;===ap4000l=========================================================== 
.listclass l_ap4000l, items(10), headers(1), footers(1), -
 load_method("APLL_AP4000")
.end
;
;===ap4000l=========================================================== 
.input i_ap4000l, 1, 36
.placement 10, 8
.title " Distributions "
.field l_no, d3, pos(1,1)
.field l_deleted, a1, pos(1,4)
.field l_acct, a6, pos(1,5)
.field l_div, a4, pos(1,12)
.field l_dept, a4, pos(1,17)
.field l_amount, d10.2, pos(1,22), format("ZZ,ZZZ,ZZZ.XX-")
.structure rec1, l_no,l_acct,l_div,l_dept,l_amount,l_deleted
.set set1, rec1, l_no,l_deleted,l_acct,l_div,l_dept,l_amount
.end
;
;===================================================================== 
.input ap4000l, 12, 60
.placement 12, 45
.title ' Distribution Entry ', highlight
.paint _

.field iccomp, a2, pos(1,1), prompt("Company"), fpos(1,16), -
 help(GLICCOMP), change_method("ANYFLD_CHANGE")
.field iccomp_descr, a30, fpos(1,25)

.field acct, a6, pos(2,1), prompt("Account"), fpos(2,16), -
 help(GLGENACT), user('#Drill/Opt#'), drill_method("GLACCT_FIND"), -
 change_method("ANYFLD_CHANGE"), hyperlink_method("GLACCT_HYPER"), -
 info("FIND(Lookup) ... ^A(Maintenance)")
.field acct_descr, a30, fpos(2,25)

.field div, a4, pos(3,1), prompt("Division"), fpos(3,16), -
 help(GLDIVSNO), user('#Drill/Opt#'), drill_method("GLDIVS_FIND"), -
 change_method("GLDIVS_CHANGE"), info("FIND(Lookup)")
.field div_descr, a25, fpos(3,25)

.field dept, a4, pos(4,1), prompt("Department"), fpos(4,16), -
 help(GLDEPTNO), user('#Drill/Opt#'), drill_method("GLDEPT_FIND"), -
 change_method("GLDEPT_CHANGE"), info("FIND(Lookup)")
.field dept_descr, a25, fpos(4,25)

.field descr, a25, pos(5,1), prompt("Description"), fpos(5,16), -
 help(APTRNDESC)

.field pono, d6, pos(6,1), prompt("PO no"), fpos(6,16), -
 help(APPONO), change_method("ANYFLD_CHANGE")

.field poline, d3, pos(7,1), prompt("PO line no"), fpos(7,16), -
 help(APCOSTCATG), change_method("ANYFLD_CHANGE")

.field amount, d9.2, pos(8,1), prompt("Amount"), fpos(8,16), -
 help(APAMOUNT), negative, change_method("ANYFLD_CHANGE"), -
 format("ZZ,ZZZ,ZZZ.XX-")

.field p1099, a3, pos(9,1), prompt("1099 code"), fpos(9,16), -
 help(AP1099CODE), selwnd(0,3,code1099)

.field unit, d10.2, pos(10,1), prompt("Units"), fpos(10,16), -
 help(APUNITS), negative, change_method("ANYFLD_CHANGE"), -
 format("ZZ,ZZZ,ZZZ.XX-")

.field cost, a6, pos(11,1), prompt("Cost center ID"), fpos(11,16), -
 help(APCOSTID), copy, user("#Drill/Opt"), drill_method("CCCOST_FIND"), -
 change_method("ANYFLD_CHANGE"), hyperlink_method("CCCOST_HYPER"), -
 info("FIND(Lookup) ... ^A(Maintenance)")
.field cost_descr, a30, fpos(11,25)

.field catg, a3, pos(12,1), prompt("Cost category"), fpos(12,16), -
 help(APCOSTCATG), copy, user("#Drill/Opt/E#"), drill_method("SMCODE_FIND"), -
 change_method("SMCODE_CHANGE"), hyperlink_method("SMCODE_HYPER"), -
 info("FIND(Lookup) ... ^A(Maintenance)")
.field catg_descr, a30, fpos(12,25)

.structure rec1, <27>,acct,div,dept,amount,unit,<14>,descr,p1099,-
	 catg,cost,poline,<1>,iccomp,pono
.set set1, rec1, iccomp,acct,div,dept,descr,pono,poline,amount,p1099,unit, -
 cost,catg
.set setd, rec1, iccomp,acct,div,dept,descr,pono,poline,amount,p1099,unit, -
 cost,catg
.set set1p, rec1, iccomp,acct,div,dept,descr,amount,p1099,unit,cost,catg
.end
;
;
;===================================================================== 
.input ap4000o, 7, 60
.placement 4, 31
.title " PO Line Item ", highlight
.paint " "
 
.field itemid, a24, pos(1,1), prompt("Item"), fpos(1,9)
 
.field descr, a30, pos(2,1), prompt("Descr"), fpos(2,9)
 
.field totqty, d9.3, pos(3,1), prompt("Units"), fpos(3,9), -
 format("Z,ZZZ,ZZZ.XXX-")
 
.field totdol, d9.2, pos(4,1), prompt("Dollars"), fpos(4,9), -
 format("Z,ZZZ,ZZZ.XX-")
 
.end
;
;===================================================================== 
.input ap4002, 7, 62
.placement 3, 5
.title ' Void A/P Checks ', highlight
.line Line1, 60, pos(4,1), horizontal
.paint _
 
.field chkno, d6, pos(1,1), prompt("Check number"), fpos(1,20), -
 help(APVCHKNO), required, format("XXXXXX"), -
 change_method('ANYFLD_CHANGE')

.field reset, a1, pos(2,1), prompt("Setup Invoice?"), fpos(2,20), -
 help(APVRESET), selwnd(1,3,noyes)
 
.field chkdte, d8, pos(5,1), prompt("Check date"), fpos(5,17), -
 date(today)
 
.field vendor, d8, pos(6,1), prompt("Vendor ID"), fpos(6,20)
.field vendor_descr, a30, fpos(6,30)
 
.field chkamt, d9.2, pos(7,1), prompt("Check amount"), fpos(7,16), -
 negative, format("Z,ZZZ,ZZZ.XX-")
 
.structure rec1, chkno,reset
.set set1, rec1, chkno,reset
.end
; 
;===================================================================== 
.input ap4020, 4, 34
.placement 3, 5
.title ' A/P Transaction Posting ', highlight
.paint _
 
.text Text1, pos(1,10)
Account
.text Text2, pos(1,23)
Div
.text Text3, pos(1,28)
Dept
 
.field apacct, a6, pos(2,1), prompt("A/P"), fpos(2,11), -
 help(APINVPST), user("#Drill/Req#"), drill_method("GLACCT_FIND")
.field apacct_div, a4, fpos(2,23), -
 help(APINVPSTDIV)
.field apacct_dept, a4, fpos(2,28), -
 help(APINVPSTDPT)
 
.field cshacct, a6, pos(3,1), prompt("Cash"), fpos(3,11), -
 help(APCSHPST), user("#Drill/Req#"), drill_method("GLACCT_FIND")
.field cshacct_div, a4, fpos(3,23), -
 help(APCSHPSTDIV)
.field cshacct_dept, a4, fpos(3,28), -
 help(APCSHPSTDPT)
 
.field dscacct, a6, pos(4,1), prompt("Discount"), fpos(4,11), -
 help(APDSCPST), user("#Drill/Opt#"), drill_method("GLACCT_FIND")
.field dscacct_div, a4, fpos(4,23), -
 help(APDSCPSTDIV)
.field dscacct_dpt, a4, fpos(4,28), -
 help(APDSCPSTDPT)
 
.end
;
;===ap4100============================================================ 
.input ap4100i, 14, 66
.placement 3, 5
.title ' Recurring Invoice Entry ', highlight
.line Line1, 66, pos(3,1), horizontal
.paint _
 
.field vendor, d8, pos(1,1), prompt("Vendor ID"), fpos(1,20), -
 help(APTRANVN), user('#Drill/Req/V#'), drill_method("APVEND_FIND"), -
 change_method("NAMAST_CHANGE"), hyperlink_method("APVEND_HYPER")
.field vendor_descr, a30, fpos(1,32)
 
.field invcnum, a12, pos(2,1), prompt("Invoice number"), fpos(2,20), -
 help(APINVNUM), required
 
.field type, a1, pos(4,1), prompt("Type"), fpos(4,20), -
 help(APTRTYPE), select(1,3,,"1-Invoice","3-CR memo")
 
.field freq, a2, pos(5,1), prompt("Frequency"), fpos(5,20), -
 help(APRCFREQ), uc, required
 
.field termsc, a3, pos(6,1), prompt("Terms code"), fpos(6,20), -
 help(APTRANTC), user('#Drill/Req/Y#'), drill_method("SMCODE_FIND"), -
 change_method("SMCODE_CHANGE"), hyperlink_method("SMCODE_HYPER")
.field termsc_descr, a25, fpos(6,26)
 
.field invdate, d8, pos(7,1), prompt("Invoice date"), fpos(7,20), -
 help(APINVCDATE), date(today), change_method("ANYFLD_CHANGE")
 
.field duedate, d8, pos(8,1), prompt("Due date"), fpos(8,20), -
 help(APDUEDTE), date, required
 
.field dscdate, d8, pos(9,1), prompt("Discount date"), fpos(9,20), -
 help(APDSCDTE), date
 
.field invamt, d9.2, pos(10,1), prompt("Invoice amount"), fpos(10,20), -
 help(APINVAMT), negative, change_method("ANYFLD_CHANGE"), -
 format("Z,ZZZ,ZZZ.XX-")
 
.field netamt, d8.2, pos(11,1), prompt("Non-discount amt"), fpos(11,22), -
 help(APNETAMT), negative, change_method("ANYFLD_CHANGE"), -
 format("ZZZ,ZZZ.XX-")
 
.field discamt, d8.2, pos(12,1), prompt("Discount amount"), fpos(12,22), -
 help(APDSCAMT), negative, change_method("ANYFLD_CHANGE"), -
 format("ZZZ,ZZZ.XX-")
 
.field invdesc, a25, pos(13,1), prompt("Invoice comments"), fpos(13,20), -
 help(APINVDESC)
 
.field pono, d6, pos(14,1), prompt("Purchase order"), fpos(14,20), -
 help(APPONUM), change_method("ANYFLD_CHANGE")
 
.field pay, d2, pos(9,35), prompt("Times to pay"), fpos(9,54), -
 help(APRECRPAY)
 
.field paid, d2, pos(10,35), prompt("Times paid"), fpos(10,54)
 
.structure rec1, <2>,vendor,invcnum,<4>,freq,type,invdate,termsc,-
	duedate,dscdate,invamt,netamt,discamt,<6>,pono,invdesc,pay,paid
.set set_add, rec1, vendor,invcnum,type,freq,termsc,invdate,duedate,dscdate,-
	invamt,netamt,discamt,invdesc,pono,pay
.set set_chg, rec1, type,freq,termsc,invdate,duedate,dscdate,invamt,netamt,-
	discamt,invdesc,pono,pay
.set set_show, rec1, vendor,invcnum,type,freq,termsc,invdate,duedate,dscdate,-
	invamt,netamt,discamt,invdesc,pono,pay,paid
.button detl, text("Entries")
.button_set bottom, end
.end
;
;===ap4100l=========================================================== 
.listclass l_ap4100l, items(10), headers(1), footers(1), -
 load_method("APLL_AP4100")
.end
;
;===ap4100l=========================================================== 
.input i_ap4100l, 1, 36
.placement 10, 8
.title " Distributions "
.field l_no, d3, pos(1,1)
.field l_deleted, a1, pos(1,4)
.field l_acct, a6, pos(1,5)
.field l_div, a4, pos(1,12)
.field l_dept, a4, pos(1,17)
.field l_amount, d10.2, pos(1,22), format("ZZ,ZZZ,ZZZ.XX-")
.structure rec1, l_no,l_acct,l_div,l_dept,l_amount,l_deleted
.set set1, rec1, l_no,l_deleted,l_acct,l_div,l_dept,l_amount
.end
;
;===================================================================== 
.input ap4100l, 10, 55
.placement 12, 45
.title ' Distribution ', highlight
.paint _

.field iccomp, a2, pos(1,1), prompt("Company"), fpos(1,16), -
 help(GLICCOMP), change_method("ANYFLD_CHANGE")
.field iccomp_descr, a30, fpos(1,25)

.field acct, a6, pos(2,1), prompt("Account"), fpos(2,16), -
 help(GLGENACT), user('#Drill/Opt#'), drill_method("GLACCT_FIND"), -
 change_method("GLACCT_CHANGE"), hyperlink_method("GLACCT_HYPER")
.field acct_descr, a30, fpos(2,25)

.field div, a4, pos(3,1), prompt("Division"), fpos(3,16), -
 help(GLDIVSNO), user('#Drill/Opt#'), drill_method("GLDIVS_FIND"), -
 change_method("GLDIVS_CHANGE")

.field dept, a4, pos(4,1), prompt("Department"), fpos(4,16), -
 help(GLDEPTNO), user('#Drill/Opt#'), drill_method("GLDEPT_FIND"), -
 change_method("GLDEPT_CHANGE")

.field descr, a25, pos(5,1), prompt("Description"), fpos(5,16), -
 help(APTRNDESC), change_method("ANYFLD_CHANGE")

.field amount, d9.2, pos(6,1), prompt("Amount"), fpos(6,16), -
 help(APAMOUNT), negative, format("ZZ,ZZZ,ZZZ.XX-")

.field p1099, a3, pos(7,1), prompt("1099 code"), fpos(7,16), -
 help(AP1099CODE), selwnd(0,3,code1099)

.field unit, d10.2, pos(8,1), prompt("Units"), fpos(8,16), -
 help(APUNITS), negative, change_method("ANYFLD_CHANGE"), -
 format("ZZ,ZZZ,ZZZ.XX-")

.field cost, a6, pos(9,1), prompt("Cost center ID"), fpos(9,16), -
 help(APCOSTID), copy, user("#Drill/Opt"), drill_method("cccost_find"), -
 hyperlink_method("cccost_hyper"), change_method("ANYFLD_CHANGE")
.field cost_descr, a30, fpos(9,25)

.field catg, a3, pos(10,1), prompt("Cost category"), fpos(10,16), -
 help(APCOSTCATG), copy, user("#Drill/Opt/E#"), drill_method("smcode_find"), -
 change_method("smcode_change")
.field catg_descr, a30, fpos(10,25)

.structure rec1, <26>,acct,div,dept,amount,unit,descr,p1099,catg,cost,iccomp
.set set1, rec1, iccomp,acct,div,dept,descr,amount,p1099,unit,cost,catg
.set setd, rec1, iccomp,acct,div,dept,descr,amount,p1099,unit,cost,catg
.button i_ok, text("OK"), select(O)
.button abort, text("Cancel"), select(C)
.button_set bottom, end
.end
;
;=====================================================================;
.input ap4105, 2, 25
.placement 3, 5
.title ' A/P Recurring Entries Proof ', highlight
.paint _
 
.field pstfreq, a2, pos(1,1), prompt("Frequency"), fpos(1,15), -
 help(APPSTFRE), uc, default("*"), required
 
.end
;
;=====================================================================;
.input ap4120, 6, 62
.placement 3, 5
.title ' Recurring Invoice ', highlight
.line Line1, 62, pos(4,1), horizontal
.paint _
 
.field strvend, d8, pos(1,1), prompt("Starting vendor ID"), fpos(1,20), -
 help(APRCRSTRVEND), default(0), user('#Drill/All/V#'), -
 drill_method("APVEND_FIND"), change_method("NAMAST_CHANGE")
.field strvend_descr, a30, fpos(1,31)
 
.field endvend, d8, pos(2,1), prompt("Ending vendor ID"), fpos(2,20), -
 help(APRCRENDVEND), default(99999999), user('#Drill/All/V#'), -
 drill_method("APVEND_FIND"), change_method("NAMAST_CHANGE")
.field endvend_descr, a30, fpos(2,31)
 
.field freq, a2, pos(3,1), prompt("Frequency"), fpos(3,20), -
 help(APRCRFREQ), uc, required
 
.field pstdate, d8, pos(5,1), prompt("Posting date"), fpos(5,20), -
 help(APRCRPSTDATE), date(today)
 
.structure rec1, strvend,endvend,freq,<12>,pstdate
.set set1, rec1, strvend,endvend,freq,pstdate
.end
;
;=============================================================== 
.input ap4500, 9, 76
.placement 3, 10
.title ' Manually Pay Invoice ', highlight
.line Line1, 75, pos(4,1), horizontal
.line Line2, 5, pos(4,38), vertical
.paint _

.field vendor, d8, pos(1,1), prompt("Vendor ID"), fpos(1,18), -
 help(APTRANVN), user('#Drill/Req/V#'), -
 drill_method("APVEND_FIND"), change_method("NAMAST_CHANGE")
.field vendor_descr, a30, fpos(1,30)

.field vochnum, d6, pos(2,1), prompt("Voucher number"), fpos(2,20), -
 help(APVOCHNO), default(999999)

.field invcnum, a12, pos(3,1), prompt("Invoice number"), fpos(3,21), -
 help(APINVCNO), default("*")

.field status, a1, pos(3,42), prompt("Status"), fpos(3,53)
.field status_descr, a20, fpos(3,55)

.field invdate, d8, pos(5,1), prompt("Invoice date"), fpos(5,21), -
 date

.field duedate, d8, pos(6,1), prompt("Due date"), fpos(6,21), -
 date

.field invamt, d9.2, pos(7,1), prompt("Invoice amount"), fpos(7,20), -
 negative, format("Z,ZZZ,ZZZ.XX-")

.field discamt, d8.2, pos(8,1), prompt("Discount amount"), fpos(8,22), -
 format("ZZZ,ZZZ.XX-")

.field checkno, d6, pos(5,42), prompt("Check number"), fpos(5,61), -
 help(APCHKNUM), change_method("ANYFLD_CHANGE")

.field checkdt, d8, pos(6,42), prompt("Check date"), fpos(6,61), -
 help(APCHKDTE), date(today), required

.field chkamt, d9.2, pos(7,42), prompt("Check amount"), fpos(7,61), -
 help(APCHKAMT), negative, copy, format("Z,ZZZ,ZZZ.XX-"), required

.field disctakn, d8.2, pos(8,42), prompt("Discount taken"), fpos(8,61), -
 help(APCHKDSC), negative, format("ZZZ,ZZZ.XX-")

.structure rec1, <2>,vendor,vochnum,<1>,invcnum,invdate,<3>,duedate,-
	<8>,invamt,discamt,status,checkno,checkdt,chkamt,disctakn,<53>
.set set_chg, rec1, checkno,checkdt,chkamt,disctakn
.set set_show, rec1, vendor,vochnum,invcnum,invdate,duedate,-
	invamt,discamt,status,checkno,checkdt,chkamt,disctakn
.end
;
;==tah============================================================= 
.input ap4600, 7, 70
.placement 3, 10
.title ' Change Due Date ', highlight
.line Line1, 69, pos(4,1), horizontal
.line Line2, 3, pos(4,34), vertical
.paint _
 
.field vendor, d8, pos(1,1), prompt("Vendor ID"), fpos(1,18), -
 help(APTRANVN), user('#Drill/Req/V#'), -
 drill_method("APVEND_FIND"), change_method("NAMAST_CHANGE")
.field vendor_descr, a30, fpos(1,30)
 
.field vochnum, d6, pos(2,1), prompt("Voucher number"), fpos(2,20), -
 help(APVOCHNO)
 
.field invcnum, a12, pos(3,1), prompt("Invoice number"), fpos(3,21), -
 help(APINVCNO)
 
.field invdate, d8, pos(5,1), prompt("Invoice date"), fpos(5,21), -
 date
 
.field invamt, d9.2, pos(6,1), prompt("Invoice amount"), fpos(6,20), -
 format("Z,ZZZ,ZZZ.XX")
 
.field duedate, d8, pos(5,37), prompt("Due date"), fpos(5,55), -
 date
 
.field dscdate, d8, pos(6,37), prompt("Discount date"), fpos(6,55), -
 date
 
.structure rec1, <2>,vendor,vochnum,<1>,invcnum,invdate,<3>,duedate,-
	dscdate,invamt,<93>
.set set_chg, rec1, duedate,dscdate
.set set_show, rec1, vendor,vochnum,invcnum,invdate,duedate,dscdate,invamt
.end
;
;===============================================================
.input ap5000, 2, 50
.placement 3, 5
.title ' Payment Selection ', highlight
.paint _

.field option, a1, pos(1,1), prompt("Option"), fpos(1,8), -
 help(UTSELFUN), -
 select(0,3,,"1-select individual invoice","2-select by due date",-
	"3-partial payment","4-check preview report by vendor id",-
	"5-check preview report by vendor name","6-clear individual invoice",-
	"7-clear all invoice selections")

.structure rec1, option
.set set1, rec1, option
.end
;
;=============================================================== 
.input ap5010, 7, 66
.placement 7, 15
.title ' Select Individual Invoice ', highlight
.line Line1, 66, pos(4,1), horizontal
.paint _

.field vendor, d8, pos(1,1), prompt("Vendor ID"), fpos(1,20), -
 help(APSELTVN), copy, user('#Drill/Req/V#'), -
 drill_method("APVEND_FIND"), change_method("ANYFLD_CHANGE")
.field vendor_descr, a30, fpos(1,32)

.field vochnum, d6, pos(2,1), prompt("Voucher number"), fpos(2,20), -
 help(APVOCHNO), default(999999)

.field invcnum, a12, pos(3,1), prompt("Invoice number"), fpos(3,20), -
 help(APINVOIC), default("*")

.field invdate, d8, pos(5,1), prompt("Invoice date"), fpos(5,20), -
 date

.field duedate, d8, pos(6,1), prompt("Due date"), fpos(6,20), -
 date

.field invamt, d9.2, pos(7,1), prompt("Invoice amount"), fpos(7,20), -
 format("Z,ZZZ,ZZZ.XX-")

.field correct, a1, pos(3,40), prompt("Correct record"), fpos(3,58), -
 help(UTYNNDEF), selwnd(0,3,yesquit)

.structure rec1, vendor,vochnum,invcnum,invdate,duedate,invamt,correct
.set set1, rec1, vendor,vochnum,invcnum
.set set2, rec1, correct
.end
;
;=============================================================== 
.input ap5020, 12, 66
.placement 7, 15
.title ' Select by Due Date ', highlight
.line Line1, 66, pos(4,1), horizontal
.line Line2, 66, pos(9,1), horizontal
.paint _

.field duedtc, d8, pos(1,1), prompt("Due date cut-off"), fpos(1,20), -
 help(APDUECUT), date(today)

.field paydat, d8, pos(2,1), prompt("Payment date"), fpos(2,20), -
 help(APPAYDAT), date(today)

.field credits, a1, pos(3,1), prompt("Include credits"), fpos(3,20), -
 help(APPAYDATCR), selwnd(0,3,yesno)

.text Text1, pos(5,22)
\rInvoices to be Deferred\-r

.field vendor, d8, pos(6,1), prompt("Vendor ID"), fpos(6,20), -
 help(APSELTVN), user('#Drill/Req/V#'), -
 drill_method("APVEND_FIND"), change_method("ANYFLD_CHANGE")
.field vendor_descr, a30, fpos(6,31)

.field vochnum, d6, pos(7,1), prompt("Voucher number"), fpos(7,20), -
 help(APVOCHNO), default(999999)

.field invcnum, a12, pos(8,1), prompt("Invoice number"), fpos(8,20), -
 help(APINVOIC), default("*")

.field correct, a1, pos(8,40), prompt("Correct record"), fpos(8,58), -
 help(UTYNNDEF), selwnd(0,3,yesquit)

.field invdate, d8, pos(10,1), prompt("Invoice date"), fpos(10,20), -
 date

.field duedate, d8, pos(11,1), prompt("Due date"), fpos(11,20), -
 date

.field invamt, d9.2, pos(12,1), prompt("Invoice amount"), fpos(12,20), -
 format("Z,ZZZ,ZZZ.XX")

.structure rec1, duedtc,paydat,credits,vendor,vochnum,invcnum,invdate, -
	duedate,invamt,correct
.set set1, rec1, duedtc,paydat,credits
.set set2, rec1, vendor,vochnum,invcnum
.set set3, rec1, correct
.end
;
;=============================================================== 
.input ap5030, 8, 68
.placement 7, 15
.title ' Partial Payment Selection ', highlight
.line Line1, 66, pos(4,1), horizontal
.paint _

.field vendor, d8, pos(1,1), prompt("Vendor ID"), fpos(1,20), -
 help(APSELTVN), user('#Drill/Req/V#'), -
 drill_method("APVEND_FIND"), change_method("ANYFLD_CHANGE")
.field vendor_descr, a30, fpos(1,32)

.field vochnum, d6, pos(2,1), prompt("Voucher number"), fpos(2,20), -
 help(APVOCHNO), default(999999)

.field invcnum, a12, pos(3,1), prompt("Invoice number"), fpos(3,20), -
 help(APINVOIC), default("*")

.field correct, a1, pos(3,40), prompt("Correct record"), fpos(3,58), -
 help(UTYNNDEF), selwnd(0,3,yesquit)

.field invdate, d8, pos(5,1), prompt("Invoice date"), fpos(5,20), -
 date

.field duedate, d8, pos(6,1), prompt("Due date"), fpos(6,20), -
 date

.field invamt, d9.2, pos(7,1), prompt("Invoice amount"), fpos(7,20), -
 format("Z,ZZZ,ZZZ.XX-")

.field dscamt, d8.2, pos(8,1), prompt("Discount amount"), fpos(8,22), -
 format("ZZZ,ZZZ.XX-")

.field pmtamt, d9.2, pos(7,35), prompt("Partial payment"), fpos(7,54), -
 help(APPAYAMT), negative, format("Z,ZZZ,ZZZ.XX-")

.field pmtdsc, d8.2, pos(8,35), prompt("Partial discount"), fpos(8,56), -
 help(APPAYDSC), negative, format("ZZZ,ZZZ.XX-")

.structure rec1, vendor,vochnum,invcnum,invdate,duedate,invamt,-
	dscamt,correct,pmtamt,pmtdsc
.set set1, rec1, vendor,vochnum,invcnum
.set set2, rec1, correct
.set set3, rec1, pmtamt,pmtdsc
.end
;
;=============================================================== 
.input ap5040, 2, 38
.placement 7, 25
.title ' Check Preview Report ', highlight
.paint _

.field paydat, d8, pos(1,1), prompt("Payment date"), fpos(1,25), -
 help(APPREDAT), date(today)

.end
;
;=============================================================== 
.input ap5060, 7, 66
.placement 7, 15
.title ' Clear Individual Invoice ', highlight
.line Line1, 66, pos(4,1), horizontal
.paint _

.field vendor, d8, pos(1,1), prompt("Vendor ID"), fpos(1,20), -
 help(APSELTVN), user('#Drill/Req/V#'), -
 drill_method("APVEND_FIND"), change_method("ANYFLD_CHANGE")
.field vendor_descr, a30, fpos(1,32)

.field vochnum, d6, pos(2,1), prompt("Voucher number"), fpos(2,20), -
 help(APVOCHNO), default(999999)

.field invcnum, a12, pos(3,1), prompt("Invoice number"), fpos(3,20), -
 help(APINVOIC), default("*")

.field correct, a1, pos(3,40), prompt("Correct record"), fpos(3,58), -
 help(UTYNNDEF), selwnd(0,3,yesquit)

.field invdate, d8, pos(5,1), prompt("Invoice date"), fpos(5,20), -
 date

.field duedate, d8, pos(6,1), prompt("Due date"), fpos(6,20), -
 date

.field invamt, d9.2, pos(7,1), prompt("Invoice amount"), fpos(7,20), -
 format("Z,ZZZ,ZZZ.XX")

.structure rec1, vendor,vochnum,invcnum,invdate,duedate,invamt,correct
.set set1, rec1, vendor,vochnum,invcnum
.set set2, rec1, correct
.end
;
;=============================================================== 
.input ap5200, 4, 66
.placement 3, 5
.title ' A/P Checks ', highlight
.paint _

.field chkdte, d8, pos(1,1), prompt("Check date"), fpos(1,24), -
 help(APCHKDTA), date(today), required

.field chkno, d6, pos(2,1), prompt("Beginning check number"), fpos(2,24), -
 help(APBCHKNO), required, format("XXXXXX")

.field strven, d8, pos(3,1), prompt("Starting vendor"), fpos(3,24), -
 help(APSTRVEN), default(0), user('#Drill/All/V#'), -
 drill_method("APVEND_FIND"), change_method("NAMAST_CHANGE")
.field strven_descr, a30, fpos(3,35), paint(" ")

.field endven, d8, pos(4,1), prompt("Ending vendor"), fpos(4,24), -
 help(APENDVEN), default(99999999), user('#Drill/All/V#'), -
 drill_method("APVEND_FIND"), change_method("NAMAST_CHANGE")
.field endven_descr, a30, fpos(4,35), paint(" ")

.structure rec1, chkdte,chkno,strven,endven
.set set1, rec1, chkdte,chkno,strven,endven
.end
; 
;===================================================================
.input ap5202, 4, 62
.placement 3, 5
.title ' A/P Laser Checks ', highlight
.paint _
 
.field bankno, d2, pos(1,1), prompt("Bank number"), fpos(1,18), -
 help(APCHKBANKNO),  default(1), user('#Drill/Req#'), -
 drill_method("GLBANK_FIND"), change_method("ANYFLD_CHANGE")
.field bankno_descr, a30, pos(1,24)
 
.field chkdte, d8, pos(2,1), prompt("Check date"), fpos(2,18), -
 help(APCHKDTA), date(today), required
 
.field strven, d8, pos(3,1), prompt("Starting vendor"), fpos(3,18), -
 help(APSTRVEN), default(0), user('#Drill/All/V#'), -
 drill_method("APVEND_FIND"), change_method("NAMAST_CHANGE")
.field strven_descr, a30, fpos(3,30), paint(" ")
 
.field endven, d8, pos(4,1), prompt("Ending vendor"), fpos(4,18), -
 help(APENDVEN), default(99999999), user('#Drill/All/V#'), -
 drill_method("APVEND_FIND"), change_method("NAMAST_CHANGE")
.field endven_descr, a30, fpos(4,30), paint(" ")
 
.structure rec1, bankno,chkdte,strven,endven
.set set1, rec1, bankno,chkdte,strven,endven
.end
; 
;===================================================================
.input ap5209, 5, 55
.placement 3, 5
.title ' A/P Blank Checks ', highlight
.paint _
 
.field bankno, d2, pos(1,1), prompt("Bank number"), fpos(1,24), -
 help(APCHKBANKNO),  default(1), user('#Drill/Req#'), -
 drill_method("GLBANK_FIND"), change_method("ANYFLD_CHANGE")
.field bankno_descr, a30, pos(1,22)

.field chkdte, d8, pos(2,1), prompt("Check date"), fpos(2,24), -
 help(APCHKDTA), date(today)
 
.field nochecks, d2, pos(3,1), prompt("Number to print"), fpos(3,24), -
 help(APCHKNOCHECKS), default(1), change_method("ANYFLD_CHANGE")
 
.field vendor, d8, pos(4,1), prompt("Vendor"), fpos(4,24), -
 help(APCHKVENDOR), user('#Drill/Opt/V#'), -
 drill_method("APVEND_FIND"), change_method("NAMAST_CHANGE")
.field vendor_descr, a30, fpos(5,5), paint(" ")
 
.structure rec1, bankno,chkdte,nochecks,vendor
.set set1, rec1, bankno,chkdte,nochecks,vendor
.end
;
;=============================================================== 
.input ap5220, 4, 34
.placement 3, 5
.title ' A/P Check Posting ', highlight
.paint _
 
.text Text1, pos(1,10)
Account
.text Text2, pos(1,23)
Div
.text Text3, pos(1,28)
Dept
 
.field apacct, a6, pos(2,1), prompt("A/P"), fpos(2,11), -
 help(APINVPST), user("#Drill/Req#"), drill_method("GLACCT_FIND")
.field apacct_div, a4, fpos(2,23), -
 help(APINVPSTDIV)
.field apacct_dept, a4, fpos(2,28), -
 help(APINVPSTDPT)
 
.field cshacct, a6, pos(3,1), prompt("Cash"), fpos(3,11), -
 help(APCSHPST), user("#Drill/Req#"), drill_method("GLACCT_FIND"), required
.field cshacct_div, a4, fpos(3,23), -
 help(APCSHPSTDIV)
.field cshacct_dept, a4, fpos(3,28), -
 help(APCSHPSTDPT)
 
.field dscacct, a6, pos(4,1), prompt("Discount"), fpos(4,11), -
 help(APDSCPST), user("#Drill/Req#"), drill_method("GLACCT_FIND")
.field dscacct_div, a4, fpos(4,23), -
 help(APDSCPSTDIV)
.field dscacct_dept, a4, fpos(4,28), -
 help(APDSCPSTDPT)
 
.end
;
;=============================================================== 
.input ap6300, 9, 64
.placement 3, 5
.title ' Aged Trial Balance ', highlight
.paint _

.field agedat, d8, pos(1,1), prompt("Aging date"), fpos(1,22), -
 help(APAGEDAT), date(today)

.field cutoff, d8, pos(2,1), prompt("Cut-off date"), fpos(2,22), -
 help(APASOFDT), date(today)

.field mode, a1, pos(3,1), prompt("Report sequence"), fpos(3,22), -
 help(APTBMODE), select(1,3,,"ID","Name")

.field detail, a1, pos(4,1), prompt("Report type"), fpos(4,22), -
 help(APTBDORS), select(1,3,,"Detail","Summary","Totals")

.field strven, d8, pos(5,1), prompt("Starting vendor"), fpos(5,22), -
 help(APSTRVEN), default(0), user('#Drill/All/V#'), -
 drill_method("APVEND_FIND"), change_method("NAMAST_CHANGE") 
.field strven_descr, a30, fpos(5,33)

.field endven, d8, pos(6,1), prompt("Ending vendor"), fpos(6,22), -
 help(APENDVEN), default(99999999), user('#Drill/All/V#'), -
 drill_method("APVEND_FIND"), change_method("NAMAST_CHANGE") 
.field endven_descr, a30, fpos(6,33)

.field strgrp, d2, pos(7,1), prompt("Starting group"), fpos(7,22), -
 help(APSTRGRP), default(0)

.field endgrp, d2, pos(8,1), prompt("Ending group"), fpos(8,22), -
 help(APENDGRP),default(99)

.structure rec1, agedat,cutoff,mode,detail,strven,endven,strgrp,endgrp
.set set1, rec1, agedat,cutoff,mode,detail,strven,endven,strgrp,endgrp
.end
;
;
;=============================================================== 
.input ap6400, 2, 35
.placement 3, 5
.title ' Cash Requirements ', highlight
.paint _

.field paydat, d8, pos(1,1), prompt("For payment on"), fpos(1,22), -
 help(APCASHDT), date(today)

.field duedat, d8, pos(2,1), prompt("Due on or before"), fpos(2,22), -
 help(APDUEDAT), date(today)

.structure rec1, paydat,duedat
.set set1, rec1, paydat,duedat
.end
;
;=============================================================== 
.input ap6500, 2, 35
.placement 3, 5
.title ' Vendor Volume Analysis ', highlight
.paint _

.field inactv, a1, pos(1,1), prompt("Show inactive vendors"), fpos(1,24), -
 help(APSHOINA), selwnd(0,3,noyes)

.field year, d4, pos(2,1), prompt("Year to print"), fpos(2,24), -
 help(APYRTOPRINT), required, copy

.structure rec1, inactv,year
.set set1, rec1, inactv,year
.end
;
;=============================================================== 
.input ap6600, 10, 64
.placement 3, 5
.title ' Vendor History Report ', highlight
.paint _
 
.field strcomp, a2, pos(1,1), prompt("Starting company"), fpos(1,22), -
 help(APSTRCOMP)

.field endcomp, a2, pos(2,1), prompt("Ending company"), fpos(2,22), -
 help(APENDCOMP)

.field strven, d8, pos(3,1), prompt("Starting vendor"), fpos(3,22), -
 help(APSTRVEN), default(0), user('#Drill/All/V#'), -
 drill_method("APVEND_FIND"), change_method("NAMAST_CHANGE")
.field strven_descr, a30, fpos(3,33)
 
.field endven, d8, pos(4,1), prompt("Ending vendor"), fpos(4,22), -
 help(APENDVEN), default(99999999), user('#Drill/All/V#'), -
 drill_method("APVEND_FIND"), change_method("NAMAST_CHANGE")
.field endven_descr, a30, fpos(4,33)
 
.field strinvc, a12, pos(5,1), prompt("Starting invoice"), fpos(5,22), -
 help(APSTRINVC), default("*")
 
.field endinvc, a12, pos(6,1), prompt("Ending invoice"), fpos(6,22), -
 help(APENDINVC), default("*")
 
.field strdat, d8, pos(7,1), prompt("Starting date"), fpos(7,22), -
 help(APSTRDAT), date, default(010101)
 
.field enddat, d8, pos(8,1), prompt("Ending date"), fpos(8,22), -
 help(APENDDAT), date(today)
 
.field rptseq, a1, pos(9,1), prompt("Sequence"), fpos(9,22), -
 help(APRPTSEQ), select(1,3,,"ID","Name","V:invoice")
 
.field inclgl, a1, pos(10,1), prompt("Include GL"), fpos(10,22), -
 help(APINCLGL), selwnd(1,3,noyes)
 
.structure rec1, strcomp,endcomp,strven,endven,strinvc,endinvc, -
	strdat,enddat,rptseq,inclgl
.set set1, rec1, strcomp,endcomp,strven,endven,strinvc,endinvc, -
	strdat,enddat,rptseq,inclgl
.end
;
;=============================================================== 
.input ap6700, 9, 64
.placement 3, 5
.title ' A/P to G/L Distribution Report ', highlight
.paint _
 
.field enddat, d8, pos(1,1), prompt("Period ending date"), fpos(1,22), -
 help(APGLPRDT), date(today)
 
.field stracct, a6, pos(2,1), prompt("Starting account"), fpos(2,22), -
 help(APSTRACCT), default("*"), user('#Drill/All#'), -
 drill_method("GLACCT_FIND"), change_method("GLACCT_CHANGE")
.field stracct_descr, a30, fpos(2,32)
 
.field endacct, a6, pos(3,1), prompt("Ending account"), fpos(3,22), -
 help(APENDACCT), default("*"), user('#Drill/All#'), -
 drill_method("GLACCT_FIND"), change_method("GLACCT_CHANGE")
.field endacct_descr, a30, fpos(3,32)
 
.field strdivs, a4, pos(4,1), prompt("Starting division"), fpos(4,22), -
 help(APSTRDIVNO), default("*"), user('#Drill/All#'), -
 drill_method("GLDIVS_FIND"), change_method("GLDIVS_CHANGE")
.field strdivs_descr, a30, fpos(4,32)
 
.field enddivs, a4, pos(5,1), prompt("Ending division"), fpos(5,22), -
 help(APENDDIVNO), default("*"), user('#Drill/All#'), -
 drill_method("GLDIVS_FIND"), change_method("GLDIVS_CHANGE")
.field enddivs_descr, a30, fpos(5,32)
 
.field strdept, a4, pos(6,1), prompt("Starting department"), fpos(6,22), -
 help(APSTRDEPTNO), default("*"), user('#Drill/All#'), -
 drill_method("GLDEPT_FIND"), change_method("GLDEPT_CHANGE")
.field strdept_descr, a30, fpos(6,32)
 
.field enddept, a4, pos(7,1), prompt("Ending department"), fpos(7,22), -
 help(APENDDEPTNO), default("*"), user('#Drill/All#'), -
 drill_method("GLDEPT_FIND"), change_method("GLDEPT_CHANGE")
.field enddept_descr, a30, fpos(7,32)
 
.field rptseq, a1, pos(8,1), prompt("Report sequence"), fpos(8,22), -
 help(APRPTSEQ), select(1,3,,"Account","Department")
 
.field totals, a1, pos(9,1), prompt("Report type"), fpos(9,22), -
 help(APTOTALS), -
 select(1,3,,"1:Detail","2:Totals only","3:Detail/no day totals", -
	     "4:Totals only/no day totals")
 
.structure rec1, enddat,stracct,endacct,strdivs,enddivs,strdept,enddept, -
	rptseq,totals
.set set1, rec1, enddat,stracct,endacct,strdivs,enddivs,strdept,enddept, -
	rptseq,totals
.end
;
;=============================================================== 
.input ap6800, 6, 35
.placement 3, 5
.title ' Vendor Check History Report ', highlight
.paint _
 
.field strcomp, a2, pos(1,1), prompt("Starting company"), fpos(1,22), -
 help(APSTRCOMP)

.field endcomp, a2, pos(2,1), prompt("Ending company"), fpos(2,22), -
 help(APENDCOMP)

.field strchk, d6, pos(3,1), prompt("Starting check"), fpos(3,22), -
 help(APSTRCHECK), default(0)
 
.field endchk, d6, pos(4,1), prompt("Ending check"), fpos(4,22), -
 help(APENDCHECK), default(999999)
 
.field strdat, d8, pos(5,1), prompt("Starting date"), fpos(5,22), -
 help(APSTRCHKDAT), date, default(010101)
 
.field enddat, d8, pos(6,1), prompt("Ending date"), fpos(6,22), -
 help(APENDCHKDAT), date(today)
 
.structure rec1, strcomp,endcomp,strchk,endchk,strdat,enddat
.set set1, rec1, strcomp,endcomp,strchk,endchk,strdat,enddat
.end
;
;=============================================================== 
.input ap6900, 4, 35
.placement 3, 5
.title ' Balancing Report ', highlight
.paint _

.field cutoff, d8, pos(1,1), prompt("Cut-off date"), fpos(1,22), -
 help(APASOFDT), date(today)

.field detail, a1, pos(2,1), prompt("Report type"), fpos(2,22), -
 help(APTBDORS), select(1,3,,"Detail","Summary")

.field age, a1, pos(3,1), prompt("Age detail"), fpos(3,22), -
 help(APBRAGE), selwnd(1,3,noyes)

.field sortby, a1, pos(4,1), prompt("Report sequence"), fpos(4,22), -
 help(APBRSORTBY), select(1,3,,"ID","Name")

.structure rec1, cutoff,detail,age,sortby
.set set1, rec1, cutoff,detail,age,sortby
.end
;
;=============================================================== 
.input ap7010, 2, 20
.placement 3, 25
.title ' 1099 Year ', highlight
.paint _
 
.field year, d4, pos(1,1), prompt("Year"), fpos(1,12), -
 help(AP1099YR), format('XXXX'), range(1900,2100)

.field type, a1, pos(2,1), prompt("Type"), fpos(2,12), -
 help(AP1099TYPE), select(1,3,,"Misc","Div")
 
.structure rec1, year,type
.set set1, rec1, year,type
.end
;
;=============================================================== 
.input ap7010m, 17, 85
.placement 3, 15
.title ' 1099-MISC Maintenance ', highlight
.line Line1, 84, pos(2,1), horizontal
.paint _

.field year, d4, pos(1,1), prompt("Year"), fpos(1,15), -
 help(AP1099YR), format('XXXX'), copy

.field vend, d8, pos(1,39), prompt("Vendor ID"), fpos(1,50), -
 help(APVENDNO), default(0), user('#Drill/Req/V#'), -
 drill_method("APVEND_FIND"), change_method("namast_change") 

.field vend_descr, a30, pos(3,1), prompt("Name"), fpos(3,15)
.field add1, a30, pos(4,1), prompt("Address 1"), fpos(4,15)
.field add2, a30, pos(5,1), prompt("Address 2"), fpos(5,15)
.field city, a20, pos(6,1), prompt("City"), fpos(6,15)
.field stat, a2, pos(7,1), prompt("State"), fpos(7,15)
.field zip, a9, pos(8,1), prompt("Zip code"), fpos(8,15)
.field ssn, a11, pos(9,1), prompt("SSN or Fed ID"), fpos(9,15)
.field v1099, a1, pos(10,1), prompt("Print 1099"), fpos(10,15)

.field printed, a1, pos(11,1), prompt("1099 status"), fpos(11,15), -
 help(AP1099STAT), select(0,3,,"N:not printed","X:do not print","Y:printed")

.field box1, d10.2, pos(3,45), prompt("1:Rents"), fpos(3,69), -
 help(AP1099B1), format("ZZ,ZZZ,ZZZ.XX-")

.field box2, d10.2, pos(4,45), prompt("2:Royalties"), fpos(4,69), -
 help(AP1099B2), format("ZZ,ZZZ,ZZZ.XX-")

.field box3, d10.2, pos(5,45), prompt("3:Other income"), fpos(5,69), -
 help(AP1099B3), format("ZZ,ZZZ,ZZZ.XX-")

.field box4, d10.2, pos(6,45), prompt("4:Fed inc tax wh"), fpos(6,69), -
 help(AP1099B4), format("ZZ,ZZZ,ZZZ.XX-")

.field box5, d10.2, pos(7,45), prompt("5:Fishing boat"), fpos(7,69), -
 help(AP1099B5), format("ZZ,ZZZ,ZZZ.XX-")

.field box6, d10.2, pos(8,45), prompt("6:Med/health pymts"), fpos(8,69), -
 help(AP1099B6), format("ZZ,ZZZ,ZZZ.XX-")

.field box7, d10.2, pos(9,45), prompt("7:Nonemployee comp"), fpos(9,69), -
 help(AP1099B7), format("ZZ,ZZZ,ZZZ.XX-")

.field box8, d10.2, pos(10,45), prompt("8:Substitute pymts"), fpos(10,69), -
 help(AP1099B8), format("ZZ,ZZZ,ZZZ.XX-")

.field box9, a1, pos(11,45), prompt("9:Sales for resale"), fpos(11,69), -
 help(AP1099B9), selwnd(0,3,noyes)

.field box10, d10.2, pos(12,44), prompt("10:Crop insurance"), fpos(12,69), -
 help(AP1099B10), format("ZZ,ZZZ,ZZZ.XX-")

.field box11, d10.2, pos(13,44), prompt("11:unused"), fpos(13,69), -
 help(AP1099B11), format("ZZ,ZZZ,ZZZ.XX-")

.field box12, d10.2, pos(14,44), prompt("12:unused"), fpos(14,69), -
 help(AP1099B12), format("ZZ,ZZZ,ZZZ.XX-")

.field box13, d10.2, pos(15,44), prompt("13:Golden parachute"), fpos(15,69), -
 help(AP1099B13), format("ZZ,ZZZ,ZZZ.XX-")

.field box14, d10.2, pos(16,44), prompt("14:Attorney"), fpos(16,69), -
 help(AP1099B14), format("ZZ,ZZZ,ZZZ.XX-")

.structure rec1, year,<3>,vend,printed,box1,box2,box3,box4,box5,box6,box7, -
	box8,box9,box10,box11,box12,box13,box14
.set set_add, rec1, vend,printed,box1,box2,box3,box4,box5,box6,box7,box8, -
	box9,box10,box11,box12,box13,box14
.set set_chg, rec1, printed,box1,box2,box3,box4,box5,box6,box7,box8, -
	box9,box10,box11,box12,box13,box14
.set set_show, rec1, year,vend,printed,box1,box2,box3,box4,box5,box6,box7,box8, -
	box9,box10,box11,box12,box13,box14
.end
;
;=============================================================== 
.input ap7010d, 16, 78
.placement 3, 5
.title ' 1099-DIV Maintenance ', highlight
.line Line1, 78, pos(2,1), horizontal
.paint _

.field year, d4, pos(1,1), prompt("Year"), fpos(1,15), -
 help(AP1099YR), format('XXXX'), copy

.field vend, d8, pos(1,39), prompt("Vendor ID"), fpos(1,50), -
 help(APVENDNO), default(0), user('#Drill/Req/V#'), -
 drill_method("APVEND_FIND"), change_method("NAMAST_CHANGE")

.field vend_descr, a30, pos(3,1), prompt("Name"), fpos(3,15)
.field add1, a30, pos(4,1), prompt("Address 1"), fpos(4,15)
.field add2, a30, pos(5,1), prompt("Address 2"), fpos(5,15)
.field city, a20, pos(6,1), prompt("City"), fpos(6,15)
.field stat, a2, pos(7,1), prompt("State"), fpos(7,15)
.field zip, a9, pos(8,1), prompt("Zip code"), fpos(8,15)
.field ssn, a11, pos(9,1), prompt("SSN or Fed ID"), fpos(9,15)
.field v1099, a1, pos(10,1), prompt("Print 1099"), fpos(10,15)

.field printed, a1, pos(11,1), prompt("1099 status"), fpos(11,15), -
 help(AP1099STAT), select(0,3,,"N:not printed","X:do not print","Y:printed")

.field box1, d10.2, pos(3,45), prompt("1:Ordinary dividend"), fpos(3,65), -
 help(AP1099B1), format("ZZ,ZZZ,ZZZ.XX-")

.field box2a, d10.2, pos(4,45), prompt("2a:Total cap gains"), fpos(4,65), -
 help(AP10992A), format("ZZ,ZZZ,ZZZ.XX-")

.field box2b, d10.2, pos(5,45), prompt("2b:28% rate gain"), fpos(5,65), -
 help(AP10992B), format("ZZ,ZZZ,ZZZ.XX-")

.field box2c, d10.2, pos(6,45), prompt("2c:5-year gain"), fpos(6,65), -
 help(AP10992C), format("ZZ,ZZZ,ZZZ.XX-")

.field box2d, d10.2, pos(7,45), prompt("2d:Unrecap 1250"), fpos(7,65), -
 help(AP10992D), format("ZZ,ZZZ,ZZZ.XX-")

.field box2e, d10.2, pos(8,45), prompt("2e:Sec 1202 gain"), fpos(8,65), -
 help(AP10992E), format("ZZ,ZZZ,ZZZ.XX-")

.field box3, d10.2, pos(9,45), prompt("3:Nontax distribs"), fpos(9,65), -
 help(AP1099B3), format("ZZ,ZZZ,ZZZ.XX-")

.field box4, d10.2, pos(10,45), prompt("4:Fed tax withheld"), fpos(10,65), -
 help(AP1099B4), format("ZZ,ZZZ,ZZZ.XX-")

.field box5, d10.2, pos(11,45), prompt("5:Invest expenses"), fpos(11,65), -
 help(AP1099B5), format("ZZ,ZZZ,ZZZ.XX-")

.field box6, d10.2, pos(12,45), prompt("6:Foreign tax paid"), fpos(12,65), -
 help(AP1099B6), format("ZZ,ZZZ,ZZZ.XX-")

.field box7, a11, pos(13,45), prompt("7:Name of country"), fpos(13,65), -
 help(AP1099B7)

.field box8, d10.2, pos(14,45), prompt("8:Cash liquidation"), fpos(14,65), -
 help(AP1099B8), format("ZZ,ZZZ,ZZZ.XX-")

.field box9, d10.2, pos(15,45), prompt("9:Noncash liquidatn"), fpos(15,65), -
 help(AP1099B9), format("ZZ,ZZZ,ZZZ.XX-")

.structure rec1, year,<3>,vend,printed,box1,box2a,box2b,box2c,box2d,box2e, -
	box3,box4,box5,box6,box7,box8,box9
.set set_add, rec1, vend,printed,box1,box2a,box2b,box2c,box2d,box2e, -
	box3,box4,box5,box6,box7,box8,box9
.set set_chg, rec1, printed,box1,box2a,box2b,box2c,box2d,box2e,box3, -
	box4,box5,box6,box7,box8,box9
.set set_show, rec1, year,vend,printed,box1,box2a,box2b,box2c,box2d, -
	box2e,box3,box4,box5,box6,box7,box8,box9
.end
;
;=============================================================== 
.input ap7020, 3, 50
.placement 3, 5
.title ' 1099-MISC Report ', highlight
.paint _

.field year, d4, pos(1,1), prompt("Year"), fpos(1,20), -
 help(AP1099YEAR), format('XXXX'), copy

.field printed, a1, pos(2,1), prompt("Status to print"), fpos(2,20), -
 help(UTSELFUN), -
 select(1,3,,"*:all","N:not printed","X:do not print","Y:printed")

.field flag, a1, pos(3,1), prompt("1099 flag to print"), fpos(3,20), -
 help(UTSELFUN), select(0,3,,"*:all","Y:print","N:do not print")

.structure rec1, year,printed,flag
.set set1, rec1, year,printed,flag
.end
;
;================================================================
.input ap7021, 3, 50
.placement 3, 5
.title ' 1099-DIVIDEND Report ', highlight
.paint _

.field year, d4, pos(1,1), prompt("Year"), fpos(1,20), -
 help(AP1099YEAR), format('XXXX'), copy

.field printed, a1, pos(2,1), prompt("Status to print"), fpos(2,20), -
 help(UTSELFUN), -
 select(1,3,,"*:all","N:not printed","X:do not print","Y:printed")

.field flag, a1, pos(3,1), prompt("1099 flag to print"), fpos(3,20), -
 help(UTSELFUN), select(0,3,,"*:all","Y:print","N:do not print")

.structure rec1, year,printed,flag
.set set1, rec1, year,printed,flag
.end
;
;=============================================================== 
.input ap7030, 6, 46
.placement 3, 15
.title ' Set 1099-MISC Limits ', highlight
.paint _

.field year, d4, pos(1,1), prompt("Year"), fpos(1,35), -
 help(AP1099YEAR), format('XXXX'), copy

.field minbox1, d8.2, pos(2,1), prompt("Box 1 minimum payment amount"), fpos(2,35), -
 help(AP1099MA), default(600), format("ZZZ,ZZZ.XX")

.field minbox2, d8.2, pos(3,1), prompt("Box 2 minimum payment amount"), fpos(3,35), -
 help(AP1099MA), default(10), format("ZZZ,ZZZ.XX")

.field minbox6, d8.2, pos(4,1), prompt("Box 6 minimum payment amount"), fpos(4,35), -
 help(AP1099MA), default(600), format("ZZZ,ZZZ.XX")

.field minbox7, d8.2, pos(5,1), prompt("Box 7 minimum payment amount"), fpos(5,35), -
 help(AP1099MA), default(600), format("ZZZ,ZZZ.XX")

.field minbox8, d8.2, pos(6,1), prompt("Box 8 minimum payment amount"), fpos(6,35), -
 help(AP1099MA), default(10), format("ZZZ,ZZZ.XX")

.structure rec1, year,minbox1,minbox2,minbox6,minbox7,minbox8
.set set1, rec1, year,minbox1,minbox2,minbox6,minbox7,minbox8
.end
;
;===============================================================
.input ap7031, 3, 50
.placement 3, 15
.title ' Set 1099-DIVIDEND limits ', highlight
.paint _

.field year, d4, pos(1,1), prompt("Year"), fpos(1,35), -
 help(AP1099YEAR), format('XXXX'), copy

.field minbox1, d8.2, pos(2,1), prompt("Box 1 & 2a minimum payment"), fpos(2,35), -
 help(AP1099DV), default(10), format("ZZZ,ZZZ.ZZ")

.field minbox8, d8.2, pos(3,1), prompt("Box 8 & 9 minimum payment"), fpos(3,35), -
 help(AP1099DV), default(600), format("ZZZ,ZZZ.XX")

.structure rec1, year, minbox1, minbox8
.set set1, rec1, year, minbox1, minbox8
.end
;
;
;=============================================================== 
.input ap7040, 3, 44
.placement 5, 25
.title ' 1099-MISC Forms ', highlight
.paint _
 
.field year, d4, pos(1,1), prompt("Year"), fpos(1,25), -
 help(AP1099YEAR), format('XXXX'), copy
 
.field phone, a14, pos(2,1), prompt("Telephone number"), fpos(2,25), -
 help("AP1099PHON")

.field printed, a1, pos(3,1), prompt("Update printed flag"), fpos(3,25), -
 help(UTSELFUN), selwnd(1,3,yesno)
 
.structure rec1, year,phone,printed
.set set1, rec1, year,phone,printed
.end
;
;==============================================================
.input ap7041, 3, 44
.placement 5, 25
.title ' 1099-DIV Forms ', highlight
.paint _
 
.field year, d4, pos(1,1), prompt("Year"), fpos(1,25), -
 help(AP1099YEAR), format('XXXX'), copy
 
.field phone, a14, pos(2,1), prompt("Telephone number"), fpos(2,25), -
 help("AP1099PHON")

.field printed, a1, pos(3,1), prompt("Update printed flag"), fpos(3,25), -
 help(UTSELFUN), selwnd(1,3,yesno)
 
.structure rec1, year,phone,printed
.set set1, rec1, year,phone,printed
.end
;
;=============================================================== 
.input ap7051, 5, 63
.placement 5, 15
.title ' 1099 Verification Report ', highlight
.paint _

.text Text1, pos(1,3)
Only Vendors identified to receive 1099s but have no 1099
.text Text1, pos(2,6)
history for the year are included in this report.
.field year, d4, pos(4,25), prompt("Year"), fpos(4,35), -
 help(AP1099YEAR), format('XXXX'), copy

.structure rec1, year
.set set1, rec1, year
.end
;=============================================================== 
.input ap8000, 3, 35
.placement 3, 5
.title ' Purge Vendor History ', highlight
.paint _

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

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

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

.structure rec1, purdat,write,confirm
.set set1, rec1, purdat,write,confirm
.end
;
;=============================================================== 
.input ap8100, 4, 64
.placement 3, 5
.title ' Purge Recurring Transactions ', highlight
.paint _

.field strvend, d8, pos(1,1), prompt("Starting vendor"), fpos(1,22), -
 help(APPURSTRVEN), default(0), user('#Drill/All/V#'), -
 drill_method("APVEND_FIND"), change_method("NAMAST_CHANGE") 
.field strvend_descr, a30, fpos(1,33)

.field endvend, d8, pos(2,1), prompt("Ending vendor"), fpos(2,22), -
 help(APPURENDVEN), default(99999999), user('#Drill/All/V#'), -
 drill_method("APVEND_FIND"), change_method("NAMAST_CHANGE") 
.field endvend_descr, a30, fpos(2,33)

.field option, a1, pos(3,1), prompt("Option"), fpos(3,22), -
 help(APPURRECUR), -
 select(0,3,,"Purge records","Reset paid count")

.field confirm, a3, pos(4,1), prompt("Confirm"), fpos(4,22), -
 help(UTCONFRM), default("NO"), -
 upper_case_only, allow(YES,NO)

.structure rec1, strvend,endvend,option,confirm
.set set1, rec1, strvend,endvend,option,confirm
.end
;
;=============================================================== 
.input ap8200, 7, 64
.placement 3, 5
.title ' Purge Check Void History ', highlight
.paint _

.text Text1, pos(1,2)
 This procedure clears all AP invoice history distributions

.text Text2, pos(2,2)
required to process void checks via the AP transaction menu.

.text Text3, pos(3,2)
   This purge does NOT purge AP transaction History.
 
.field strchk, d6, pos(5,1), prompt("Starting check"), fpos(5,22), -
 default(0) 
 
.field endchk, d6, pos(6,1), prompt("Ending check"), fpos(6,22), -
 default(999999)

.field confirm, a3, pos(7,1), prompt("Confirm"), fpos(7,25), -
 help(UTCONFRM), default("NO"), uc, allow(YES,NO)
 
.structure rec1, strchk,endchk,confirm
.set set1, rec1, strchk,endchk,confirm
.end
;
;=============================================================== 
.input ap8300, 3, 64
.placement 3, 5
.title ' Set Vendor Totals ', highlight
.paint _

.field strvend, d8, pos(1,1), prompt("Starting vendor"), fpos(1,22), -
 help(APSBLSTR), default(0), user('#Drill/All/V#'), -
 drill_method("APVEND_FIND"), change_method("NAMAST_CHANGE") 
.field strvend_descr, a30, fpos(1,33)

.field endvend, d8, pos(2,1), prompt("Ending vendor"), fpos(2,22), -
 help(APSBLEND), default(99999999), user('#Drill/All/V#'), -
 drill_method("APVEND_FIND"), change_method("NAMAST_CHANGE") 
.field endvend_descr, a30, fpos(2,33)

.field year, d4, pos(3,1), prompt("Year to set"), fpos(3,22), -
 help(APYRTOPRINT), required

.structure rec1, strvend,endvend,year
.set set1, rec1, strvend,endvend,year
.end
;
;=============================================================== 
.input ap8400, 5, 45
.placement 3, 35
.title ' Clear A/P to G/L Distribution ', highlight
.paint _

.text Text1, pos(1,2)
This procedure clears all G/L distribution 
.text Text2, pos(2,2)
    records through the date entered.

.field enddat, d8, pos(4,5), prompt("Period ending date"), fpos(4,27), -
 help(APGLPUDT), date(today)

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

.structure rec1, enddat,confirm
.set set1, rec1, enddat,confirm
.end
; 
;=============================================================== 
.input ap8500, 3, 35
.placement 3, 5
.title ' Purge 1099 History ', highlight
.paint _
 
.field puryear, d4, pos(1,1), prompt("Purge through year"), fpos(1,22), -
 help(APPURDTE), required
 
.field write, a1, pos(2,1), prompt("Save deleted records"), fpos(2,22), -
 help(UTSAVEDEL), selwnd(1,3,"YESNO")
 
.field confirm, a3, pos(3,1), prompt("Confirm"), fpos(3,22), -
 help(UTCONFRM), default("NO"), -
 upper_case_only, allow(YES,NO)
 
.structure rec1, puryear,write,confirm
.set set1, rec1, puryear,write,confirm
.end
;
;=============================================================== 
.select code1099
.item "   :None"
.item "M07:Nonemployee comp"
.item "M01:Rents"
.item "M02:Royalties"
.item "M03:Prizes and Awards"
.item "M04:Fed tax withheld"
.item "M05:Fishing boat"
.item "M06:Med and health care"
.item "M08:Substitute payments"
.item "M10:Crop insurance"
.item "M13:Golden parachute"
.item "M14:Attorney"
.item "D01:Ordinary dividends"
.item "D2b:28% rate gain"
.item "D2c:5-year gain"
.item "D2d:Unrecap 1250 gain"
.item "D2e:Section 1202 gain"
.item "D03:Nontax dist."
.item "D04:Fed tax withheld"
.item "D05:Invest. expenses"
.item "D06:Foreign tax paid"
.item "D08:Cash liq. dist."
.item "D09:Noncash liq. dist."
.end
;
;=============================================================== 
