
.script
;
;===================================================================
.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/1042 maintenance"
.entry z_109r, "Print 1099/1042 reports", sub
.entry z_109s, "Set 1099 limits", sub
.entry z_109f, "Print 1099/1042 forms", sub
.end

.column z_109r, "1099/1042 Reports"
.entry z_19mr, "1099-MISC report"
.entry z_19dr, "1099-DIV report"
.entry z_19vf, "1099 verification report"
.entry z_104r, "1042 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/1042 Forms"
.entry z_19mf, "1099-MISC forms"
.entry z_19df, "1099-DIV forms"
.entry z_104f, "1042 forms"
.end

;===============================================================
.input ap7010, 2, 15
.placement 1, 1
.title ' 1099 Year ', highlight
.paint _
 
.field year, d4, pos(1,1), prompt("Year"), fpos(1,10), -
 help(AP1099YR), format('XXXX'), range(1900,2100)

.field type, a1, pos(2,1), prompt("Type"), fpos(2,10), -
 help(AP1099TYPE), select(1,3,,"Misc","Div","F-1042")
 
.structure rec1, year,type
.set set1, rec1, year,type
.end
;
;=============================================================== 
.input ap7010f, 16, 78
.placement 1, 1
.title ' 1042 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#'), info("FIND(Lookup)"), -
 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, a2, pos(3,45), prompt("1:Income code"), fpos(3,65), -
 help(AP1099B1)

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

.field box5, d5.2, pos(5,45), prompt("5:Tax rate"), fpos(5,65), -
 help(AP1099B3), format("ZZZ.XX-")

.field box6, a2, pos(6,45), prompt("6:Exemption code"), fpos(6,65), -
 help(AP1099B1)

.field box7, d10.2, pos(7,45), prompt("7:Fed inc tax wh"), fpos(7,65), -
 help(AP1099B4), format("ZZ,ZZZ,ZZZ.XX-")

.structure rec1, year,<3>,vend,printed,box1,box2,box5,box6,box7
.set set_add, rec1, vend,printed,box1,box2,box5,box6,box7
.set set_chg, rec1, printed,box1,box2,box5,box6,box7
.set set_show, rec1, year,vend,printed,box1,box2,box5,box6,box7
.end
;
;================================================================
.input ap7061, 3, 50
.placement 1, 1
.title ' 1042 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 ap7071, 3, 40
.placement 6, 20
.title ' 1042 Forms ', highlight
.text WndTxt1, pos(1,1), margin(0,36)
Year
.text WndTxt3, pos(2,1), margin(0,21)
Update printed flag
.paint "_"
.field year, d4, fpos(1,21), copy, format("XXXX"), help("AP1099YEAR")
.field printed, a1, fpos(2,21), help("UTSELFUN"), selwnd(1,2,yesno)
.structure rec1, year, printed
.set set1, rec1, year, printed
.button I_OK, text(OK)
.button O_ABANDON, text(Cancel)
.button O_HELP, text(Help)
.button_set bottom(3)
.end
; 
