# ################################################################## # osas7-6.rul rule file for standard OSAS7.0 Accounting Software # # Based upon OSAS 7.0 demo data # # Requires, at least, UnForm version 6.0 # ################################################################## # This rule file is provided "AS IS", without warranty. # # Under no circumstances will the publisher be liable # # for consequential damages resulting from the use or # # inability to use the contents. # ######################################################### # # This rule file has been tested in version 6 with the GUI design tool # and tests OK. 02/27/2004 - bcj # # NOTE: SDSI has attempted to create rule sets that are generic enough that they cover # as many options as possible. # If you find situations that the rule set is not handling properly, do not # hesitate to contact us and provide us with a sample text file showing the problem. # We will be happy to provide the "correction" in a timely manner. # The above assumes that no modifications have been made to the application. # # Generic comments ###################################### # # Make changes to all constants as needed. # # Completed & Checked Forms: # ap - aged detail, aged summary # ap - checks: laser, blank, preprinted # ar - aged detail, aged summary # ar - statement: laser, plain paper, 8.5 x 11, std # generic reports (row 1 contains either PAGE or Page) # gl - balance sheet: budget, prev yr # gl - income statement: budget, prev yr # gl - trial balance: actual, budget, prev yr # po - order: laser, plain, 8.5 x 11, std # pr - checks: laser, blank, preprinted # so - invoice: laser, plain paper, 8.5 x 11, std # so - pick list: laser, 8.5 x 11, plain paper, std # so - pack list: laser, 8.5 x 11, plain paper # Completed forms & unchecked: # to be Completed forms: # # Modification history # # Last modified 1/18/2007 BTJ # # Global constants ####################################### # Some of the constants below are actually commands like "text", # "image", "micr", and "gs". This was done so that the end-user can # choose whether these particular commands should be turned on or off # in all rule sets. Simply placing a "#" in front of the command will # turn off the command. eg. Change "gs on" to "#gs on" to turn off. # Change "#image" to "image" to turn on. # Adjust the following constants to correct files and info # if you use the subst file then replace each constant # with subst info in rule sets below const COMP_NAME="Company Name: Edit rule file" const COMP_ADDR1="Address 1" const COMP_ADDR2="Address 2" const COMP_ADDR3="Address 3" const COMP_PHONES="###-###-#### Fax: ###-###-####" const COMP_EMAIL="E-Mail: xxxx@xxxxxxxxxxxxxxx.com" const COMP_WEBSITE="Website: www.xxxxxxxxxxxxxxx.com" # A/P check constants const AP_BANK_NAME="One Major Bank" const AP_BANK_ADDR1="1 Major Blvd" const AP_BANK_ADDR2="Major City CA 90123" const AP_ROUTING="12-345/6789" const AP_MICR_ACCOUNTNO=":123456789:9999-1234<34>" const AP_MICR="micr" # remove # to turn on const AP_NO_STUBS=2 # 1=vendor stub only # 2=vendor stub and payor stub # P/R check constants const PR_BANK_NAME="One Major Bank" const PR_BANK_ADDR1="1 Major Blvd" const PR_BANK_ADDR2="Major City CA 90123" const PR_ROUTING="12-345/6789" const PR_MICR_ACCOUNTNO=":123456789:9999-1234<34>" const PR_MICR="micr" # remove # to turn on const PR_NO_STUBS=2 # does not apply to long stub version # 1=employee stub only # 2=employee stub and employer stub # check signature on AP/PR checks, const SIGNATURE_IMAGE="#image" const SIGNATURE="" # insert signature file name # Logos const LOGO_IMAGE="image" const COMP_LOGO="sdsilogo.pcl" # change to your logo file name # watermarks const WATERMARK_SHADE=10 # adjust to desired darkness const WATERMARK="text" # PCL graphical shading uses a lot of memory # suggest large start size # DO NOT use if in slow printing environment like serial connections # An example of sizing using sdsi's sample1.txt # 300 dpi no gs 39KB # 300 dpi w/ gs 86KB # 600 dpi no gs 40KB # 600 dpi w/ gs 216KB # change #gs on to gs on to turn on graphical shading # change gs on to #gs on to turn off graphical shading const GSON="gs on" # date mask for detects - 10/17/2001 const DATEMASK="[0-1][0-9]/[0-3][0-9]/[0-9][0-9]" # US dt #const DATEMASK="[0-3][0-9]/[0-1][0-9]/[0-9][0-9]" # Can dt # main heading constants const HFONT= univers,11,fit const HLFONT= HFONT,left const HCFONT= HFONT,center const HRFONT= HFONT,right const HSHADE= 30 # bold const HBFONT= HFONT,bold const HBLFONT=HBFONT,left const HBCFONT=HBFONT,center const HBRFONT=HBFONT,right # internal heading font constants (ribbons, detail headers) const IFONT= univers,8,italic,fit const ILFONT= IFONT,left const ICFONT= IFONT,center const IRFONT= IFONT,right const ISHADE= 20 # bold const IBFONT= IFONT,bold const IBLFONT=IBFONT,left const IBCFONT=IBFONT,center const IBRFONT=IBFONT,right # detail data font constants const DFONT= cgtimes,9 const DLFONT= DFONT,left const DCFONT= DFONT,center const DRFONT= DFONT,right const DSHADE= 10 # bold const DBFONT= DFONT,bold const DBLFONT=DBFONT,left const DBCFONT=DBFONT,center const DBRFONT=DBFONT,right # default major section box size const MBOXSIZE=5 #*************************************************************** # Most frequently used rule sets * #*************************************************************** # # Laser forms - see unused rule sets section below for other form types # recommend moving rule sets down to unused section if not used # recommend moving rule sets up from unused section if used # [SO Invoice - laser] dsn_sample "/u0/unform_test/osas/txt7/testme.txt" #dsn_sample "../unform_test/osas/txt7/so_invc_laser.txt" # handles invoice, quote, credit memo detect 111,6,"~ DATEMASK" detect 0,17,"~\.[0-9][0-9]" # set up document constants const MAXCOLS=132 # max cols to output const MAXRCOLS=131 # MAXCOLS-1 const LEFTCOL=1 # left vertical line const RIGHTCOL=132 # right vertical line const MAXROWS=66 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows const CUSTOMER_COPY=1 const FILE_COPY=2 const MAX_COPIES=2 pcopies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "S/O Invoice - Laser" # view in pdf properties prejob { logocols=16,logorows=7 dim copy_title$[MAX_COPIES] if MAX_COPIES>=1 then copy_title$[CUSTOMER_COPY]="Customer Copy" if MAX_COPIES>=2 then copy_title$[FILE_COPY]="File Copy" } prepage { if trim(get(1,1,80))<>"" then pcopies=CUSTOMER_COPY, copy_title$[CUSTOMER_COPY]=trim(get(1,1,80)) # get invoice title doc_title$="INVOICE",reprint$="" # get title from body of invoice, if available. # Must handle credit memo text/quote. x$=trim(cut(18,10,26,"")) x=pos("REPRINT"=x$) if x then reprint$="REPRINT" x=pos("C R E D I T"=X$) if x then doc_title$="CREDIT MEMO" x=pos("Q U O T E"=X$) if x then doc_title$="QUOTE" merge "zMrg get watermark text" xcol=0,xrow=0 merge "zMrg get company info" shipto$=trim(get(45,10,10)) if shipto$<>"" then shipto$="Your ship to code is "+shipto$ totaldue$="" due$=trim(cut(110,17,12,"")) if doc_title$="INVOICE" then totaldue$="Your total due is "+due$ # mark memo lines for i=28 to 54 if mid(text$[i],4,3)="Lot" and mid(text$[i],46,7)="Ordered" then i=i+1;goto bottom_loop # lot line if mid(text$[i],6,3)="Ser" and mid(text$[i],107,1)="." then goto bottom_loop # serial line if mid(text$[i],128,1)="." then goto bottom_loop # detail line # component? if mid(text$[i],2,17)="End of Components" then compon=0 if compon and len(trim(text$[i]))>2 and mid(text$[i],1,2)=" " then text$[i](1,1)="C";i=i+1;goto bottom_loop if mid(text$[i],2,11)="Component :" then compon=1 # must be remark/desc if text$[i]<>"" then text$[i](1,1)="R" bottom_loop: next i # continued? cont$="",sub_line=50 for i=50 to MAXROWS x=pos("(continued"=text$[i]) if x then cont$="Continued on next page ..."; sub_line=55; x$=set(x,i,30,""); break next i if cont$="" then exec("cbox 1,58,RIGHTCOL,61,MBOXSIZE,crows=59.5 61::HSHADE,ccols=27 48 69 90 114") if cont$="" then exec("text 2,60.5,""Taxable"",HRFONT,cols=25,10") if cont$="" then exec("text 29,60.5,""Non-Taxable"",HRFONT,cols=19,10") if cont$="" then exec("text 50,60.5,""Freight"",HRFONT,cols=19,10") if cont$="" then exec("text 71,60.5,""Sales Tax"",HRFONT,cols=19,10") if cont$="" then exec("text 92,60.5,""Misc Charge"",HRFONT,cols=22,10") if cont$="" then exec("text 115,60.5,""Grand Total"",HBRFONT,cols=16,10") amount_paid$=trim(get(10,60,20)) amt_paid$=trim(get(31,60,20)) net_due$=trim(get(50,60,20)) nt_due$=trim(get(70,60,20)) if amount_paid$="" then goto no_amount_paid amount_paid$=amount_paid$(1,len(amount_paid$)-1) # remove colon net_due$=net_due$(1,len(net_due$)-1) # remove colon x$="cbox 90,61,MAXCOLS,64,1,ccols=114::DSHADE,crows=62.5" exec(x$) x$="text 91,62,"+$22$+amount_paid$+$22$+",IFONT,10" exec(x$) x$="text 118,62,"+$22$+amt_paid$+$22$+",DBRFONT,10,cols=14" exec(x$) x$="text 91,63.5,"+$22$+net_due$+$22$+",IBFONT,10" exec(x$) x$="text 118,63.5,"+$22$+nt_due$+$22$+",DBRFONT,10,cols=14" exec(x$) no_amount_paid: } # default detail line const BROW=1 const EROW=MAXROWS cfont 2,BROW,39,EROW,DBFONT # item # cfont 41,BROW,43,EROW,DBCFONT # tx cfont 45,BROW,49,EROW,DBCFONT # uom cfont 51,BROW,69,EROW,DBRFONT # qty ord cfont 71,BROW,89,EROW,DBRFONT,black # qty ship cfont 91,BROW,111,EROW,DBRFONT # price cfont 113,BROW,MAXRCOLS,EROW,DBRFONT # ext cbox LEFTCOL,26,MAXCOLS,55,MBOXSIZE,crows=27.5::DSHADE,ccols=40 44 50 70 90 112 text 2,27,"Item Information",IFONT text 41,27,"Tx",ICFONT,cols=3 text 45,27,"U/M",ICFONT,cols=5 text 51,27,"Ordered",IRFONT,cols=19 text 71,27,"Shipped",IRFONT,cols=19 text 91,27,"Unit Price",IRFONT,cols=21 text 113,27,"Extension",IRFONT,cols=19 # header section cerase 1,1,MAXCOLS,9 cbox LEFTCOL,1,RIGHTCOL,MAXROWS,MBOXSIZE,crows=10:MBOXSIZE merge "zMrg Form Header" # Invoice block cbox 111,4,MAXCOLS,10,1,ccols=120::ISHADE,crows=6 8 text 112,5,"Invoice",HFONT text 112,7,"Date",HFONT text 112,9,"Page",HFONT text 121,5,{trim(cut(112,7,8,""))},DBFONT text 121,7,{trim(cut(112,6,8,""))},DBFONT text 121,9,{trim(cut(112,4,7,""))},DBFONT # sold to cerase 49,10,59,10 cbox LEFTCOL,10,MAXCOLS,20,MBOXSIZE,ccols=9::ISHADE 67 75::ISHADE text 2,11,"Sold\nTo",HCFONT,cols=7 cfont 10,11,66,18,DBFONT,black # sold to addr text 10,19,{"Your customer code is "+trim(cut(10,10,6,""))},DBFONT # ship to text 68,11,"Ship\nTo",HCFONT,cols=7 cfont 76,11,MAXRCOLS,18,DBFONT,black # ship to addr text 76,18,{shipto$},DBFONT text 76,19,{totaldue$},DBFONT # ribbon 1 cbox LEFTCOL,20,MAXCOLS,23,MBOXSIZE,crows=21.5::ISHADE, ccols=7 13 24 38 60 78 96 119 text 2,21,"Slsp1",ICFONT,cols=5 text 8,21,"Slsp2",ICFONT,cols=5 text 25,21,"Due Date",ICFONT,cols=13 text 39,21,"Disc Due Date",ICFONT,cols=21 text 61,21,"Order No",ICFONT,cols=17 text 79,21,"Order Date",ICFONT,cols=17 text 97,21,"Ship Date",ICFONT,cols=22 text 120,21,"Ship No",ICFONT,cols=12 cfont 2,22,6,22,DBCFONT # slsp 1 cfont 8,22,23,22,DBCFONT # slsp 2 cfont 25,22,37,22,DBCFONT # due date cfont 39,22,59,22,DBCFONT # disc due date cfont 61,22,77,22,DBCFONT,black # order # cfont 79,22,95,22,DBCFONT # order date cfont 97,22,118,22,DBCFONT # ship date cfont 120,22,MAXRCOLS,22,DBCFONT # ship # # ribbon 2 cbox LEFTCOL,23,MAXCOLS,26,MBOXSIZE,crows=24.5::ISHADE,ccols=32 78 text 2,24,"Terms Description",ICFONT,cols=30 text 33,24,"Customer PO No",ICFONT,cols=45 text 79,24,"Ship Via",ICFONT,cols=53 cfont 2,25,31,25,DBCFONT # terms cfont 33,25,77,25,DBCFONT,black # cust po cfont 79,25,MAXRCOLS,25,DBCFONT,black # ship via # detail section # lot line font "Lot@4,28,6,54",0,0,3,1,IRFONT # lot font "Lot@4,28,6,54",4,0,30,1,DBFONT # lot id font "Lot@4,28,6,54",42,0,12,2,IRFONT # lot ord/ship font "Lot@4,28,6,54",59,0,12,2,DBRFONT,black # lot qty font "Lot@4,28,6,54",73,0,10,2,IFONT # lot uom # ser line font "Ser@6,28,8,54",0,0,3,1,IRFONT # ser font "Ser@6,28,8,54",4,0,20,1,DBFONT # ser id # component lines font "C@1,28,1,54",2,0,30,1,DBFONT # item # font "C@1,28,1,54",2,1,45,1,DFONT # desc font "C@1,28,1,54",44,0,5,1,DBCFONT # uom font "C@1,28,1,54",50,0,19,1,DBRFONT # qty # description font "R@1,28,1,54",1,0,77,1,DFONT # description cerase 1,28,1,54 # watermark - large font with light shading WATERMARK 1,54.5,{doc_title$},cgtimes,120,shade=WATERMARK_SHADE,center,cols=MAXCOLS,fit,spacing=.75 # message area cbox LEFTCOL,55,MAXCOLS,58,MBOXSIZE cfont 2,56,92,57,IFONT # mesg cfont 94,57,110,57,DBRFONT # subtotal: cfont 114,57,MAXRCOLS,57,DBRFONT # subtotal amt # footer text 1,{MAXROWS-.5},{copy_title$[copy]},HBCFONT,12,cols=MAXCOLS text 1,{MAXROWS-.5},{cont$},HBRFONT,cols=MAXRCOLS # totals cerase LEFTCOL,60,RIGHTCOL,60 cfont 2,59,26,59,DBRFONT # taxable cfont 28,59,47,59,DBRFONT # non-taxable cfont 49,59,68,59,DBRFONT,black # freight cfont 70,59,89,59,DBRFONT # sales tax cfont 91,59,113,59,DBRFONT,black # misc cfont 115,59,MAXRCOLS,59,DBRFONT,10 # grand total [SO Pick/Pack List - laser] dsn_sample "../unform_test/osas/txt7/so_pick_laser.txt" #dsn_sample "../unform_test/osas/txt7/so_pack_laser.txt" detect 62,4,"~ DATEMASK " detect 6,9,"~ [A-Z0-9a-z*]+" detect 6,10,"~ [A-Z0-9a-z]+" # set up document constants const MAXCOLS=80 # max cols to output const MAXRCOLS=79 # MAXCOLS-1 const LEFTCOL=1 # left vertical line const RIGHTCOL=80 # right vertical line const MAXROWS=66 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows const WHSE_COPY=1 const MAX_COPIES=1 pcopies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "S/O Pick/Pack List - Laser" # view in pdf properties prejob { logocols=12,logorows=6 # pick list qty fields are shifted right 1 character more than pack pick=0 for i=24 to 61 if trim(get(52,i,1))<>"" then pick=1;break next i if pick then doc_title$="PICKING SLIP" else doc_title$="PACKING LIST" merge "zMrg get watermark text" # set up copy titles dim copy_title$[MAX_COPIES] if MAX_COPIES>=1 then if pick then copy_title$[WHSE_COPY]="Warehouse Copy" else copy_title$[WHSE_COPY]="Customer Copy" # determine if picking list or packing list } prepage { if trim(get(1,7,50))<>"" then pcopies=WHSE_COPY, copy_title$[WHSE_COPY]=trim(get(1,7,80)) xcol=0,xrow=0 merge "zMrg get company info" shipto$="" soldto$="" if trim(get(7,9,10))<>"" then shipto$="Your ship to code is "+trim(get(7,9,10)) if trim(get(47,9,10))<>"" then soldto$="Your customer code is "+trim(get(47,9,10)) # continued? cont$="",sub_line=52 for i=52 to MAXROWS x=pos("(continued"=text$[i]) if x then cont$="Continued on next page ..."; sub_line=55; x$=set(x,i,30,""); break next i } # default detail line const BROW=1 const EROW=MAXROWS cfont 2,BROW,4,EROW,DBCFONT # line # cfont 6,BROW,25,EROW,DBFONT # item # cfont 27,BROW,31,EROW,DBCFONT # uom cfont 33,BROW,38,EROW,DBCFONT # bin cfont 40,BROW,52,EROW,DBRFONT # qty ord cfont 54,BROW,66,EROW,DBRFONT # qty ship cfont 68,BROW,MAXRCOLS,EROW,DBRFONT # qty b/o # header section cerase 1,1,MAXCOLS,9 cbox LEFTCOL,1,RIGHTCOL,MAXROWS,MBOXSIZE,crows=9:MBOXSIZE merge "zMrg Form Header" # right header cbox 60,3,RIGHTCOL,7,1,ccols=70::ISHADE,crows=4 5 6 7 text 61,3.5,"Order #",IFONT,cols=9 text 61,4.5,"Order Date",IFONT,cols=9 text 61,5.5,"Batch #",IFONT,cols=9 text 61,6.5,"Page",IFONT,cols=9 text 71,3.5,{trim(cut(51,4,8,""))},DBFONT,cols=9 text 71,4.5,{trim(cut(63,4,8,""))},DBFONT,cols=9 text 71,5.5,{trim(cut(40,4,6,""))},DBFONT,cols=9 text 71,6.5,{trim(cut(74,4,2,""))},DBFONT,cols=9 cbox 60,7,MAXCOLS,9,1,crows=8::ISHADE text 61,7.5,"Customer PO #",ICFONT,cols=19 text 61,8.5,{trim(cut(51,7,25,""))},DBFONT # ship to section cbox LEFTCOL,9,MAXCOLS,19,MBOXSIZE,ccols=6::ISHADE 41 46::ISHADE text 2,10,"Ship",ICFONT,cols=4 text 2,11,"To",ICFONT,cols=4 cfont 7,10,40,17,DBFONT,black text 7,18,{shipto$},DBFONT # sold to section text 42,10,"Sold",ICFONT,cols=4 text 42,11,"To",ICFONT,cols=4 cfont 47,10,MAXRCOLS,17,DBFONT text 47,18,{soldto$},DBFONT # ribbon section cbox LEFTCOL,19,RIGHTCOL,22,MBOXSIZE,crows=20.5::ISHADE, ccols=7 13 21 44 58 69 text 2,20,"Slsp 1",ICFONT,cols=5 text 8,20,"Slsp 2",ICFONT,cols=5 text 14,20,"Location",ICFONT,cols=7 text 22,20,"Ship Via",ICFONT,cols=22 text 45,20,"Pack List #",ICFONT,cols=13 text 59,20,"Rqstd Ship Date",ICFONT,cols=10 text 70,20,"Actual Ship Date",ICFONT,cols=10 cfont 2,21,6,21,DBCFONT cfont 8,21,12,21,DBCFONT,black cfont 14,21,20,21,DBCFONT cfont 22,21,43,21,DBCFONT cfont 45,21,57,21,DBCFONT cfont 59,21,68,21,DBCFONT cfont 70,21,MAXRCOLS,21,DBCFONT # detail cbox LEFTCOL,22,RIGHTCOL,62,MBOXSIZE, crows=23.5::DSHADE,ccols=5 32 39 53 67 text 2,23,"Line",ICFONT,cols=3 text 6,23,"Item ID",IFONT,cols=21 text 27,23,"U/M",ICFONT,cols=5 text 33,23,"Bin",ICFONT,cols=6 text 40,23,"Ordered",IRFONT,cols=13 text 54,23,"Shipped",IRFONT,cols=13 text 68,23,"Back Ordered",IRFONT,cols=12 # handle memo lines font " @2,24,4,61",4,0,40,1,DFONT,black # memo lines # watermark - large font with light shading WATERMARK 1,61.5,{doc_title$},cgtimes,120,shade=WATERMARK_SHADE,center,cols=MAXCOLS,fit,spacing=.75 # footer text 1,{MAXROWS-.5},{copy_title$[copy]},HBCFONT,12,cols=MAXCOLS text 1,{MAXROWS-.5},{cont$},HBRFONT,cols=MAXRCOLS cfont 2,63,MAXCOLS,65,IFONT # memo lines [SO Pick List - std] dsn_sample "../unform_test/osas/txt7/so_pick_std.txt" detect 0,1,"Batch" detect 0,5,"~[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9] " detect 0,5,"~ DATEMASK " detect 56,9,"~ [A-Z0-9a-z*]+" detect 56,10,"~ [A-Z0-9a-z]+" # set up document constants const MAXCOLS=107 # max cols to output const MAXRCOLS=106 # MAXCOLS-1 const LEFTCOL=1 # left vertical line const RIGHTCOL=107 # right vertical line const MAXROWS=66 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows page MAXROWS const WHSE_COPY=1 const MAX_COPIES=1 pcopies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "S/O Pick List - Std" # view in pdf properties prejob { logocols=12,logorows=6 # set up copy titles dim copy_title$[MAX_COPIES] if MAX_COPIES>=1 then if pick then copy_title$[WHSE_COPY]="Warehouse Copy" else copy_title$[WHSE_COPY]="Customer Copy" } prepage { if trim(get(1,2,70))<>"" then pcopies=WHSE_COPY, copy_title$[WHSE_COPY]=trim(get(1,2,70)) xcol=0,xrow=0 merge "zMrg get company info" doc_title$="PICKING LIST" batchno$=trim(get(83,1,6)) pslipno$=trim(get(100,2,6)) custno$=trim(get(57,9,10));x$=set(57,9,10,"") for i=MAXROWS to 5 step -1 text$[i]=text$[i-3] text$[i-3]="" next i # continued? cont$="",sub_line=52 for i=52 to MAXROWS x=pos("(continued"=text$[i]) if x then cont$="Continued on next page ..."; sub_line=55; x$=set(x,i,30,""); break next i } cmove LEFTCOL,1,RIGHTCOL,MAXROWS,2,2 # header section cerase 1,1,MAXCOLS,7 cbox LEFTCOL,1,RIGHTCOL,MAXROWS,MBOXSIZE,crows=9:MBOXSIZE merge "zMrg Form Header" # right header cbox 80,6.5,MAXCOLS,9,1,crows=7.5::ISHADE,ccols=95 text 81,7,"Picking Slip #",IFONT text 96,7,"Batch #",IFONT text 81,8,{pslipno$},DFONT text 96,8,{batchno$},DFONT # subhead cbox LEFTCOL,9,MAXCOLS,10.5,1,ISHADE,ccols=10 20 31 42 57 69 101 cbox LEFTCOL,10.5,57,11.5,ccols=10 20 31 42 cbox 69,10.5,MAXCOLS,11.5,ccols=101 57 cbox 57,9,57,12.5 cbox 101,9,101,12.5 cbox 57,12.5,101,12.5 text 2,10,"Order #",IFONT text 11,10,"Order Date",ICFONT,cols=9 text 21,10,"Loc Id",IFONT text 32,10,"Ship Date",ICFONT,cols=9 text 43,10,"Req'd Ship Date",ICFONT,cols=14 text 58,10,"Cust. P/O #",IFONT text 70,10,"Ship Via",IFONT text 102,10,"Page #",IFONT cmove 1,9,MAXCOLS,10,1,11 cfont 2,11,9,11,DFONT cfont 11,11,19,11,DCFONT cfont 21,11,30,11,DFONT cfont 32,11,41,11,DCFONT cfont 43,11,56,11,DCFONT cfont 58,11,68,11,DFONT cfont 70,11,100,11,DFONT cfont 102,11,MAXCOLS,11,DFONT cfont 58,12,100,12,DFONT # address region cbox LEFTCOL,13,MAXCOLS,19,ccols=8 15::ISHADE 49 56::ISHADE text 9,14,"Ship to",IFONT text 50,14,"Sold to",IFONT cfont 16,14,49,19,DFONT cfont 57,14,MAXCOLS,19,DFONT text 57,18,{"Your customer code is "+custno$},DFONT # items cbox LEFTCOL,19,MAXCOLS,63,1,,crows=21::DSHADE, ccols=5 51 57 73 88 text 2,20,"Line",IFONT text 6,20,"Item/Description",IFONT text 52,20,"Units",IFONT text 58,20,"Qty Ordered",IRFONT,cols=15 text 74,20,"Qty Shipped",IRFONT,cols=14 text 89,20,"Qty Backordered",IRFONT,cols=18 cfont 2,21,4,62,DFONT cfont 6,21,50,62,DFONT cfont 52,21,56,62,DFONT cfont 58,21,72,62,DRFONT cfont 74,21,87,62,DRFONT cfont 89,21,105,62,DRFONT # watermark - large font with light shading WATERMARK 1,62.5,{doc_title$},cgtimes,120,shade=WATERMARK_SHADE,center,cols=MAXCOLS,fit,spacing=.75 # footer text 1,{MAXROWS-.5},{copy_title$[copy]},HBCFONT,12,cols=MAXCOLS text 1,{MAXROWS-.5},{cont$},HBRFONT,cols=MAXRCOLS [PO Order - laser] dsn_sample "../unform_test/osas/txt7/po_laser.txt" detect 53,4,"~ [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9] DATEMASK" detect 75,7,"~[0-9]" # page # detect 5,10,"~ [0-z]" # cust name # set up document constants const MAXCOLS=81 # max cols to output const MAXRCOLS=80 # MAXCOLS-1 const LEFTCOL=1 # left vertical line const RIGHTCOL=81 # right vertical line const MAXROWS=66 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows const VENDOR_COPY=1 const FILE_COPY=2 const MAX_COPIES=2 pcopies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "P/O Order - Laser" # view in pdf properties prejob { logocols=12,logorows=7 dim copy_title$[MAX_COPIES] if MAX_COPIES>=1 then copy_title$[VENDOR_COPY]="Vendor Copy" if MAX_COPIES>=2 then copy_title$[FILE_COPY]="File Copy" doc_title$="PURCHASE ORDER" merge "zMrg get watermark text" } prepage { xcol=0,xrow=0 merge "zMrg get company info" } # shift down 1 for more room at top cmove LEFTCOL,1,RIGHTCOL,MAXROWS,1,2 # default detail line const BROW=25 const EROW=50 cfont 2,BROW,5,EROW,DBCFONT # line # cfont 7,BROW,26,EROW,DBFONT # item # cfont 28,BROW,33,EROW,DBCFONT # uom cfont 35,BROW,46,EROW,DBRFONT # price cfont 49,BROW,61,EROW,DBRFONT # qty ord cfont 64,BROW,MAXRCOLS,EROW,DBRFONT # ext # header section cerase 1,1,MAXCOLS,9 cbox LEFTCOL,1,RIGHTCOL,MAXROWS,MBOXSIZE,crows=10:MBOXSIZE merge "zMrg Form Header" # Invoice block cbox 60,4.5,RIGHTCOL,9.5,1,ccols=72::ISHADE,crows=5.5 6.5 7.5 8.5 text 61,5,"PO Number",DFONT text 61,6,"PO Date",DFONT text 61,7,"Req'd Ship Date",DFONT text 61,8,"Location",DFONT text 61,9,"Page",DFONT text 73,5,{trim(get(54,4,8))},DBFONT text 73,6,{trim(get(65,4,10))},DBFONT text 73,7,{trim(get(54,7,10))},DBFONT text 73,8,{trim(get(66,7,6))},DBFONT text 73,9,{trim(get(75,7,3))},DBFONT # vendor address cmove 5,16,MAXRCOLS,19,6,16 cmove 42,16,MAXRCOLS,19,45,16 cbox LEFTCOL,10,RIGHTCOL,20,MBOXSIZE,ccols=5::ISHADE 40 44::ISHADE text 2,11,"V\ne\nn\nd\no\nr",HCFONT,cols=3,fit cfont 6,11,39,19,DBLFONT # vend addr text 40,11,"S\nh\ni\np\n\nT\no",HCFONT,cols=5,fit cfont 45,11,MAXRCOLS,19,DBFONT # ship to addr # ribbon info cbox LEFTCOL,20,RIGHTCOL,23,MBOXSIZE,crows=21.5::ISHADE, ccols=21 40 59 text 1,21,"Ordered By",ICFONT,cols=20 text 22,21,"Ship Via",ICFONT,cols=18 text 41,21,"F.O.B.",ICFONT,cols=18 text 60,21,"Terms Description",ICFONT,cols=19 cfont 1,22,20,22,DBCFONT cfont 22,22,39,22,DBCFONT cfont 41,22,58,22,DBCFONT cfont 60,22,79,22,DBCFONT # line detail cbox LEFTCOL,23,RIGHTCOL,51,MBOXSIZE,crows=24.5::DSHADE,ccols=6 34 47 62 text 2,24,"Entry #",ICFONT,cols=4 text 7,24,"Item ID",IFONT text 28,24,"U/M",ICFONT,cols=6 text 35,24,"Unit Price",IRFONT,cols=12 text 49,24,"Ordered Quantity",IRFONT,cols=13 text 64,24,"Extension",IRFONT,cols=16 # description font " @2,24,2,50",5,0,54,1,DFONT # description # req date font "Req Date",0,0,19,1,DBRFONT # req date # watermark - large font with light shading WATERMARK 1,50.5,{doc_title$},cgtimes,120,shade=WATERMARK_SHADE,center,cols=MAXCOLS,fit,spacing=.75 # message area cbox LEFTCOL,51,RIGHTCOL,53,MBOXSIZE cfont 1,52,48,52,IFONT cfont 50,52,60,52,DBRFONT cfont 63,52,MAXRCOLS,52,DBRFONT # sub totals cbox LEFTCOL,53,RIGHTCOL,56,MBOXSIZE,crows=54.5::HSHADE,ccols=15 30 45 60 text 1,54,"Tax",HRFONT,cols=13 text 16,54,"Freight",HRFONT,cols=13 text 31,54,"Miscellaneous",HRFONT,cols=13 text 46,54,"Prepaid",HRFONT,cols=13 text 61,54,"Grand Total",HBRFONT,cols=19 cfont 1,55,13,55,DBRFONT cfont 16,55,28,55,DBRFONT cfont 31,55,43,55,DBRFONT,black cfont 46,55,58,55,DBRFONT,black cfont 61,55,MAXRCOLS,55,DBRFONT,fit # approval line cbox 55,60,RIGHTCOL,60 text 55.5,60.75,"Received by",HFONT cbox 55,64,MAXCOLS,64 text 55.5,64.75,"Authorized Signature",HFONT text 1,{MAXROWS-.5},{copy_title$[copy]},HBCFONT,12,cols=MAXCOLS [AR Statement - laser] dsn_sample "../unform_test/osas/txt7/ar_laser_stmt.txt" detect 61,6,"~ DATEMASK" detect 77,13,"~\.[0-9][0-9]" # set up document constants const MAXCOLS=81 # max cols to output const MAXRCOLS=80 # MAXCOLS-1 const LEFTCOL=1 # left vertical line const RIGHTCOL=81 # right vertical line const MAXROWS=66 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows const CUSTOMER_COPY=1 const REMITTANCE_COPY=2 const FILE_COPY=3 const MAX_COPIES=3 pcopies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "A/R Statement - Laser" # view in pdf properties prejob { doc_title$="STATEMENT" merge "zMrg get watermark text" logocols=12,logorows=6 dim copy_title$[MAX_COPIES] if MAX_COPIES>=1 then copy_title$[CUSTOMER_COPY]="Customer Copy" if MAX_COPIES>=2 then copy_title$[REMITTANCE_COPY]="Remittance Copy" if MAX_COPIES>=3 then copy_title$[FILE_COPY]="File Copy" } prepage { xcol=0,xrow=0 merge "zMrg get company info" } cmove LEFTCOL,1,RIGHTCOL,MAXROWS,2,1 # default detail line const BROW=21 const EROW=52 cfont 2,BROW,11,EROW,DBCFONT # date cfont 13,BROW,24,EROW,DFONT # inv # cfont 26,BROW,28,EROW,DCFONT # type cfont 30,BROW,41,EROW,DFONT # check # cfont 43,BROW,54,EROW,DBRFONT # charges cfont 56,BROW,67,EROW,DBRFONT # credits cfont 69,BROW,MAXRCOLS,EROW,DBRFONT # balance # header section cerase 1,1,MAXCOLS,7 cbox LEFTCOL,1,RIGHTCOL,MAXROWS,MBOXSIZE,crows=9:MBOXSIZE merge "zMrg Form Header" # Invoice block cbox 60,4,RIGHTCOL,9,1,crows=5.5 7.25,ccols=70::ISHADE text 61,5,"Date",HFONT text 61,6.75,"Account",HFONT text 61,8.5,"Page",HFONT text 71,5,{trim(cut(62,6,10,""))},DBFONT,10 text 71,6.75,{trim(cut(62,7,10,""))},DBFONT,10 text 71,8.5,{trim(cut(62,5,10,""))},DBFONT,10 # address & balance info cbox LEFTCOL,9,RIGHTCOL,19,MBOXSIZE cfont 1,10,49,18,DBFONT text 51,13,"Amount Due",IBFONT,10 cfont 70,13,MAXRCOLS,13,DBRFONT,10 text 51,15,"Terms",IBFONT,10 cfont 66,15,MAXRCOLS,15,DBRFONT,10 # detail section cbox LEFTCOL,19,RIGHTCOL,53,MBOXSIZE,crows=20.5::DSHADE, ccols=12 25 29 42 55 68 text 2,20,"Invoice Date",ICFONT,cols=10 text 13,20,"Invoice No",IFONT text 26,20,"Type",ICFONT,cols=3 text 30,20,"Check No",IFONT text 43,20,"Charges",IRFONT,cols=12 text 56,20,"Credits",IRFONT,cols=12 text 68,20,"Balance",IRFONT,cols=13 # handle special PO # line font "PO Number ",-2,0,10,1,ICFONT font "PO Number ",9,0,50,1,ILFONT # Messages cbox LEFTCOL,53,RIGHTCOL,58,MBOXSIZE cfont 2,54,MAXCOLS,57,IFONT # watermark - large font with light shading WATERMARK 1,52.5,{doc_title$},cgtimes,120,shade=WATERMARK_SHADE,center,cols=MAXCOLS,fit,spacing=.75 # footer text 1,{MAXROWS-.5},{copy_title$[copy]},HBCFONT,12,cols=MAXCOLS cbox LEFTCOL,58,RIGHTCOL,61,MBOXSIZE,crows=59.5 61::HSHADE, ccols=14 27 40 53 66 text 1,60.5,"Current",HRFONT,cols=13 text 15,60.5,"31-60 Days",HRFONT,cols=12 text 28,60.5,"61-90 Days",HRFONT,cols=12 text 41,60.5,"Over 90 Days",HRFONT,cols=12 text 54,60.5,"Finance Charge",HRFONT,cols=12 text 67,60.5,"Amount Due",HBRFONT,cols=13 cfont 1,59,13,60,DBRFONT cfont 15,59,26,60,DBRFONT cfont 28,59,39,60,DBRFONT cfont 41,59,52,60,DBRFONT,black cfont 54,59,65,60,DBRFONT,black cfont 67,59,MAXRCOLS,60,DBRFONT,10 [AP Check - laser] dsn_sample "../unform_test/osas/txt7/ap_chk_laser.txt" # Assumes company name heading printed on stub detect 43,8,"~[0-9][0-9][0-9][0-9][0-9][0-9][0-9]" detect 51,8,"~DATEMASK.." detect 0,21,"Vendor No." # set up document constants const MAXCOLS=82 const MAXRCOLS=81 const MAXROWS=62 const LEFTCOL=1 # left vertical line const RIGHTCOL=82 # right vertical line cols MAXCOLS rows MAXROWS const MAX_COPIES=1 pcopies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "A/P Checks - Laser" # view in pdf properties # make space on left cmove 1,1,MAXCOLS,MAXROWS,2,1 # Check LOGO_IMAGE 1,1,10,5,"COMP_LOGO" cbox LEFTCOL,1,RIGHTCOL,17.75,MBOXSIZE text 15,2.25,"COMP_NAME",HBFONT,14 text 15,3.35,"COMP_ADDR1",HFONT,12 text 15,4.35,"COMP_ADDR2",HFONT,12 text 15,5.35,"COMP_ADDR3",HFONT,12 text 49,2.25,"AP_BANK_NAME",DBFONT text 49,3.05,"AP_BANK_ADDR1",DFONT text 49,3.85,"AP_BANK_ADDR2",DFONT text 70,3.35,"AP_ROUTING",DBFONT # rtg # cmove 44,8,MAXCOLS,8,44,7 cbox 43,5.5,RIGHTCOL,7.5,1,crows=6.5::100,ccols=51 62 text 44,6,"Check #",ICFONT,10,cols=7,shade=0 cfont 44,7,50,7,DBCFONT,11 text 52,6,"Date",ICFONT,10,cols=10,shade=0 cfont 52,7,61,7,DBCFONT,11 text 63,6,"Amount",IRFONT,10,cols=18,shade=0 cfont 63,7,81,7,DBRFONT,11 text 2,10,"Pay",IFONT,14 text 7,10,{trim(cut(5,9,80,""))},DBFONT,italic,11,fit text 2,13,"Pay",IFONT text 2,14,"to the",IFONT text 2,15,"Order",IFONT text 2,16,"of",IFONT cmove 7,11,47,14,7,13 cfont 8,13,51,16,DBFONT,11 SIGNATURE_IMAGE 50,15,0,0,"SIGNATURE" box 50,16.25,30,1,3 text 50,14.5,"Check Void After 180 Days",ICFONT,cols=30 text 50,17,"Authorized Signature",ICFONT,cols=30 AP_MICR 15,18.5,"AP_MICR_ACCOUNTNO",{trim(get(43,7,7))} # Top stub - vendor's cerase 1,20,MAXCOLS,20 cbox LEFTCOL,20.25,RIGHTCOL,20.25 text 2,21,"COMP_NAME",HBFONT cbox 25,20.5,76,23,1,crows=21.35::DSHADE,ccols=36 68 cfont 26,21,35,21,ICFONT cfont 37,21,67,21,ICFONT cfont 69,21,75,21,ICFONT cfont 26,22,35,22,DBCFONT cfont 37,22,67,22,DBCFONT cfont 69,22,75,22,DBCFONT cbox LEFTCOL,23,RIGHTCOL,36.5,MBOXSIZE,crows=24.5::DSHADE, ccols=13 25 37 51 66 cfont 2,24,12,24,ICFONT cfont 14,24,24,24,ICFONT cfont 26,24,36,24,ICFONT cfont 38,24,50,24,IRFONT cfont 52,24,65,24,IRFONT cfont 67,24,MAXRCOLS,24,IRFONT cfont 2,25,12,36,DBCFONT cfont 14,25,24,36,DBCFONT cfont 26,25,36,36,DBCFONT cfont 38,25,50,36,DBRFONT cfont 52,25,65,36,DBRFONT cfont 67,25,MAXRCOLS,36,DBRFONT cbox LEFTCOL,36.5,RIGHTCOL,39,MBOXSIZE,crows=37.5::100, ccols=13 37 51 66 cfont 2,37,12,37,ICFONT,shade=0 cfont 14,37,36,37,ICFONT,shade=0 cfont 38,37,50,37,IRFONT,shade=0 cfont 52,37,65,37,IRFONT,shade=0 cfont 67,37,MAXRCOLS,37,IRFONT,shade=0 cfont 2,38,12,38,DBCFONT cfont 14,38,36,38,DBCFONT cfont 38,38,50,38,DBRFONT cfont 52,38,65,38,DBRFONT cfont 67,38,MAXRCOLS,38,DBRFONT text 1,40,"Vendor's Copy",DBRFONT,cols=MAXRCOLS # bottom stub - Payor's cerase 1,41,MAXCOLS,41 cbox LEFTCOL,41,MAXCOLS,41 text 2,42,"COMP_NAME",HBFONT cbox 25,41.5,76,44,1,crows=42.5::DSHADE,ccols=36 68 cfont 26,42,35,42,ICFONT cfont 37,42,67,42,ICFONT cfont 69,42,75,42,ICFONT cfont 26,43,35,43,DBCFONT cfont 37,43,67,43,DBCFONT cfont 69,43,75,43,DBCFONT cbox LEFTCOL,44,MAXCOLS,57.5,MBOXSIZE,crows=45.5::DSHADE,ccols=13 25 37 51 66 cfont 2,45,12,45,ICFONT cfont 14,45,24,45,ICFONT cfont 26,45,36,45,ICFONT cfont 38,45,50,45,IRFONT cfont 52,45,65,45,IRFONT cfont 67,45,MAXRCOLS,45,IRFONT cfont 2,46,12,57,DBCFONT cfont 14,46,24,57,DBCFONT cfont 26,46,36,57,DBCFONT cfont 38,46,50,57,DBRFONT cfont 52,46,65,57,DBRFONT cfont 67,46,MAXRCOLS,57,DBRFONT cbox LEFTCOL,57.5,MAXCOLS,60,MBOXSIZE,crows=58.5::100,ccols=13 37 51 66 cfont 2,58,12,58,ICFONT,shade=0 cfont 14,58,36,58,ICFONT,shade=0 cfont 38,58,50,58,IRFONT,shade=0 cfont 52,58,65,58,IRFONT,shade=0 cfont 67,58,MAXRCOLS,58,IRFONT,shade=0 cfont 2,59,12,59,DBCFONT cfont 14,59,36,59,DBCFONT cfont 38,59,50,59,DBRFONT cfont 52,59,65,59,DBRFONT cfont 67,59,MAXRCOLS,59,DBRFONT text 1,61,"Payor's Copy",DBRFONT,cols=MAXRCOLS [AP Check - Blank] dsn_sample "../unform_test/osas/txt7/ap_check_blank.txt" # Assumes company name heading printed on stub detect 54,8,"~[0-9][0-9][0-9][0-9][0-9][0-9][0-9]" detect 43,8,"~DATEMASK.." detect 0,22,"Vendor No." # set up document constants const MAXCOLS=82 const MAXRCOLS=81 const MAXROWS=62 const LEFTCOL=1 # left vertical line const RIGHTCOL=82 # right vertical line cols MAXCOLS rows MAXROWS page 42 const MAX_COPIES=1 pcopies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "A/P Checks - Blank" # view in pdf properties prepage { brow=22,erow=40 begin_copy_loop: text$[brow+21]=text$[brow] brow=brow+1 if brow=erow then goto end_copy_loop else goto begin_copy_loop end_copy_loop: } # make space on left cmove 1,1,MAXCOLS,MAXROWS,2,1 # Check LOGO_IMAGE 1,1,10,5,"COMP_LOGO" cbox LEFTCOL,1,RIGHTCOL,17.75,MBOXSIZE text 15,2.25,"COMP_NAME",HBFONT,14 text 15,3.35,"COMP_ADDR1",HFONT,12 text 15,4.35,"COMP_ADDR2",HFONT,12 text 15,5.35,"COMP_ADDR3",HFONT,12 text 49,2.25,"AP_BANK_NAME",DBFONT text 49,3.05,"AP_BANK_ADDR1",DFONT text 49,3.85,"AP_BANK_ADDR2",DFONT text 70,3.35,"AP_ROUTING",DBFONT # rtg # cmove 44,8,MAXCOLS,8,44,7 cbox 43,5.5,RIGHTCOL,7.5,1,crows=6.5::100,ccols=54 62 text 44,6,"Date",ICFONT,10,cols=10,shade=0 cfont 44,7,53,7,DBCFONT,11 text 55,6,"Check #",ICFONT,10,cols=7,shade=0 cfont 55,7,61,7,DBCFONT,11 text 63,6,"Amount",IRFONT,10,cols=18,shade=0 cfont 63,7,81,7,DBRFONT,11 text 2,10,"Pay",IFONT,14 text 7,10,{trim(cut(2,9,80,""))},DBFONT,italic,11,fit text 2,13,"Pay",IFONT text 2,14,"to the",IFONT text 2,15,"Order",IFONT text 2,16,"of",IFONT cmove 7,12,47,15,7,13 cfont 8,13,51,16,DBFONT,11 SIGNATURE_IMAGE 50,15,0,0,"SIGNATURE" box 50,16.25,30,1,3 text 50,14.5,"Check Void After 180 Days",ICFONT,cols=30 text 50,17,"Authorized Signature",ICFONT,cols=30 AP_MICR 15,18.5,"AP_MICR_ACCOUNTNO",{trim(get(43,7,7))} #move stubs up one line cmove LEFTCOL,22,MAXCOLS,MAXROWS,LEFTCOL,21 # Top stub - vendor's cerase 1,20,MAXCOLS,20 cbox LEFTCOL,20.25,RIGHTCOL,20.25 text 2,21,"COMP_NAME",HBFONT cbox 25,20.5,76,23,1,crows=21.35::DSHADE,ccols=36 68 cfont 26,21,35,21,ICFONT cfont 37,21,67,21,ICFONT cfont 69,21,75,21,ICFONT cfont 26,22,35,22,DBCFONT cfont 37,22,67,22,DBCFONT cfont 69,22,75,22,DBCFONT cbox LEFTCOL,23,RIGHTCOL,36.5,MBOXSIZE,crows=24.5::DSHADE, ccols=13 25 37 51 66 cfont 2,24,12,24,ICFONT cfont 14,24,24,24,ICFONT cfont 26,24,36,24,ICFONT cfont 38,24,50,24,IRFONT cfont 52,24,65,24,IRFONT cfont 67,24,MAXRCOLS,24,IRFONT cfont 2,25,12,36,DBCFONT cfont 14,25,24,36,DBCFONT cfont 26,25,36,36,DBCFONT cfont 38,25,50,36,DBRFONT cfont 52,25,65,36,DBRFONT cfont 67,25,MAXRCOLS,36,DBRFONT cbox LEFTCOL,36.5,RIGHTCOL,39,MBOXSIZE,crows=37.5::100, ccols=13 37 51 66 cfont 2,37,12,37,ICFONT,shade=0 cfont 14,37,36,37,ICFONT,shade=0 cfont 38,37,50,37,IRFONT,shade=0 cfont 52,37,65,37,IRFONT,shade=0 cfont 67,37,MAXRCOLS,37,IRFONT,shade=0 cfont 2,38,12,38,DBCFONT cfont 14,38,36,38,DBCFONT cfont 38,38,50,38,DBRFONT cfont 52,38,65,38,DBRFONT cfont 67,38,MAXRCOLS,38,DBRFONT text 1,40,"Vendor's Copy",DBRFONT,cols=MAXRCOLS # bottom stub - Payor's cerase 1,41,MAXCOLS,41 cbox LEFTCOL,41,MAXCOLS,41 text 2,42,"COMP_NAME",HBFONT cbox 25,41.5,76,44,1,crows=42.5::DSHADE,ccols=36 68 cfont 26,42,35,42,ICFONT cfont 37,42,67,42,ICFONT cfont 69,42,75,42,ICFONT cfont 26,43,35,43,DBCFONT cfont 37,43,67,43,DBCFONT cfont 69,43,75,43,DBCFONT cbox LEFTCOL,44,MAXCOLS,57.5,MBOXSIZE,crows=45.5::DSHADE,ccols=13 25 37 51 66 cfont 2,45,12,45,ICFONT cfont 14,45,24,45,ICFONT cfont 26,45,36,45,ICFONT cfont 38,45,50,45,IRFONT cfont 52,45,65,45,IRFONT cfont 67,45,MAXRCOLS,45,IRFONT cfont 2,46,12,57,DBCFONT cfont 14,46,24,57,DBCFONT cfont 26,46,36,57,DBCFONT cfont 38,46,50,57,DBRFONT cfont 52,46,65,57,DBRFONT cfont 67,46,MAXRCOLS,57,DBRFONT cbox LEFTCOL,57.5,MAXCOLS,60,MBOXSIZE,crows=58.5::100,ccols=13 37 51 66 cfont 2,58,12,58,ICFONT,shade=0 cfont 14,58,36,58,ICFONT,shade=0 cfont 38,58,50,58,IRFONT,shade=0 cfont 52,58,65,58,IRFONT,shade=0 cfont 67,58,MAXRCOLS,58,IRFONT,shade=0 cfont 2,59,12,59,DBCFONT cfont 14,59,36,59,DBCFONT cfont 38,59,50,59,DBRFONT cfont 52,59,65,59,DBRFONT cfont 67,59,MAXRCOLS,59,DBRFONT text 1,61,"Payor's Copy",DBRFONT,cols=MAXRCOLS [AP Check - Preprinted] dsn_sample "../unform_test/osas/txt7/ap_chk_pre.txt" # Assumes company name heading printed on stub detect 54,8,"~[0-9][0-9][0-9][0-9][0-9][0-9][0-9]" detect 43,8,"~DATEMASK.." detect 33,23,"~ [A-Za-z0-9]+ " # set up document constants const MAXCOLS=82 const MAXRCOLS=81 const MAXROWS=62 const LEFTCOL=1 # left vertical line const RIGHTCOL=82 # right vertical line cols MAXCOLS rows MAXROWS page 42 const MAX_COPIES=1 pcopies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "A/P Checks - Preprinted" # view in pdf properties prepage { brow=22,erow=40 begin_copy_loop: text$[brow+21]=text$[brow] brow=brow+1 if brow=erow then goto end_copy_loop else goto begin_copy_loop end_copy_loop: } # make space on left cmove 1,1,MAXCOLS,MAXROWS,2,1 # Check LOGO_IMAGE 1,1,10,5,"COMP_LOGO" cbox LEFTCOL,1,RIGHTCOL,17.75,MBOXSIZE text 15,2.25,"COMP_NAME",HBFONT,14 text 15,3.35,"COMP_ADDR1",HFONT,12 text 15,4.35,"COMP_ADDR2",HFONT,12 text 15,5.35,"COMP_ADDR3",HFONT,12 text 49,2.25,"AP_BANK_NAME",DBFONT text 49,3.05,"AP_BANK_ADDR1",DFONT text 49,3.85,"AP_BANK_ADDR2",DFONT text 70,3.35,"AP_ROUTING",DBFONT # rtg # cmove 44,8,MAXCOLS,8,44,7 cbox 43,5.5,RIGHTCOL,7.5,1,crows=6.5::100,ccols=54 62 text 44,6,"Date",ICFONT,10,cols=10,shade=0 cfont 44,7,53,7,DBCFONT,11 text 55,6,"Check #",ICFONT,10,cols=7,shade=0 cfont 55,7,61,7,DBCFONT,11 text 63,6,"Amount",IRFONT,10,cols=18,shade=0 cfont 63,7,81,7,DBRFONT,11 text 2,10,"Pay",IFONT,14 text 7,10,{trim(cut(2,9,80,""))},DBFONT,italic,11,fit text 2,13,"Pay",IFONT text 2,14,"to the",IFONT text 2,15,"Order",IFONT text 2,16,"of",IFONT cmove 7,12,47,15,7,13 cfont 8,13,51,16,DBFONT,11 SIGNATURE_IMAGE 50,15,0,0,"SIGNATURE" box 50,16.25,30,1,3 text 50,14.5,"Check Void After 180 Days",ICFONT,cols=30 text 50,17,"Authorized Signature",ICFONT,cols=30 AP_MICR 15,18.5,"AP_MICR_ACCOUNTNO",{trim(get(43,7,7))} #move stubs up one line cmove LEFTCOL,22,MAXCOLS,MAXROWS,1,21 # Top stub - vendor's cerase 1,20,MAXCOLS,20 cbox LEFTCOL,20.25,RIGHTCOL,20.25 text 2,21,"COMP_NAME",HBFONT cbox 34,20.5,76,23,1,crows=21.35::DSHADE,ccols=44 text 34,21,"Vendor No.",ICFONT,cols=10 text 45,21,"Vendor Name",ICFONT,cols=32 cfont 34,22,43,22,DBCFONT cfont 45,22,76,22,DBCFONT cbox LEFTCOL,23,RIGHTCOL,36.5,MBOXSIZE,crows=24.5::DSHADE, ccols=12 24 40 58 text 2,24,"Trans. Date",ICFONT,cols=10 text 13,24,"Reference",ICFONT,cols=11 text 25,24,"Gross Amount",IRFONT,cols=15 text 41,24,"Deduction",IRFONT,cols=17 text 59,24,"Net Amount",IRFONT,cols=23 cfont 2,25,11,36,DBCFONT cfont 13,25,23,36,DBCFONT cfont 25,25,39,36,DBRFONT cfont 41,25,57,36,DBRFONT cfont 59,25,MAXRCOLS,36,DBRFONT cbox LEFTCOL,36.5,RIGHTCOL,39,MBOXSIZE,crows=37.5::100, ccols=12 24 40 58 text 2,37,"Check Date",ICFONT,cols=10,shade=0 text 13,37,"Check No.",ICFONT,cols=11,shade=0 text 25,37,"Total Gross",IRFONT,cols=15,shade=0 text 41,37,"Total Ded.",IRFONT,cols=17,shade=0 text 59,37,"Check Amount",IRFONT,cols=23,shade=0 cfont 2,38,11,38,DBCFONT cfont 13,38,23,38,DBCFONT cfont 25,38,39,38,DBRFONT cfont 41,38,57,38,DBRFONT cfont 59,38,MAXRCOLS,38,DBRFONT text 1,40,"Vendor's Copy",DBRFONT,cols=MAXRCOLS # bottom stub - Payor's cerase 1,41,MAXCOLS,41 cbox LEFTCOL,41,MAXCOLS,41 text 2,42,"COMP_NAME",HBFONT cbox 34,41.5,76,44,1,crows=42.5::DSHADE,ccols=44 text 34,42,"Vendor No.",ICFONT,cols=10 text 45,42,"Vendor Name",ICFONT,cols=32 cfont 34,43,43,43,DBCFONT cfont 45,43,76,43,DBCFONT cbox LEFTCOL,44,RIGHTCOL,57.5,MBOXSIZE,crows=45.5::DSHADE,ccols=12 24 40 58 text 2,45,"Trans. Date",ICFONT,cols=10 text 13,45,"Reference",ICFONT,cols=11 text 25,45,"Gross Amount",IRFONT,cols=15 text 41,45,"Deduction",IRFONT,cols=17 text 59,45,"Net Amount",IRFONT,cols=23 cfont 2,46,11,57,DBCFONT cfont 13,46,23,57,DBCFONT cfont 25,46,39,57,DBRFONT cfont 41,46,57,57,DBRFONT cfont 59,46,MAXRCOLS,57,DBRFONT cbox LEFTCOL,57.5,RIGHTCOL,60,MBOXSIZE,crows=58.5::100,ccols=12 24 40 58 text 2,58,"Check Date",ICFONT,cols=10,shade=0 text 13,58,"Check No.",ICFONT,cols=11,shade=0 text 25,58,"Total Gross",IRFONT,cols=15,shade=0 text 41,58,"Total Ded.",IRFONT,cols=17,shade=0 text 59,58,"Check Amount",IRFONT,cols=23,shade=0 cfont 2,59,11,59,DBCFONT cfont 13,59,23,59,DBCFONT cfont 25,59,39,59,DBRFONT cfont 41,59,57,59,DBRFONT cfont 59,59,MAXRCOLS,59,DBRFONT text 1,61,"Payor's Copy",DBRFONT,cols=MAXRCOLS [PR Checks - laser] dsn_sample "../unform_test/osas/txt7/pr_laser_checks.txt" detect 0,8,"~ DATEMASK" detect 0,22,"~ [0-9][0-9]/[0-9][0-9]/[0-9][0-9] [0-9][0-9]/[0-9][0-9]/[0-9][0-9] " # set up document constants const MAXCOLS=81 const MAXRCOLS=80 const MAXROWS=66 const LEFTCOL=1 # left vertical line const RIGHTCOL=81 # right vertical line cols MAXCOLS rows MAXROWS # copy 2 is for summary const MAX_COPIES=2 pcopies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "P/R Checks - Laser" # view in pdf properties prejob { logocols=10,logorows=5 } precopy { # Summary? x$=trim(get(1,1,MAXCOLS)) if copy=1 and x$<>"" then skip=1 if copy=2 and x$="" then skip=1 } # make space on left cmove 1,1,MAXCOLS,MAXROWS,2,1 if copy 1 # first adjust format to standard cmove 1,20,MAXCOLS,60,1,22 cerase 1,1,30,6 # Check LOGO_IMAGE 1,1,10,5,"COMP_LOGO" cbox LEFTCOL,1,RIGHTCOL,17.75,MBOXSIZE text 15,2.25,"COMP_NAME",HBFONT,14 text 15,3.35,"COMP_ADDR1",HFONT,12 text 15,4.35,"COMP_ADDR2",HFONT,12 text 15,5.35,"COMP_ADDR3",HFONT,12 text 49,2.25,"PR_BANK_NAME",DBFONT text 49,3.05,"PR_BANK_ADDR1",DFONT text 49,3.85,"PR_BANK_ADDR2",DFONT text 70,3.35,"PR_ROUTING",DBFONT # rtg # cmove 53,8,MAXCOLS,8,53,7 cbox 44,5.5,RIGHTCOL,7.5,1,crows=6.5::100,ccols=52 63 text 45,6,"Check #",ICFONT,10,cols=7,shade=0 text 45,7,{trim(get(64,22,7))},DBCFONT,11,cols=7 text 53,6,"Date",ICFONT,10,cols=10,shade=0 cfont 53,7,62,7,DBCFONT,11 text 64,6,"Amount",IRFONT,10,cols=17,shade=0 cfont 64,7,MAXRCOLS,7,DBRFONT,11 text 2,10,"Pay",IFONT,14 text 7,10,{trim(cut(5,9,80,""))},DBFONT,italic,11,fit text 2,13,"Pay",IFONT text 2,14,"to the",IFONT text 2,15,"Order",IFONT text 2,16,"of",IFONT cmove 6,11,47,14,6,13 cfont 7,13,51,16,DBFONT,11 SIGNATURE_IMAGE 50,15,0,0,"SIGNATURE" box 50,16.25,30,1,3 text 50,14.5,"Check Void After 180 Days",ICFONT,cols=30 text 50,17,"Authorized Signature",ICFONT,cols=30 PR_MICR 15,18.5,"PR_MICR_ACCOUNTNO",{trim(get(64,22,7))} # top stub - employee's cerase 1,22,30,22 cbox LEFTCOL,21,MAXCOLS,21 text 15,22,"COMP_NAME",HBFONT,12 cbox LEFTCOL,22.5,MAXCOLS,24.5,MBOXSIZE,crows=23.5::DSHADE, ccols=15 33 45 54 64 cfont 2,23,14,23,ICFONT,proper cfont 16,23,32,23,ICFONT,proper cfont 34,23,44,23,ICFONT,proper cfont 46,23,53,23,ICFONT,proper cfont 55,23,63,23,ICFONT,proper cfont 65,23,MAXRCOLS,23,ICFONT,proper cfont 2,24,14,24,DBCFONT cfont 16,24,32,24,DBCFONT cfont 34,24,44,24,DBCFONT cfont 46,24,53,24,DBCFONT cfont 55,24,63,24,DBCFONT cfont 65,24,MAXRCOLS,24,DBCFONT cbox LEFTCOL,24.5,MAXCOLS,38.5,MBOXSIZE,crows=25.5::DSHADE, ccols=14 23 34 47 60 70 cfont 2,25,13,25,IFONT,proper cfont 14,25,22,25,IRFONT,black,proper cfont 24,25,33,25,IRFONT,proper cfont 35,25,46,25,IRFONT,proper cfont 48,25,59,25,IFONT,proper cfont 61,25,69,25,IRFONT,proper cfont 71,25,MAXRCOLS,25,IRFONT,proper cfont 2,26,13,35,DFONT cfont 14,26,22,35,DBRFONT,black cfont 24,26,33,35,DBRFONT cfont 35,26,46,35,DBRFONT cfont 48,26,59,38,DFONT cfont 61,26,69,38,DBRFONT cfont 71,26,MAXRCOLS,38,DBRFONT text 2,36,{mcut(1,34,13,2,"","Y","Y")},IBFONT text 14,36,{mcut(17,34,9,2,"","Y","Y")},DBRFONT,cols=9 cbox LEFTCOL,38.5,MAXCOLS,40.5,MBOXSIZE,crows=39.5::100, ccols=13 25 37 48 60 71 cfont 2,39,12,39,IFONT,shade=0 cfont 14,39,24,39,IRFONT,shade=0 cfont 26,39,36,39,IRFONT,shade=0 cfont 38,39,47,39,IRFONT,shade=0 cfont 49,39,59,39,IRFONT,shade=0 cerase 61,39,MAXCOLS,39 text 61,39,"YTD Ded",IRFONT,shade=0,cols=10 text 72,39,"YTD Net Pay",IRFONT,shade=0,cols=9 cfont 2,40,12,40,DBFONT cfont 14,40,24,40,DBRFONT cfont 26,40,36,40,DBRFONT cfont 38,40,47,40,DBRFONT cfont 49,40,59,40,DBRFONT cfont 61,40,70,40,DBRFONT cfont 72,40,MAXRCOLS,40,DBRFONT # Bottom stub - employer's cerase 1,43,30,43 cbox LEFTCOL,42,MAXCOLS,42 text 15,43,"COMP_NAME",HBFONT,12 cbox LEFTCOL,43.5,MAXCOLS,45.5,MBOXSIZE,crows=44.5::DSHADE, ccols=15 33 45 54 64 cfont 2,44,14,44,ICFONT,proper cfont 16,44,32,44,ICFONT,proper cfont 34,44,44,44,ICFONT,proper cfont 46,44,53,44,ICFONT,proper cfont 55,44,63,44,ICFONT,proper cfont 65,44,MAXRCOLS,44,ICFONT,proper cfont 2,45,14,45,DBCFONT cfont 16,45,32,45,DBCFONT cfont 34,45,44,45,DBCFONT cfont 46,45,53,45,DBCFONT cfont 55,45,63,45,DBCFONT cfont 65,45,MAXRCOLS,45,DBCFONT cbox LEFTCOL,45.5,MAXCOLS,59.5,MBOXSIZE,crows=46.5::DSHADE, ccols=14 23 34 47 60 70 cfont 2,46,13,46,IFONT,proper cfont 14,46,22,46,IRFONT,black,proper cfont 24,46,33,46,IRFONT,proper cfont 35,46,46,46,IRFONT,proper cfont 48,46,59,46,IFONT,proper cfont 61,46,69,46,IRFONT,proper cfont 71,46,MAXRCOLS,46,IRFONT,proper cfont 2,47,13,56,DFONT cfont 14,47,22,56,DBRFONT,black cfont 24,47,33,56,DBRFONT cfont 35,47,46,56,DBRFONT cfont 48,47,59,59,DFONT cfont 61,47,69,59,DBRFONT cfont 71,47,MAXRCOLS,59,DBRFONT text 2,57,{mcut(1,55,13,2,"","Y","Y")},IBFONT text 14,57,{mcut(17,55,9,2,"","Y","Y")},DBRFONT,cols=9 cbox LEFTCOL,59.5,MAXCOLS,61.5,MBOXSIZE,crows=60.5::100, ccols=13 25 37 48 60 71 cfont 2,60,12,60,IFONT,shade=0 cfont 14,60,24,60,IRFONT,shade=0 cfont 26,60,36,60,IRFONT,shade=0 cfont 38,60,47,60,IRFONT,shade=0 cfont 49,60,59,60,IRFONT,shade=0 cerase 61,60,MAXCOLS,60 text 61,60,"YTD Ded",IRFONT,shade=0,cols=10 text 72,60,"YTD Net Pay",IRFONT,shade=0,cols=9 cfont 2,61,12,61,DBFONT cfont 14,61,24,61,DBRFONT cfont 26,61,36,61,DBRFONT cfont 38,61,47,61,DBRFONT cfont 49,61,59,61,DBRFONT cfont 61,61,70,61,DBRFONT cfont 72,61,MAXRCOLS,61,DBRFONT end if # summary copy if copy 2 # title text 1,2,"Payroll Check Summary",HBCFONT,cols=MAXRCOLS,14 # summary text 25,6,{mcut(14,1,21,7,"","Y","Y")},HBFONT text 58,6,{mcut(36,1,13,7,"","Y","Y")},DBRFONT,11 # end of report text 2,15,{cut(1,10,13,"")},HBCFONT,cols=MAXRCOLS end if [PR Checks - blank] dsn_sample "../unform_test/osas/txt7/pr_blank_checks.txt" detect 0,10,"~ DATEMASK" detect 0,24,"~ [0-9][0-9]/[0-9][0-9]/[0-9][0-9] [0-9][0-9]/[0-9][0-9]/[0-9][0-9] " # set up document constants const MAXCOLS=81 const MAXRCOLS=80 const MAXROWS=66 const LEFTCOL=1 # left vertical line const RIGHTCOL=81 # right vertical line cols MAXCOLS rows MAXROWS page 42 # copy 2 is for summary const MAX_COPIES=2 pcopies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "P/R Checks - Blank" # view in pdf properties prejob { logocols=10,logorows=5 } precopy { # Summary? x$=trim(get(1,1,MAXCOLS)) if copy=1 and x$<>"" then skip=1 if copy=2 and x$="" then skip=1 } prepage { brow=22,erow=42 begin_copy_loop: text$[brow+21]=text$[brow] brow=brow+1 if brow=erow then goto end_copy_loop else goto begin_copy_loop end_copy_loop: } # make space on left cmove 1,1,MAXCOLS,MAXROWS,2,1 if copy 1 cerase 1,1,30,6 # Check LOGO_IMAGE 1,1,10,5,"COMP_LOGO" cbox LEFTCOL,1,RIGHTCOL,17.75,MBOXSIZE text 15,2.25,"COMP_NAME",HBFONT,14 text 15,3.35,"COMP_ADDR1",HFONT,12 text 15,4.35,"COMP_ADDR2",HFONT,12 text 15,5.35,"COMP_ADDR3",HFONT,12 text 49,2.25,"PR_BANK_NAME",DBFONT text 49,3.05,"PR_BANK_ADDR1",DFONT text 49,3.85,"PR_BANK_ADDR2",DFONT text 70,3.35,"PR_ROUTING",DBFONT # rtg # cmove 53,10,MAXCOLS,10,53,7 cbox 44,5.5,RIGHTCOL,7.5,1,crows=6.5::100,ccols=52 63 text 45,6,"Check #",ICFONT,10,cols=7,shade=0 text 45,7,{trim(cut(57,10,7,""))},DBCFONT,11,cols=7 text 53,6,"Date",ICFONT,10,cols=10,shade=0 text 53,7,{trim(cut(46,10,8,""))},DBCFONT,11,cols=10 text 64,6,"Amount",IRFONT,10,cols=17,shade=0 cfont 64,7,MAXRCOLS,7,DBRFONT,11 text 2,10,"Pay",IFONT,14 text 7,10,{trim(cut(1,11,80,""))},DBFONT,italic,11,fit text 2,13,"Pay",IFONT text 2,14,"to the",IFONT text 2,15,"Order",IFONT text 2,16,"of",IFONT cmove 6,14,47,17,6,13 cfont 7,13,51,16,DBFONT,11 SIGNATURE_IMAGE 50,15,0,0,"SIGNATURE" box 50,16.25,30,1,3 text 50,14.5,"Check Void After 180 Days",ICFONT,cols=30 text 50,17,"Authorized Signature",ICFONT,cols=30 PR_MICR 15,18.5,"PR_MICR_ACCOUNTNO",{trim(get(64,22,7))} # top stub - employee's cerase 1,22,30,22 cbox LEFTCOL,21,MAXCOLS,21 text 15,22,"COMP_NAME",HBFONT,12 cbox LEFTCOL,22.5,MAXCOLS,24.5,MBOXSIZE,crows=23.5::DSHADE, ccols=15 33 45 54 64 cfont 2,23,14,23,ICFONT,proper cfont 16,23,32,23,ICFONT,proper cfont 34,23,44,23,ICFONT,proper cfont 46,23,53,23,ICFONT,proper cfont 55,23,63,23,ICFONT,proper cfont 65,23,MAXRCOLS,23,ICFONT,proper cfont 2,24,14,24,DBCFONT cfont 16,24,32,24,DBCFONT cfont 34,24,44,24,DBCFONT cfont 46,24,53,24,DBCFONT cfont 55,24,63,24,DBCFONT cfont 65,24,MAXRCOLS,24,DBCFONT cmove LEFTCOL,26,MAXCOLS,38,LEFTCOL,25 cbox LEFTCOL,24.5,MAXCOLS,38.5,MBOXSIZE,crows=25.5::DSHADE, ccols=14 24 34 47 60 70 cfont 2,25,13,25,IFONT,proper cfont 14,25,23,25,IRFONT,black,proper cfont 24,25,33,25,IRFONT,proper cfont 35,25,46,25,IRFONT,proper cfont 48,25,59,25,IFONT,proper cfont 61,25,69,25,IRFONT,proper cfont 71,25,MAXRCOLS,25,IRFONT,proper cfont 2,26,13,35,DFONT cfont 14,26,23,35,DBRFONT,black cfont 24,26,33,35,DBRFONT cfont 35,26,46,35,DBRFONT cfont 48,26,59,38,DFONT cfont 61,26,69,38,DBRFONT cfont 71,26,MAXRCOLS,38,DBRFONT text 2,36,{mcut(1,36,13,2,"","Y","Y")},IBFONT text 15,36,{mcut(17,36,9,2,"","Y","Y")},DBRFONT,cols=9 cmove LEFTCOL,40,MAXCOLS,41,LEFTCOL,39 cbox LEFTCOL,38.5,MAXCOLS,40.5,MBOXSIZE,crows=39.5::100, ccols=13 25 37 48 60 71 cfont 2,39,12,39,IFONT,shade=0 cfont 14,39,24,39,IRFONT,shade=0 cfont 26,39,36,39,IRFONT,shade=0 cfont 38,39,47,39,IRFONT,shade=0 cfont 49,39,59,39,IRFONT,shade=0 cerase 61,39,MAXCOLS,39 text 61,39,"YTD Ded",IRFONT,shade=0,cols=10 text 72,39,"YTD Net Pay",IRFONT,shade=0,cols=9 cfont 2,40,12,40,DBFONT cfont 14,40,24,40,DBRFONT cfont 26,40,36,40,DBRFONT cfont 38,40,47,40,DBRFONT cfont 49,40,59,40,DBRFONT cfont 61,40,70,40,DBRFONT cfont 72,40,MAXRCOLS,40,DBRFONT # Bottom stub - employer's cerase 1,43,30,43 cbox LEFTCOL,42,MAXCOLS,42 text 15,43,"COMP_NAME",HBFONT,12 cbox LEFTCOL,43.5,MAXCOLS,45.5,MBOXSIZE,crows=44.5::DSHADE, ccols=15 33 45 54 64 cfont 2,44,14,44,ICFONT,proper cfont 16,44,32,44,ICFONT,proper cfont 34,44,44,44,ICFONT,proper cfont 46,44,53,44,ICFONT,proper cfont 55,44,63,44,ICFONT,proper cfont 65,44,MAXRCOLS,44,ICFONT,proper cfont 2,45,14,45,DBCFONT cfont 16,45,32,45,DBCFONT cfont 34,45,44,45,DBCFONT cfont 46,45,53,45,DBCFONT cfont 55,45,63,45,DBCFONT cfont 65,45,MAXRCOLS,45,DBCFONT cmove LEFTCOL,47,MAXCOLS,59,LEFTCOL,46 cbox LEFTCOL,45.5,MAXCOLS,59.5,MBOXSIZE,crows=46.5::DSHADE, ccols=14 24 34 47 60 70 cfont 2,46,13,46,IFONT,proper cfont 14,46,23,46,IRFONT,black,proper cfont 24,46,33,46,IRFONT,proper cfont 35,46,46,46,IRFONT,proper cfont 48,46,59,46,IFONT,proper cfont 61,46,69,46,IRFONT,proper cfont 71,46,MAXRCOLS,46,IRFONT,proper cfont 2,47,13,56,DFONT cfont 14,47,23,56,DBRFONT,black cfont 24,47,33,56,DBRFONT cfont 35,47,46,56,DBRFONT cfont 48,47,59,59,DFONT cfont 61,47,69,59,DBRFONT cfont 71,47,MAXRCOLS,59,DBRFONT text 2,57,{mcut(1,57,13,2,"","Y","Y")},IBFONT text 15,57,{mcut(17,57,9,2,"","Y","Y")},DBRFONT,cols=9 cmove LEFTCOL,61,MAXCOLS,62,LEFTCOL,60 cbox LEFTCOL,59.5,MAXCOLS,61.5,MBOXSIZE,crows=60.5::100, ccols=13 25 37 48 60 71 cfont 2,60,12,60,IFONT,shade=0 cfont 14,60,24,60,IRFONT,shade=0 cfont 26,60,36,60,IRFONT,shade=0 cfont 38,60,47,60,IRFONT,shade=0 cfont 49,60,59,60,IRFONT,shade=0 cerase 61,60,MAXCOLS,60 text 61,60,"YTD Ded",IRFONT,shade=0,cols=10 text 72,60,"YTD Net Pay",IRFONT,shade=0,cols=9 cfont 2,61,12,61,DBFONT cfont 14,61,24,61,DBRFONT cfont 26,61,36,61,DBRFONT cfont 38,61,47,61,DBRFONT cfont 49,61,59,61,DBRFONT cfont 61,61,70,61,DBRFONT cfont 72,61,MAXRCOLS,61,DBRFONT end if # summary copy if copy 2 # title text 1,2,"Payroll Check Summary",HBCFONT,cols=MAXRCOLS,14 # summary text 25,6,{mcut(14,1,21,7,"","Y","Y")},HBFONT text 58,6,{mcut(36,1,13,7,"","Y","Y")},DBRFONT,11 # end of report text 2,15,{cut(1,10,13,"")},HBCFONT,cols=MAXRCOLS end if [PR Checks - preprinted] dsn_sample "../unform_test/osas/txt7/pr_preprinted_checks.txt" detect 0,27,"~ DATEMASK" detect 0,2,"~ [0-9][0-9]/[0-9][0-9]/[0-9][0-9] [0-9][0-9]/[0-9][0-9]/[0-9][0-9] " # set up document constants const MAXCOLS=81 const MAXRCOLS=80 const MAXROWS=66 const LEFTCOL=1 # left vertical line const RIGHTCOL=81 # right vertical line cols MAXCOLS rows MAXROWS page 42 # copy 2 is for summary const MAX_COPIES=2 pcopies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "P/R Checks - Preprinted" # view in pdf properties prejob { logocols=10,logorows=5 } precopy { # Summary? x$=trim(get(1,2,11)) if copy=1 and x$="" then skip=1 if copy=2 and x$<>"" then skip=1 } prepage { brow=1,erow=21 begin_copy_loop: text$[brow+40]=text$[brow] brow=brow+1 if brow=erow then goto end_copy_loop else goto begin_copy_loop end_copy_loop: } # make space on left cmove 1,1,MAXCOLS,MAXROWS,2,2 if copy 1 cerase 1,22,30,27 # Check LOGO_IMAGE 1,22,10,5,"COMP_LOGO" cbox LEFTCOL,22,RIGHTCOL,38.75,MBOXSIZE text 15,23.25,"COMP_NAME",HBFONT,14 text 15,24.35,"COMP_ADDR1",HFONT,12 text 15,25.35,"COMP_ADDR2",HFONT,12 text 15,26.35,"COMP_ADDR3",HFONT,12 text 49,23.25,"PR_BANK_NAME",DBFONT text 49,24.05,"PR_BANK_ADDR1",DFONT text 49,24.85,"PR_BANK_ADDR2",DFONT text 70,24.35,"PR_ROUTING",DBFONT # rtg # cbox 44,26.5,RIGHTCOL,28.5,1,crows=27.5::100,ccols=52 63 text 45,27,"Check #",ICFONT,10,cols=7,shade=0 text 45,28,{trim(get(63,2,7,""))},DBCFONT,11,cols=7 text 53,27,"Date",ICFONT,10,cols=10,shade=0 text 53,28,{trim(cut(58,27,8,""))},DBCFONT,11,cols=10 text 64,27,"Amount",IRFONT,10,cols=17,shade=0 cfont 64,28,MAXRCOLS,28,DBRFONT,11 text 2,31,"Pay",IFONT,14 text 7,31,{trim(cut(1,30,80,""))},DBFONT,italic,11,fit text 2,34,"Pay",IFONT text 2,35,"to the",IFONT text 2,36,"Order",IFONT text 2,37,"of",IFONT cmove 6,35,47,38,6,34 cfont 7,34,51,37,DBFONT,11 SIGNATURE_IMAGE 50,36,0,0,"SIGNATURE" box 50,37.25,30,1,3 text 50,35.5,"Check Void After 180 Days",ICFONT,cols=30 text 50,38,"Authorized Signature",ICFONT,cols=30 PR_MICR 15,39.5,"PR_MICR_ACCOUNTNO",{trim(get(64,41,7))} # top stub - employee's cerase 1,2,30,2 cbox LEFTCOL,21.5,MAXCOLS,21.5 text 15,1,"COMP_NAME",HBFONT,12 cbox LEFTCOL,1.5,MAXCOLS,3.5,MBOXSIZE,crows=2.5::DSHADE, ccols=15 33 45 54 64 text 2,2,"Emp No/Dept",ICFONT,cols=13 text 16,2,"Employee Name",ICFONT,cols=17 text 34,2,"SSN",ICFONT,cols=11 text 46,2,"Per Beg",ICFONT,cols=8 text 55,2,"Per End",ICFONT,cols=9 text 65,2,"Ck No.",ICFONT,cols=16 cfont 2,3,14,3,DBCFONT cfont 16,3,32,3,DBCFONT cfont 34,3,44,3,DBCFONT cfont 46,3,53,3,DBCFONT cfont 55,3,63,3,DBCFONT cfont 65,3,MAXRCOLS,3,DBCFONT cbox LEFTCOL,3.5,MAXCOLS,17.5,MBOXSIZE,crows=5.5::DSHADE, ccols=14 24 34 47 60 70 text 2,4.5,"Earnings",IFONT text 24,4.5,"Hrs/Units",IRFONT,black text 34,4.5,"Curr Amt",IRFONT text 47,4.5,"YTD",IRFONT text 48,4.5,"Deductions",IFONT text 70,4.5,"Curr Amt",IRFONT text 75,4.5,"YTD",IRFONT,cols=6 cfont 2,6,13,15,DFONT cfont 14,6,23,15,DBRFONT,black cfont 24,6,33,15,DBRFONT cfont 35,6,46,15,DBRFONT cfont 48,6,59,18,DFONT cfont 61,6,69,18,DBRFONT cfont 71,6,MAXRCOLS,18,DBRFONT text 2,16,{mcut(1,16,13,2,"","Y","Y")},IBFONT text 15,16,{mcut(17,16,9,2,"","Y","Y")},DBRFONT,cols=9 cbox LEFTCOL,18.5,MAXCOLS,20.5,MBOXSIZE,crows=19.5::100, ccols=13 25 37 48 60 71 text 2,19,"Pay Rate",IFONT,shade=0 text 25,19,"Curr Earn",IRFONT,shade=0 text 37,19,"Curr Ded",IRFONT,shade=0 text 48,19,"Net Pay",IRFONT,shade=0 text 60,19,"YTD Earn",IRFONT,shade=0 text 61,19,"YTD Ded",IRFONT,shade=0,cols=10 text 72,19,"YTD Net Pay",IRFONT,shade=0,cols=9 cfont 2,20,12,20,DBFONT cfont 14,20,24,20,DBRFONT cfont 26,20,36,20,DBRFONT cfont 38,20,47,20,DBRFONT cfont 49,20,59,20,DBRFONT cfont 61,20,70,20,DBRFONT cfont 72,20,MAXRCOLS,20,DBRFONT # Bottom stub - employer's cerase 1,42,30,42 cbox LEFTCOL,39.5,MAXCOLS,39.5 text 15,41,"COMP_NAME",HBFONT,12 cbox LEFTCOL,41.5,MAXCOLS,43.5,MBOXSIZE,crows=42.5::DSHADE, ccols=15 33 45 54 64 text 2,42,"Emp No/Dept",ICFONT,cols=13 text 16,42,"Employee Name",ICFONT,cols=17 text 34,42,"SSN",ICFONT,cols=11 text 46,42,"Per Beg",ICFONT,cols=8 text 55,42,"Per End",ICFONT,cols=9 text 65,42,"Ck No.",ICFONT,cols=16 cfont 2,43,14,43,DBCFONT cfont 16,43,32,43,DBCFONT cfont 34,43,44,43,DBCFONT cfont 46,43,53,43,DBCFONT cfont 55,43,63,43,DBCFONT cfont 65,43,MAXRCOLS,43,DBCFONT cbox LEFTCOL,43.5,MAXCOLS,57.5,MBOXSIZE,crows=45.5::DSHADE, ccols=14 24 34 47 60 70 text 2,44.5,"Earnings",IFONT text 24,44.5,"Hrs/Units",IRFONT,black text 34,44.5,"Curr Amt",IRFONT text 47,44.5,"YTD",IRFONT text 48,44.5,"Deductions",IFONT text 70,44.5,"Curr Amt",IRFONT text 75,44.5,"YTD",IRFONT,cols=6 cfont 2,46,13,55,DFONT cfont 14,46,23,55,DBRFONT,black cfont 24,46,33,55,DBRFONT cfont 35,46,46,55,DBRFONT cfont 48,46,59,58,DFONT cfont 61,46,69,58,DBRFONT cfont 71,46,MAXRCOLS,58,DBRFONT text 2,56,{mcut(1,56,13,2,"","Y","Y")},IBFONT text 15,56,{mcut(17,56,9,2,"","Y","Y")},DBRFONT,cols=9 cbox LEFTCOL,58.5,MAXCOLS,60.5,MBOXSIZE,crows=59.5::100, ccols=13 25 37 48 60 71 text 2,59,"Pay Rate",IFONT,shade=0 text 25,59,"Curr Earn",IRFONT,shade=0 text 37,59,"Curr Ded",IRFONT,shade=0 text 48,59,"Net Pay",IRFONT,shade=0 text 60,59,"YTD Earn",IRFONT,shade=0 text 61,59,"YTD Ded",IRFONT,shade=0,cols=10 text 72,59,"YTD Net Pay",IRFONT,shade=0,cols=9 cfont 2,60,12,60,DBFONT cfont 14,60,24,60,DBRFONT cfont 26,60,36,60,DBRFONT cfont 38,60,47,60,DBRFONT cfont 49,60,59,60,DBRFONT cfont 61,60,70,60,DBRFONT cfont 72,60,MAXRCOLS,60,DBRFONT end if # summary copy if copy 2 # title text 1,2,"Payroll Check Summary",HBCFONT,cols=MAXRCOLS,14 # summary text 25,6,{mget(14,1,21,8,"Y","Y")},HBFONT text 58,6,{mget(36,1,13,8,"Y","Y")},DBRFONT,11 # end of report text 2,15,{get(1,11,13)},HBCFONT,cols=MAXRCOLS cerase LEFTCOL,1,RIGHTCOL,MAXROWS end if #*************************************************************** # Less frequently used rule sets * #*************************************************************** [AP Aged Detail] dsn_sample "../unform_test/osas/txt7/ap_aging_det.txt" detect 0,2,"Accounts Payable Detail Aged Trial Balance" # set up document constants const MAXCOLS=133 # max cols to output const MAXRCOLS=132 # MAXCOLS-1 const LEFTCOL=1 # left vertical line const RIGHTCOL=133 # right vertical line const MAXROWS=60 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows const MAX_COPIES=1 pcopies MAX_COPIES landscape dpi 600 # see global constant above GSON # graphical shading title "A/P Detail Aging" # view in pdf properties prejob { brow=6 # used by rpt hdr } prepage { merge "zMrg load rpt header" } cmove LEFTCOL,1,MAXCOLS,MAXROWS,2,1 # default detail line const BROW=1 const EROW=MAXROWS cfont 2,BROW,10,EROW,DFONT # inv # cfont 12,BROW,14,EROW,DCFONT # st cfont 16,BROW,25,EROW,DCFONT # date cfont 27,BROW,42,EROW,DBRFONT # amount cfont 44,BROW,57,EROW,DRFONT # current cfont 59,BROW,72,EROW,DRFONT # 31-60 cfont 75,BROW,87,EROW,DRFONT # 61-90 cfont 90,BROW,102,EROW,DRFONT # 91-120 cfont 105,BROW,117,EROW,DRFONT # over 120 cfont 120,BROW,MAXRCOLS,EROW,DRFONT # future # header merge "zMrg Report Header" # detail cmove LEFTCOL,7,MAXCOLS,7,LEFTCOL,8 cbox LEFTCOL,7.25,RIGHTCOL,8.5,MBOXSIZE,10 const BROW=8 const EROW=8 cfont 2,BROW,10,EROW,IFONT # inv # cfont 12,BROW,14,EROW,ICFONT # st cfont 16,BROW,25,EROW,ICFONT # date cfont 30,BROW,42,EROW,IRFONT # amount cfont 45,BROW,57,EROW,IRFONT # current cfont 60,BROW,72,EROW,IRFONT # 31-60 cfont 75,BROW,87,EROW,IRFONT # 61-90 cfont 90,BROW,102,EROW,IRFONT # 91-120 cfont 105,BROW,117,EROW,IRFONT # over 120 cfont 120,BROW,MAXRCOLS,EROW,IRFONT # future # vendor heading font "~[A-Za-z0-9]@2,9,2,MAXROWS",0,0,37,1,DBFONT font "~[A-Za-z0-9]@2,9,2,MAXROWS",39,0,14,1,DBFONT font "~[A-Za-z0-9]@2,9,2,MAXROWS",60,0,67,1,DFONT # vendor total line erase "~VENDOR .* TOTAL@2,9,21,MAXROWS",0,-1,MAXCOLS,1 box "~VENDOR .* TOTAL@2,9,21,MAXROWS",28,-1,102,1,5 font "~VENDOR .* TOTAL@2,9,21,MAXROWS",0,0,20,1,DBFONT # invoice total font " TOTAL @11,9,17,MAXROWS",0,0,7,1,DFONT # Grand totals line erase "GRAND TOTAL",0,-1,MAXCOLS,1 box "GRAND TOTAL",-2,-1,{MAXCOLS-1},2,1,10 font "GRAND TOTAL",-1,0,20,1,HBLFONT font "End of Report",0,0,14,1,DFONT [AP Aged Summary] dsn_sample "../unform_test/osas/txt7/ap_aging_sum.txt" detect 0,2,"Accounts Payable Summary Aged Trial Balance" # set up document constants const MAXCOLS=133 # max cols to output const MAXRCOLS=132 # MAXCOLS-1 const LEFTCOL=1 # left vertical line const RIGHTCOL=133 # right vertical line const MAXROWS=60 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows const MAX_COPIES=1 pcopies MAX_COPIES landscape dpi 600 # see global constant above GSON # graphical shading title "A/P Summary Aging" # view in pdf properties prejob { brow=6 # used by rpt hdr } prepage { merge "zMrg load rpt header" } cmove LEFTCOL,1,MAXCOLS,MAXROWS,2,1 # default detail line const BROW=1 const EROW=MAXROWS cfont 2,BROW,7,EROW,DFONT # vendor cfont 9,BROW,28,EROW,DCFONT # name cfont 30,BROW,42,EROW,DBRFONT # amount cfont 45,BROW,57,EROW,DRFONT # current cfont 60,BROW,72,EROW,DRFONT # 31-60 cfont 75,BROW,87,EROW,DRFONT # 61-90 cfont 90,BROW,102,EROW,DRFONT # 91-120 cfont 105,BROW,117,EROW,DRFONT # over 120 cfont 120,BROW,MAXRCOLS,EROW,DRFONT # future # header merge "zMrg Report Header" # detail cmove LEFTCOL,7,MAXCOLS,7,LEFTCOL,8 cbox LEFTCOL,7.25,RIGHTCOL,8.5,MBOXSIZE,10 const BROW=8 const EROW=8 cfont 2,BROW,8,EROW,IFONT # vendor cfont 10,BROW,28,EROW,ICFONT # name cfont 30,BROW,42,EROW,IRFONT # amount cfont 45,BROW,57,EROW,IRFONT # current cfont 60,BROW,72,EROW,IRFONT # 31-60 cfont 75,BROW,87,EROW,IRFONT # 61-90 cfont 90,BROW,102,EROW,IRFONT # 91-120 cfont 105,BROW,117,EROW,IRFONT # over 120 cfont 120,BROW,MAXRCOLS,EROW,IRFONT # future # vendor heading font "~[A-Za-z0-9]@2,9,2,MAXROWS",0,0,37,1,DBFONT font "~[A-Za-z0-9]@2,9,2,MAXROWS",39,0,14,1,DBFONT font "~[A-Za-z0-9]@2,9,2,MAXROWS",60,0,67,1,DFONT # vendor total line font "~VENDOR .* TOTAL@3,9,21,MAXROWS",0,0,20,1,DFONT # Grand totals line erase "GRAND TOTAL",0,-1,MAXCOLS,1 box "GRAND TOTAL",-2,-1,MAXRCOLS,2,1,10 font "GRAND TOTAL",-1,0,20,1,HBLFONT font "End of Report",0,0,14,1,DFONT [AR Aged Detail] dsn_sample "../unform_test/osas/txt7/ar_aging_det.txt" detect 0,2,"Detail Accounts Receivable Aged Trial Balance" # set up document constants const MAXCOLS=133 # max cols to output const MAXRCOLS=132 # MAXCOLS-1 const LEFTCOL=1 # left vertical line const RIGHTCOL=133 # right vertical line const MAXROWS=60 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows const MAX_COPIES=1 pcopies MAX_COPIES landscape dpi 600 # see global constant above GSON # graphical shading title "A/R Detail Aging" # view in pdf properties prejob { brow=3 # used by rpt hdr } prepage { merge "zMrg load rpt header" } cmove LEFTCOL,1,MAXCOLS,MAXROWS,2,1 # default detail line const BROW=1 const EROW=MAXROWS cfont 2,BROW,9,EROW,DFONT # inv # cfont 11,BROW,11,EROW,DCFONT # st cfont 13,BROW,13,EROW,DCFONT # tp cfont 15,BROW,23,EROW,DCFONT # date cfont 25,BROW,36,EROW,DBRFONT # amount cfont 39,BROW,52,EROW,DRFONT # current cfont 55,BROW,68,EROW,DRFONT # 31-60 cfont 71,BROW,84,EROW,DRFONT # 61-90 cfont 87,BROW,100,EROW,DRFONT # 91-120 cfont 103,BROW,116,EROW,DRFONT # over 120 cfont 119,BROW,MAXRCOLS,EROW,DRFONT # unapplied # header merge "zMrg Report Header" # detail cerase 1,7,MAXCOLS,7 cbox LEFTCOL,4.25,RIGHTCOL,6.5,MBOXSIZE,10 const BROW=5 const EROW=6 cfont 2,BROW,9,EROW,IFONT # inv # cfont 11,BROW,11,EROW,ICFONT # st cfont 13,BROW,13,EROW,ICFONT # tp cfont 15,BROW,23,EROW,ICFONT # date cfont 25,BROW,36,EROW,IRFONT # amount cfont 39,BROW,52,EROW,IRFONT # current cfont 55,BROW,68,EROW,IRFONT # 31-60 cfont 71,BROW,84,EROW,IRFONT # 61-90 cfont 87,BROW,100,EROW,IRFONT # 91-120 cfont 103,BROW,116,EROW,IRFONT # over 120 cfont 119,BROW,MAXRCOLS,EROW,IRFONT # unapplied # customer heading font "~(...)...-@40,8,48,MAXROWS",-40,0,37,1,DBFONT font "~(...)...-@40,8,48,MAXROWS",-2,0,48,1,DBCFONT font "~(...)...-@40,8,48,MAXROWS",50,0,40,1,DRFONT # customer total line erase "~Cust .* TOTAL@1,9,20,MAXROWS",0,-1,MAXCOLS,1 box "~Cust .* TOTAL@1,9,20,MAXROWS",21,-1,110,1,5 font "~Cust .* TOTAL@1,9,20,MAXROWS",0,0,20,1,DBFONT # Grand totals line erase "GRAND TOTAL",0,-1,MAXCOLS,1 box "GRAND TOTAL",-1,-1,MAXRCOLS,2,1,10 font "GRAND TOTAL",0,0,20,1,HBFONT font "End of Report",0,0,14,1,DFONT [AR Aged Summary] dsn_sample "../unform_test/osas/txt7/ar_atb_summary.txt" detect 0,2,"Summary Accounts Receivable Aged Trial Balance" # set up document constants const MAXCOLS=133 # max cols to output const MAXRCOLS=132 # MAXCOLS-1 const LEFTCOL=1 # left vertical line const RIGHTCOL=133 # right vertical line const MAXROWS=60 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows const MAX_COPIES=1 pcopies MAX_COPIES landscape dpi 600 # see global constant above GSON # graphical shading title "A/R Summary Aging" # view in pdf properties prejob { brow=3 # used by rpt hdr } prepage { merge "zMrg load rpt header" } cmove LEFTCOL,1,RIGHTCOL,MAXROWS,2,1 # default detail line const BROW=1 const EROW=MAXROWS cfont 2,BROW,9,EROW,DFONT # cust id cfont 11,BROW,23,EROW,DBCFONT # phone cfont 25,BROW,28,EROW,DCFONT # sls rep cfont 30,BROW,33,EROW,DCFONT # dist cfont 35,BROW,48,EROW,DBRFONT # amount cfont 51,BROW,62,EROW,DRFONT # current cfont 65,BROW,76,EROW,DRFONT # 31-60 cfont 79,BROW,90,EROW,DRFONT # 61-90 cfont 93,BROW,104,EROW,DRFONT # 91-120 cfont 107,BROW,118,EROW,DRFONT # over 120 cfont 121,BROW,MAXRCOLS,EROW,DRFONT # unapplied # header merge "zMrg Report Header" # detail cerase 1,7,MAXCOLS,7 cbox LEFTCOL,4.25,RIGHTCOL,6.5,1,10 const BROW=5 const EROW=6 cfont 2,BROW,9,EROW,IFONT # cust id cfont 11,BROW,23,EROW,ICFONT # phone cfont 25,BROW,28,EROW,ICFONT # sls rep cfont 30,BROW,33,EROW,ICFONT # dist cfont 35,BROW,48,EROW,IRFONT # amount cfont 51,BROW,62,EROW,IRFONT # current cfont 65,BROW,76,EROW,IRFONT # 31-60 cfont 79,BROW,90,EROW,IRFONT # 61-90 cfont 93,BROW,104,EROW,IRFONT # 91-120 cfont 107,BROW,118,EROW,IRFONT # over 120 cfont 121,BROW,MAXRCOLS,EROW,IRFONT # unapplied # customer heading font "~[(][0-9 ][0-9 ][0-9 ][)][0-9 ][0-9 ][0-9 ]-@11,8,19,MAXROWS",-9,1,37,2,DBFONT # Grand totals line erase "GRAND TOTAL",0,-1,MAXCOLS,1 box "GRAND TOTAL",-1,-1,MAXRCOLS,2,1,10 font "GRAND TOTAL",0,0,20,1,HBFONT font "End of Report",0,0,14,1,DFONT [G/L Balance Sheet] dsn_sample "../unform_test/osas/txt7/gl_bs_prev.txt" #dsn_sample "../unform_test/osas/txt7/gl_bs_budget.txt" detect 0,3,"~BALANCE SHEET WITH .* COMPARISON" detect 0,3,"~(BUDGET)|(LAST YEAR)" # set up document constants const MAXCOLS=80 # max cols to output const MAXRCOLS=79 # MAXCOLS-1 const LEFTCOL=1 # left vertical line const RIGHTCOL=80 # right vertical line const MAXROWS=66 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows const MAX_COPIES=1 pcopies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "G/L Balance Sheet" # view in pdf properties cmove LEFTCOL,1,MAXCOLS,MAXROWS,2,1 # default detail line const BROW=1 const EROW=MAXROWS cfont 2,BROW,16,EROW,DBCFONT # acnt no cfont 18,BROW,46,EROW,DFONT # desc cfont 48,BROW,60,EROW,DBRFONT # curr yr cfont 61,BROW,59,EROW,DBFONT,black # ) cfont 64,BROW,76,EROW,DBRFONT # prev yr/budget cfont 77,BROW,77,EROW,DBFONT,black # ) # header cerase LEFTCOL,1,MAXCOLS,4 cbox LEFTCOL,.1,RIGHTCOL,4,MBOXSIZE,HSHADE text 2,1.5,{trim(cut(1,1,10,""))},HFONT text 1,1.5,{trim(cut(18,1,50,""))},HBCFONT,14,cols=MAXCOLS text 1,1.5,{trim(cut(70,1,10,""))},HRFONT,cols=MAXRCOLS text 2,2.5,{trim(cut(1,2,10,""))},HFONT text 1,2.75,{trim(cut(1,3,MAXCOLS,""))},HBCFONT,12,cols=MAXCOLS text 1,3.75,{trim(cut(1,4,MAXCOLS,""))},HCFONT,cols=MAXCOLS # detail header line cerase 1,10,MAXCOLS,10 cbox LEFTCOL,6,MAXCOLS,8.5,1,DSHADE const BROW=7 const EROW=8 cfont 2,BROW,16,EROW,ICFONT # acnt no cfont 18,BROW,46,EROW,IFONT # desc cfont 48,BROW,60,EROW,IRFONT,black # curr yr cfont 64,BROW,76,EROW,IRFONT # prev yr/budget # special detail lines font "~ [A-Z]@23,11,25,MAXROWS",2,0,50,1,DBFONT,11 font "~ [A-Z]@14,11,16,MAXROWS",2,0,50,1,DBFONT,10 font "~ TOTAL@18,11,24,MAXROWS",2,0,27,1,DBFONT,10 box "~ TOTAL@18,11,24,MAXROWS",1,-.85,58,1.4,1,DSHADE erase "~ TOTAL@18,11,24,MAXROWS",0,-1,MAXCOLS,1 erase "~ TOTAL@18,11,24,MAXROWS",0,1,MAXCOLS,1 # unaudited font "UNAUDITED",0,0,9,1,HFONT [G/L Income Statement with Budget Comp] dsn_sample "../unform_test/osas/txt7/gl_inc_budget.txt" detect 0,3,"~INCOME STATEMENT WITH BUDGET COMPARISON" # set up document constants const MAXCOLS=130 # max cols to output const MAXRCOLS=129 # MAXCOLS-1 const LEFTCOL=1 # left vertical line const RIGHTCOL=130 # right vertical line const MAXROWS=60 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows const MAX_COPIES=1 pcopies MAX_COPIES landscape dpi 600 # see global constant above GSON # graphical shading title "G/L Income Statement with Budget Comp" # view in pdf properties cmove LEFTCOL,1,MAXCOLS,MAXROWS,2,1 # default detail line const BROW=1 const EROW=MAXROWS cfont 2,BROW,7,EROW,DBCFONT # acnt no cfont 9,BROW,40,EROW,DFONT # desc # current period cfont 41,BROW,52,EROW,DBRFONT,black # this yr cfont 53,BROW,53,EROW,DBFONT # - cfont 55,BROW,60,EROW,DRFONT # % cfont 61,BROW,61,EROW,DFONT,black # - cfont 63,BROW,75,EROW,DBRFONT # budget cfont 76,BROW,76,EROW,DBFONT,black # - cfont 78,BROW,83,EROW,DRFONT # % cfont 84,BROW,84,EROW,DFONT,black # - # year to date cfont 86,BROW,98,EROW,DBRFONT # this yr cfont 99,BROW,99,EROW,DBFONT,black # - cfont 101,BROW,106,EROW,DRFONT # % cfont 107,BROW,107,EROW,DFONT,black # - cfont 109,BROW,121,EROW,DBRFONT # budget cfont 122,BROW,122,EROW,DBFONT,black # - cfont 124,BROW,129,EROW,DRFONT # % cfont 130,BROW,130,EROW,DFONT,black # - # header cerase LEFTCOL,1,MAXCOLS,4 cbox LEFTCOL,.1,RIGHTCOL,4,MBOXSIZE,HSHADE text 2,1.5,{trim(cut(1,1,10,""))},HFONT text 1,1.5,{trim(cut(18,1,92,""))},HBCFONT,14,cols=MAXCOLS text 1,1.5,{trim(cut(121,1,10,""))},HRFONT,cols=MAXRCOLS text 2,2.5,{trim(cut(1,2,10,""))},HFONT text 1,2.75,{trim(cut(1,3,MAXCOLS,""))},HBCFONT,12,cols=MAXCOLS text 1,3.75,{trim(cut(1,4,MAXCOLS,""))},HCFONT,cols=MAXCOLS # detail header line cerase 1,10,MAXCOLS,10 cbox LEFTCOL,6,MAXCOLS,8.5,1,DSHADE const BROW=7 const EROW=8 cfont 2,BROW,7,EROW,ICFONT # acnt no cfont 9,BROW,40,EROW,IFONT # desc # current period const BROW=8 const EROW=8 cbox 40,7.5,89,7.5 cfont 41,7,83,7,ICFONT,black cfont 41,BROW,52,EROW,IRFONT,black # this yr cfont 55,BROW,60,EROW,IRFONT # % cfont 63,BROW,75,EROW,IRFONT # budget cfont 78,BROW,83,EROW,IRFONT # % # year to date cbox 85,7.5,129,7.5 cfont 86,7,129,7,ICFONT,black cfont 86,BROW,97,EROW,IRFONT # this yr cfont 101,BROW,106,EROW,IRFONT # % cfont 109,BROW,121,EROW,IRFONT # budget cfont 124,BROW,129,EROW,IRFONT # % # special detail lines font "~ [A-Z]@7,11,9,MAXROWS",2,0,50,1,DBFONT,11 font "~ [A-Z]@8,11,10,MAXROWS",2,0,50,1,DBFONT,10 font "~ TOTAL@10,11,16,MAXROWS",2,0,27,1,DBFONT,10 box "~ TOTAL@10,11,16,MAXROWS",1,-.85,119,1.4,1,DSHADE erase "~ TOTAL@10,11,16,MAXROWS",0,-1,MAXCOLS,1 erase "~ TOTAL@10,11,16,MAXROWS",0,1,MAXCOLS,1 font "~ TOTAL@11,11,17,MAXROWS",2,0,27,1,DBFONT,10 box "~ TOTAL@11,11,17,MAXROWS",1,-.85,118,1.4,1,DSHADE erase "~ TOTAL@11,11,17,MAXROWS",0,-1,MAXCOLS,1 erase "~ TOTAL@11,11,17,MAXROWS",0,1,MAXCOLS,1 font "~ GROSS@11,11,17,MAXROWS",2,0,27,1,DBFONT,10 box "~ GROSS@11,11,17,MAXROWS",1,-.85,118,1.4,1,HSHADE font "~ PROFI@11,11,17,MAXROWS",2,0,27,1,DBFONT,10 box "~ PROFI@11,11,17,MAXROWS",1,-.85,118,1.4,1,HSHADE font "~ NET@11,11,15,MAXROWS",2,0,27,1,DBFONT,10 box "~ NET@11,11,15,MAXROWS",1,-.85,118,1.4,1,HSHADE # unaudited font "UNAUDITED",0,0,9,1,HFONT [G/L Income Statement with Last Year Comp] dsn_sample "../unform_test/osas/txt7/gl_inc_prev.txt" detect 0,3,"~INCOME STATEMENT WITH LAST YEAR COMPARISON" # set up document constants const MAXCOLS=128 # max cols to output const MAXRCOLS=127 # MAXCOLS-1 const LEFTCOL=1 # left vertical line const RIGHTCOL=128 # right vertical line const MAXROWS=60 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows const MAX_COPIES=1 pcopies MAX_COPIES landscape dpi 600 # see global constant above GSON # graphical shading title "G/L Income Statement with Last Year Comp"# view in pdf properties cmove LEFTCOL,1,MAXCOLS,MAXROWS,2,1 # default detail line const BROW=1 const EROW=MAXROWS cfont 2,BROW,7,EROW,DBCFONT # acnt no cfont 9,BROW,37,EROW,DFONT # desc # current period cfont 38,BROW,49,EROW,DBRFONT,black # this yr cfont 50,BROW,50,EROW,DBFONT # - cfont 52,BROW,57,EROW,DRFONT # % cfont 58,BROW,58,EROW,DFONT,black # - cfont 60,BROW,71,EROW,DBRFONT # prev yr cfont 72,BROW,72,EROW,DBFONT,black # - cfont 74,BROW,81,EROW,DRFONT # % cfont 82,BROW,82,EROW,DFONT,black # - # year to date cfont 84,BROW,95,EROW,DBRFONT # this yr cfont 96,BROW,96,EROW,DBFONT,black # - cfont 98,BROW,103,EROW,DRFONT # % cfont 104,BROW,104,EROW,DFONT,black # - cfont 106,BROW,117,EROW,DBRFONT # prev yr cfont 118,BROW,118,EROW,DBFONT,black # - cfont 120,BROW,127,EROW,DRFONT # % cfont 128,BROW,128,EROW,DFONT,black # - # header cerase LEFTCOL,1,MAXCOLS,4 cbox LEFTCOL,.1,RIGHTCOL,4,MBOXSIZE,HSHADE text 2,1.5,{trim(cut(1,1,10,""))},HFONT text 1,1.5,{trim(cut(18,1,92,""))},HBCFONT,14,cols=MAXCOLS text 1,1.5,{trim(cut(121,1,10,""))},HRFONT,cols=MAXRCOLS text 2,2.5,{trim(cut(1,2,10,""))},HFONT text 1,2.75,{trim(cut(1,3,MAXCOLS,""))},HBCFONT,12,cols=MAXCOLS text 1,3.75,{trim(cut(1,4,MAXCOLS,""))},HCFONT,cols=MAXCOLS # detail header line cerase 1,10,MAXCOLS,10 cbox LEFTCOL,6,MAXCOLS,8.5,1,DSHADE const BROW=7 const EROW=8 cfont 2,BROW,6,EROW,ICFONT,black # acnt no cfont 7,BROW,37,EROW,IFONT # desc # current period const BROW=8 const EROW=8 cbox 37,7.5,81,7.5 cfont 38,7,81,7,ICFONT,black cfont 38,BROW,49,EROW,IRFONT,black # this yr cfont 52,BROW,57,EROW,IRFONT # % text 60,BROW,{trim(cut(65,8,9,""))},IRFONT,cols=13 # prev yr cfont 74,BROW,81,EROW,IRFONT # % # year to date cbox 83,7.5,127,7.5 cfont 84,7,127,7,ICFONT,black cfont 84,BROW,95,EROW,IRFONT # this yr cfont 98,BROW,103,EROW,IRFONT # % text 106,BROW,{trim(cut(111,8,9,""))},IRFONT,cols=12 # prev yr cfont 120,BROW,127,EROW,IRFONT # % # special detail lines font "~ [A-Z]@5,11,7,MAXROWS",2,0,50,1,DBFONT,11 font "~ [A-Z]@6,11,8,MAXROWS",2,0,50,1,DBFONT,10 font "~ TOTAL@8,11,14,MAXROWS",2,0,27,1,DBFONT,10 box "~ TOTAL@8,11,14,MAXROWS",1,-.85,119,1.4,1,DSHADE erase "~ TOTAL@8,11,14,MAXROWS",0,-1,MAXCOLS,1 erase "~ TOTAL@8,11,14,MAXROWS",0,1,MAXCOLS,1 font "~ TOTAL@9,11,15,MAXROWS",2,0,27,1,DBFONT,10 box "~ TOTAL@9,11,15,MAXROWS",1,-.85,118,1.4,1,DSHADE erase "~ TOTAL@9,11,15,MAXROWS",0,-1,MAXCOLS,1 erase "~ TOTAL@9,11,15,MAXROWS",0,1,MAXCOLS,1 font "~ GROSS@9,11,15,MAXROWS",2,0,27,1,DBFONT,10 box "~ GROSS@9,11,15,MAXROWS",1,-.85,118,1.4,1,HSHADE font "~ PROFI@9,11,15,MAXROWS",2,0,27,1,DBFONT,10 box "~ PROFI@9,11,15,MAXROWS",1,-.85,118,1.4,1,HSHADE font "~ NET@9,11,15,MAXROWS",2,0,27,1,DBFONT,10 box "~ NET@9,11,15,MAXROWS",1,-.85,118,1.4,1,HSHADE font "~FEDERAL INCOME TAX EXPENSE@6,11,33,MAXROWS",0,0,26,1,DBFONT,black font "~STATE INCOME TAX EXPENSE@6,11,33,MAXROWS",0,0,26,1,DBFONT,black # unaudited font "UNAUDITED",0,0,9,1,HFONT [G/L Trial Balance] #dsn_sample "../unform_test/osas/txt7/gl_tb_prev.txt" #dsn_sample "../unform_test/osas/txt7/gl_tb_budget.txt" dsn_sample "../unform_test/osas/txt7/gl_tb_actual.txt" detect 0,3,"TRIAL BALANCE" detect 1,8,"GL" # set up document constants const MAXCOLS=131 # max cols to output const MAXRCOLS=130 # MAXCOLS-1 const LEFTCOL=1 # left vertical line const RIGHTCOL=131 # right vertical line const MAXROWS=66 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows const MAX_COPIES=1 pcopies MAX_COPIES landscape dpi 600 # see global constant above GSON # graphical shading title "G/L Trial Balance" # view in pdf properties cmove LEFTCOL,1,MAXCOLS,MAXROWS,2,1 # default detail line const BROW=1 const EROW=MAXCOLS cfont 2,BROW,14,EROW,DBFONT # acnt # cfont 16,BROW,51,EROW,DBFONT # desc cfont 55,BROW,67,EROW,DBRFONT # debit cfont 75,BROW,87,EROW,DBRFONT # credit cfont 98,BROW,110,EROW,DBRFONT # debit cfont 118,BROW,130,EROW,DBRFONT # credit # header cerase LEFTCOL,1,MAXCOLS,4 cbox LEFTCOL,.1,RIGHTCOL,4,MBOXSIZE,HSHADE text 2,1.5,{trim(get(1,1,10))},HFONT text 1,1.5,{trim(get(11,1,110))},HBCFONT,14,cols=MAXCOLS text 1,2.75,{trim(get(11,3,110))},HBCFONT,12,cols=MAXCOLS text 1,1.5,{trim(get(122,1,10))},HRFONT,cols=MAXRCOLS text 2,2.75,{trim(get(1,3,10))},HFONT text 1,2.75,{trim(get(1,2,10))},HRFONT,cols=MAXRCOLS text 1,3.75,{trim(get(11,4,110))},HCFONT,cols=MAXCOLS text 2,3.75,{trim(get(1,4,10))},HFONT # detail header line cerase 1,9,MAXCOLS,9 cbox LEFTCOL,5,MAXCOLS,9,1,DSHADE const BROW=8 const EROW=8 cfont 55,6,96,7,ICFONT,10 cfont 98,6,136,7,ICFONT,10 cfont 2,BROW,14,EROW,IFONT # acnt # cfont 16,BROW,51,EROW,IFONT # desc cfont 55,BROW,67,EROW,IRFONT # debit cfont 75,BROW,87,EROW,IRFONT # credit cfont 98,BROW,110,EROW,IRFONT # debit cfont 118,BROW,130,EROW,IRFONT # credit # totals erase " BALANCE@14,10,22,MAXROWS",0,-1,MAXCOLS,1 erase " BALANCE@14,10,22,MAXROWS",0,1,MAXCOLS,1 box " BALANCE@14,10,22,MAXROWS",1,-1,116,2,MBOXSIZE,HSHADE font "End of Report",0,0,13,1,HFONT #*************************************************************** # Inactive or testing rule sets * #*************************************************************** # # Plain paper forms - if you prefer these layouts over the ones above # then swap the rule sets # [SO Invoice - plain] dsn_sample "../unform_test/osas/txt7/so_invc_plain.txt" # handles invoice, quote, credit memo detect 0,2,"~(I N V O I C E)|(C R E D I T)|(Q U O T E)" # set up document constants const MAXCOLS=120 # max cols to output const MAXRCOLS=119 # MAXCOLS-1 const LEFTCOL=1 # left vertical line const RIGHTCOL=120 # right vertical line const MAXROWS=66 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows const CUSTOMER_COPY=1 const FILE_COPY=2 const MAX_COPIES=2 pcopies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "S/O Invoice - Plain Paper" # view in pdf properties prejob { logocols=14,logorows=6 dim copy_title$[MAX_COPIES] if MAX_COPIES>=1 then copy_title$[CUSTOMER_COPY]="Customer Copy" if MAX_COPIES>=2 then copy_title$[FILE_COPY]="File Copy" } prepage { if trim(get(70,1,80))<>"" then pcopies=CUSTOMER_COPY, copy_title$[CUSTOMER_COPY]=trim(get(70,1,80)) # get invoice title doc_title$="INVOICE",reprint$="" # get title from body of invoice, if available. # Must handle credit memo text/quote. x$=trim(cut(70,2,50,"")) x=pos("REPRINT"=x$) if x then reprint$="REPRINT" x=pos("C R E D I T"=X$) if x then doc_title$="CREDIT MEMO" x=pos("Q U O T E"=X$) if x then doc_title$="QUOTE" merge "z Mrg get watermark text" xcol=30,xrow=1 merge "zMrg get company info" amount_paid$=trim(get(80,55,20)) amt_paid$=trim(get(100,55,20)) net_due$=trim(get(80,57,20)) nt_due$=trim(get(100,57,20)) if amount_paid$="" then goto no_amount_paid amount_paid$=amount_paid$(1,len(amount_paid$)-1) # remove colon net_due$=net_due$(1,len(net_due$)-1) # remove colon x$="cbox 85,53,MAXCOLS,56,1,ccols=104::DSHADE,crows=54.5" exec(x$) x$="text 86,54,"+$22$+amount_paid$+$22$+",IFONT,11" exec(x$) x$="text 108,54,"+$22$+amt_paid$+$22$+",DBRFONT,11,cols=12" exec(x$) x$="text 86,55.5,"+$22$+net_due$+$22$+",IBFONT,11" exec(x$) x$="text 108,55.5,"+$22$+nt_due$+$22$+",DBRFONT,11,cols=12" exec(x$) no_amount_paid: # continued? cont$="",sub_line=47 for i=47 to MAXROWS x=pos("(continued"=text$[i]) if x then cont$="Continued on next page ..."; sub_line=55; x$=set(x,i,30,""); break next i if cont$="" then exec("cbox LEFTCOL,51.5,MAXCOLS,53.5,MBOXSIZE,crows=52.5::ISHADE, ccols=25 40 55 70 85") if cont$<>"" then exec("erase 1,52,MAXCOLS,53") } # more room at top cmove LEFTCOL,1,RIGHTCOL,MAXROWS,1,2 # default detail line const BROW=1 const EROW=MAXROWS cfont 2,BROW,45,EROW,DBLFONT # item # cfont 47,BROW,54,EROW,DBFONT,black # o/s cfont 55,BROW,68,EROW,DBRFONT # qty cfont 70,BROW,76,EROW,DBCFONT # units cfont 78,BROW,99,EROW,DBRFONT # price cfont 101,BROW,MAXRCOLS,EROW,DBRFONT # ext cbox LEFTCOL,19.5,MAXCOLS,48,MBOXSIZE,CROWS=20.5::DSHADE, ccols=46 69 77 100 const BROW=20 const EROW=20 cfont 2,BROW,45,EROW,ILFONT # item # cfont 47,BROW,68,EROW,ICFONT # qtys cfont 70,BROW,76,EROW,ICFONT # units cfont 78,BROW,99,EROW,IRFONT # price cfont 101,BROW,MAXRCOLS,EROW,IRFONT # ext # header section cerase 1,1,MAXCOLS,8 cbox LEFTCOL,1,RIGHTCOL,MAXROWS,MBOXSIZE,crows=9:MBOXSIZE merge "zMrg Form Header" # page block text 1,7,{trim(get(111,6,10))},HFONT,right,cols=MAXRCOLS # address region cbox LEFTCOL,9,MAXCOLS,16,MBOXSIZE,ccols=10 19::ISHADE 70 79::ISHADE cfont 11,10,18,10,IFONT cfont 21,8,69,15,DFONT cfont 71,10,78,10,IFONT cfont 80,8,MAXRCOLS,15,DFONT text 21,15,{"Your customer code is "+trim(get(20,7,10))},DFONT # subhead 1 cbox LEFTCOL,16,MAXCOLS,18.5,MBOXSIZE,crows=17.5::ISHADE, ccols=30 38 49 64 85 106 cfont 2,17,29,17,ICFONT,black cfont 31,17,37,17,ICFONT,black cfont 39,17,48,17,ICFONT,black cfont 50,17,63,17,ICFONT,black cfont 65,17,84,17,ICFONT,black cfont 86,17,105,17,ICFONT,black cfont 107,17,MAXCOLS,17,ICFONT cfont 2,18,29,18,DCFONT,black cfont 31,18,37,18,DCFONT,black cfont 39,18,48,18,DCFONT,black cfont 39,19,84,19,DCFONT,black cfont 50,18,63,18,DCFONT,black cfont 65,18,84,18,DCFONT,black cfont 86,18,105,18,DCFONT,black cfont 107,18,MAXCOLS,18,DCFONT,black # watermark - large font with light shading WATERMARK 1,47.5,{doc_title$},cgtimes,120,shade=WATERMARK_SHADE,center,cols=MAXCOLS,fit,spacing=.75 # message area cbox LEFTCOL,48,MAXCOLS,51.5,MBOXSIZE cfont 2,49,91,51,IFONT,black cfont 93,51,102,51,IFONT,black # totals cfont 1,52,24,52,IRFONT,black cfont 26,52,39,52,IRFONT,black cfont 41,52,54,52,IRFONT,black cfont 56,52,69,52,IRFONT,black cfont 71,52,84,52,IRFONT,black cfont 86,52,MAXRCOLS,52,IRFONT,black cfont 1,53,24,53,DBRFONT,black cfont 26,53,39,53,DBRFONT,black cfont 41,53,54,53,DBRFONT,black cfont 56,53,69,53,DBRFONT,black cfont 71,53,84,53,DBRFONT,black cfont 86,53,MAXRCOLS,53,DBRFONT,black text 1,{MAXROWS-.5},{copy_title$[copy]},HBCFONT,12,cols=MAXCOLS text 1,{MAXROWS-.5},{cont$},HBRFONT,cols=MAXRCOLS cerase 80,55,MAXCOLS,58 [SO Invoice - std] dsn_sample "../unform_test/osas/txt7/so_invc_std.txt" detect 0,10,"~DATEMASK" detect 80,1,"Page" detect 98,1,"Page" # set up document constants const MAXCOLS=93 # max cols to output const MAXRCOLS=92 # MAXCOLS-1 const LEFTCOL=1 # left vertical line const RIGHTCOL=93 # right vertical line const MAXROWS=66 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows page 51 const CUSTOMER_COPY=1 const REMITTANCE_COPY=2 const FILE_COPY=3 const MAX_COPIES=3 pcopies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "S/O Invoice - Standard" # view in pdf properties prejob { logocols=14,logorows=6 dim copy_title$[MAX_COPIES] if MAX_COPIES>=1 then copy_title$[CUSTOMER_COPY]="Customer Copy" if MAX_COPIES>=2 then copy_title$[REMITTANCE_COPY]="Remittance Copy" if MAX_COPIES>=3 then copy_title$[FILE_COPY]="File Copy" } prepage { if trim(get(50,1,27))<>"" then pcopies=CUSTOMER_COPY, copy_title$[CUSTOMER_COPY]=trim(get(50,1,27)) # get invoice title doc_title$="INVOICE" pageno$=trim(get(80,1,10)) custno$=trim(get(8,2,10)) title$=trim(get(50,2,40)) if title$="" then title$="INVOICE" x$=title$ merge "zMrg get watermark text" xcol=0,xrow=0 merge "zMrg get company info" # replace dbl space with ff's before removing single spaces x=pos(" "=x$) while x>0 x$(x,1)=$ff$ x=pos(" "=x$) wend # remove <'s and >'s and extra spaces x=pos("<"=x$) if x=0 then x=pos(">"=x$) if x=0 then x=pos(" "=x$) while x>0 x$=trim(x$(1,x-1)+x$(x+1)) x=pos("<"=x$) if x=0 then x=pos(">"=x$) if x=0 then x=pos(" "=x$) wend # now remove ff's x=pos($ff$=x$) while x>0 x$(x,1)="" x=pos($ff$=x$) wend if x$>"" then title$=x$ # now move down to allow space for logo, etc. for i=MAXROWS to 9 step -1 text$[i]=text$[i-6] text$[i-6]="" next i remit$="Remittance Copy - Please return with payment" # continued? cont$="",sub_line=30 for i=30 to MAXROWS x=pos("(continued"=text$[i]) if x then cont$="Continued on next page ..."; sub_line=55; x$=set(x,i,30,""); break next i if cont$="" then exec("cbox LEFTCOL,47,MAXCOLS,50,1,crows=48.5::ISHADE, ccols=14 27 40 52 64") if cont$="" then exec("text 1,48,""Non-Taxable"",IRFONT,cols=13") if cont$="" then exec("text 15,48,""Taxable"",IRFONT,cols=12") if cont$="" then exec("text 28,48,""Sales Tax"",IRFONT,cols=12") if cont$="" then exec("text 41,48,""Freight"",IRFONT,cols=11") if cont$="" then exec("text 53,48,""Misc"",IRFONT,cols=11") if cont$="" then exec("text 65,48,""Invoice Total"",IBRFONT,cols=27") } cmove LEFTCOL,1,RIGHTCOL,MAXROWS,2,2 # default detail line const BROW=1 const EROW=MAXROWS cfont 2,BROW,36,EROW,DBFONT # item # cfont 38,BROW,45,EROW,DBFONT,black # o/s cfont 46,BROW,59,EROW,DBRFONT # qty cfont 61,BROW,65,EROW,DBCFONT # units cfont 67,BROW,80,EROW,DBRFONT # price cfont 82,BROW,91,EROW,DBRFONT # ext cbox LEFTCOL,18.5,MAXCOLS,44,MBOXSIZE,CROWS=19.5::DSHADE, ccols=37 60 66 81 text 2,19,"Item/Description",ILFONT text 38,19,"Quantities",IRFONT,cols=22 text 61,19,"Units",ICFONT,cols=5 text 67,19,"Price",IRFONT,cols=14 text 82,19,"Amount",IRFONT,cols=11 # header section cerase 1,1,MAXCOLS,8 cerase 93,1,110,MAXROWS cbox LEFTCOL,1,RIGHTCOL,MAXROWS,MBOXSIZE,crows=9:MBOXSIZE merge "zMrg Form Header" # page block text 1,8,{pageno$},HRFONT,cols=MAXRCOLS # address region cbox LEFTCOL,9,MAXCOLS,15,ccols=7::ISHADE 44 51::ISHADE text 2,10,"Sold\nTo",IFONT text 2,12,{custno$},DFONT text 45,10,"Ship\nTo",IFONT cfont 8,8,43,14,DFONT cfont 52,8,MAXRCOLS,14,DFONT # subhead 1 cbox LEFTCOL,15,MAXCOLS,17.5,MBOXSIZE,crows=16.5::ISHADE,ccols=12 19 34 45 67 83 cbox LEFTCOL,17.5,MAXCOLS,18.5,MBOXSIZE,ccols=19 67 text 1,16,"Date",ICFONT,cols=11 text 13,16,"Rep ID",IFONT text 20,16,"Order No",IFONT text 35,16,"Ord Date",ICFONT,cols=10 text 46,16,"Ship Via",IFONT text 68,16,"Terms",IFONT text 84,16,"Invoice No",IFONT cfont 1,17,11,17,DCFONT cfont 13,17,18,17,DFONT cfont 20,17,33,17,DFONT cfont 20,18,66,18,DFONT cfont 35,17,44,17,DCFONT cfont 46,17,66,17,DFONT cfont 68,17,82,17,DFONT cfont 84,17,MAXCOLS,17,DFONT # watermark - large font with light shading WATERMARK 1,43.25,{doc_title$},cgtimes,120,shade=WATERMARK_SHADE,center,cols=MAXCOLS,fit,spacing=.75 # message area cbox LEFTCOL,44,MAXCOLS,47,MBOXSIZE cfont 1,45,MAXCOLS,45,IFONT,black cfont 1,46,66,46,IFONT,black cfont 68,46,78,46,IFONT cfont 79,46,91,46,IRFONT,black # totals cfont 1,49,13,49,DBRFONT cfont 15,49,26,49,DBRFONT cfont 28,49,39,49,DBRFONT cfont 41,49,51,49,DBRFONT,black cfont 53,49,63,49,DBRFONT cfont 65,49,92,49,DBRFONT,black text 1,{MAXROWS-.5},{copy_title$[copy]},HBCFONT,12,cols=MAXCOLS text 1,{MAXROWS-.5},{cont$},HBRFONT,cols=MAXRCOLS [SO Pick Slip - plain] dsn_sample "../unform_test/osas/txt7/so_pick_plain.txt" detect 0,1,"P I C K I N G S L I P" # set up document constants const MAXCOLS=125 # max cols to output const MAXRCOLS=124 # MAXCOLS-1 const LEFTCOL=1 # left vertical line const RIGHTCOL=125 # right vertical line const MAXROWS=66 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows const WHSE_COPY=1 const MAX_COPIES=1 pcopies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "S/O Picking Slip - Plain" # view in pdf properties prejob { logocols=14,logorows=6 doc_title$="PICKING SLIP" merge "zMrg get watermark text" # set up copy titles dim copy_title$[MAX_COPIES] if MAX_COPIES>=1 then copy_title$[WHSE_COPY]="Warehouse Copy" } prepage { if trim(get(70,2,60))<>"" then pcopies=WHSE_COPY, copy_title$[WHSE_COPY]=trim(get(70,2,60)) xcol=31,xrow=2 merge "zMrg get company info" shipto$="" soldto$="" if trim(get(26,12,10))<>"" then shipto$="Your ship to code is "+trim(cut(26,12,10,"")) if trim(get(67,12,10))<>"" then soldto$="Your customer code is "+trim(cut(67,12,10,"")) # continued? cont$="",sub_line=52 for i=52 to MAXROWS x=pos("(continued"=text$[i]) if x then cont$="Continued on next page ..."; sub_line=55; x$=set(x,i,30,""); break next i } cmove LEFTCOL,1,MAXCOLS,MAXROWS,1,3 # default detail line cbox LEFTCOL,21.5,RIGHTCOL,64,MBOXSIZE,crows=22.5::DSHADE,ccols=14 54 65 72 88 107 const BROW=1 const EROW=MAXROWS cfont 10,BROW,13,EROW,DBCFONT # line # cfont 15,BROW,53,EROW,DFONT # item #/desc cfont 55,BROW,64,EROW,DBCFONT # bin cfont 66,BROW,71,EROW,DBCFONT # units cfont 73,BROW,87,EROW,DBRFONT # qty ord cfont 89,BROW,106,EROW,DBRFONT # qty ship cfont 108,BROW,MAXRCOLS,EROW,DBRFONT # qty b/o const BROW=22 const EROW=22 cfont 10,BROW,13,EROW,ICFONT # line # cfont 15,BROW,53,EROW,IFONT # item #/desc cfont 55,BROW,64,EROW,ICFONT # bin cfont 66,BROW,71,EROW,ICFONT # units cfont 73,BROW,87,EROW,IRFONT # qty ord cfont 89,BROW,106,EROW,IRFONT # qty ship cfont 108,BROW,MAXRCOLS,EROW,IRFONT # qty b/o # header section cerase 1,1,MAXCOLS,8 cbox LEFTCOL,1,RIGHTCOL,MAXROWS,MBOXSIZE,crows=9:MBOXSIZE merge "zMrg Form Header" # right header cbox 100,5.5,RIGHTCOL,7.5,1,ccols=115::ISHADE,crows=6.5 text 101,6,"Batch No.",IFONT text 116,6,{trim(cut(83,5,6,""))},DBFONT text 101,7,"Picking Slip #",IFONT text 116,7,{trim(cut(107,6,15,""))},DBFONT # ribbon section cbox LEFTCOL,9,RIGHTCOL,12.5,MBOXSIZE,crows=10.5::ISHADE, ccols=9 21 34 44 55 72 115 cbox 91,9,115,11.5 cfont 10,10,20,10,ICFONT cfont 22,10,33,10,ICFONT cfont 35,10,43,10,ICFONT cfont 45,10,54,10,ICFONT cfont 56,10,71,10,ICFONT cfont 73,10,90,10,ICFONT cfont 92,10,113,10,ICFONT cfont 115,10,MAXCOLS,10,ICFONT cfont 10,11,20,11,DBCFONT,black cfont 22,11,33,11,DBCFONT,black cfont 35,11,43,11,DBCFONT,black cfont 45,11,54,11,DBCFONT,black cfont 56,11,71,11,DBCFONT,black cfont 73,11,90,11,DBCFONT,black cfont 73,12,113,12,DBFONT,black cfont 92,11,113,11,DBCFONT,black cfont 115,11,MAXCOLS,11,DBCFONT,black # ship to section cbox LEFTCOL,12.5,MAXCOLS,21.5,MBOXSIZE,ccols=10::ISHADE 57 66::ISHADE text 2,13,{trim(cut(17,13,8,""))},ICFONT,cols=8 text 11,13,{mcut(26,13,30,5,"","Y","Y")},DBFONT text 11,21,{shipto$},DBFONT # sold to section text 58,13,{trim(cut(58,13,8,""))},ICFONT,cols=8 text 67,13,{mcut(67,13,30,5,"","Y","Y")},DBFONT text 67,21,{soldto$},DBFONT # watermark - large font with light shading WATERMARK 1,63.5,{doc_title$},cgtimes,120,shade=WATERMARK_SHADE,center,cols=MAXCOLS,fit,spacing=.75 # footer text 1,{MAXROWS-.5},{copy_title$[copy]},HBCFONT,12,cols=MAXCOLS text 1,{MAXROWS-.5},{cont$},HBRFONT,cols=MAXRCOLS cfont 2,63,MAXCOLS,65,IFONT # memo lines [SO Pack List - plain] dsn_sample "../unform_test/osas/txt7/so_pack_plain.txt" detect 0,1,"P A C K I N G L I S T" # set up document constants const MAXCOLS=125 # max cols to output const MAXRCOLS=124 # MAXCOLS-1 const LEFTCOL=1 # left vertical line const RIGHTCOL=125 # right vertical line const MAXROWS=66 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows const CUSTOMER_COPY=1 const MAX_COPIES=1 pcopies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "S/O Packing List - Plain" # view in pdf properties prejob { logocols=14,logorows=6 doc_title$="PACKING LIST" merge "zMrg get watermark text" # set up copy titles dim copy_title$[MAX_COPIES] if MAX_COPIES>=1 then copy_title$[CUSTOMER_COPY]="Customer Copy" } prepage { if trim(get(80,2,80))<>"" then pcopies=CUSTOMER_COPY, copy_title$[CUSTOMER_COPY]=trim(get(80,2,80)) xcol=31,xrow=2 merge "zMrg get company info" shipto$="" soldto$="" if trim(get(26,11,10))<>"" then shipto$="Your ship to code is "+trim(cut(26,11,10,"")) if trim(get(67,11,10))<>"" then soldto$="Your customer code is "+trim(cut(67,11,10,"")) # continued? cont$="",sub_line=50 for i=50 to MAXROWS x=pos("(continued"=text$[i]) if x then cont$="Continued on next page ..."; sub_line=55; x$=set(x,i,30,""); break next i } cmove LEFTCOL,1,MAXCOLS,MAXROWS,1,4 # default detail line cbox LEFTCOL,21.5,RIGHTCOL,64,MBOXSIZE,crows=22.5::DSHADE,ccols=14 54 65 72 88 107 const BROW=1 const EROW=MAXROWS cfont 10,BROW,13,EROW,DBCFONT # line # cfont 15,BROW,53,EROW,DFONT # item #/desc cfont 55,BROW,64,EROW,DBCFONT # bin cfont 66,BROW,71,EROW,DBCFONT # units cfont 73,BROW,87,EROW,DBRFONT # qty ord cfont 89,BROW,106,EROW,DBRFONT # qty ship cfont 108,BROW,MAXRCOLS,EROW,DBRFONT # qty b/o const BROW=22 const EROW=22 cfont 10,BROW,13,EROW,ICFONT # line # cfont 15,BROW,53,EROW,IFONT # item #/desc cfont 55,BROW,64,EROW,ICFONT # bin cfont 66,BROW,71,EROW,ICFONT # units cfont 73,BROW,87,EROW,IRFONT # qty ord cfont 89,BROW,106,EROW,IRFONT # qty ship cfont 108,BROW,MAXRCOLS,EROW,IRFONT # qty b/o # header section cerase 1,1,MAXCOLS,7 cbox LEFTCOL,1,RIGHTCOL,MAXROWS,MBOXSIZE,crows=9.5:MBOXSIZE merge "zMrg Form Header" # right header cbox 100,5.5,RIGHTCOL,7.5,1,ccols=115::ISHADE,crows=6.5 text 101,6,"Batch No.",IFONT text 116,6,{trim(cut(83,4,6,""))},DBFONT text 101,7,"Picking Slip #",IFONT text 116,7,{trim(cut(107,5,15,""))},DBFONT # ribbon section cbox LEFTCOL,9.5,RIGHTCOL,12.5,MBOXSIZE,crows=10.5::ISHADE, ccols=9 21 34 44 55 72 115 cbox 92,9.5,115,11.5 cfont 10,10,20,10,ICFONT cfont 22,10,33,10,ICFONT cfont 35,10,43,10,ICFONT cfont 45,10,54,10,ICFONT cfont 56,10,71,10,ICFONT cfont 73,10,90,10,ICFONT cfont 92,10,113,10,ICFONT cfont 115,10,MAXCOLS,10,ICFONT cfont 10,11,20,11,DBCFONT,black cfont 22,11,33,11,DBCFONT,black cfont 35,11,43,11,DBCFONT,black cfont 45,11,54,11,DBCFONT,black cfont 56,11,71,11,DBCFONT,black cfont 73,11,90,11,DBCFONT,black cfont 73,12,113,12,DBFONT,black cfont 92,11,113,11,DBCFONT,black cfont 115,11,MAXCOLS,11,DBCFONT,black # ship to section cbox LEFTCOL,12.5,MAXCOLS,21.5,MBOXSIZE,ccols=10::ISHADE 57 66::ISHADE text 2,13,{trim(cut(17,12,8,""))},ICFONT,cols=8 text 11,13,{mcut(26,12,30,4,"","Y","Y")},DBFONT text 11,21,{shipto$},DBFONT # sold to section text 58,13,{trim(cut(58,12,8,""))},ICFONT,cols=8 text 67,13,{mcut(67,12,30,4,"","Y","Y")},DBFONT text 67,21,{soldto$},DBFONT # watermark - large font with light shading WATERMARK 1,63.5,{doc_title$},cgtimes,120,shade=WATERMARK_SHADE,center,cols=MAXCOLS,fit,spacing=.75 # footer text 1,{MAXROWS-.5},{copy_title$[copy]},HBCFONT,12,cols=MAXCOLS text 1,{MAXROWS-.5},{cont$},HBRFONT,cols=MAXRCOLS cfont 2,63,MAXCOLS,65,IFONT # memo lines [PO Order - plain] dsn_sample "../unform_test/osas/txt7/po_plain.txt" detect 0,1,"Purchase Order" # set up document constants const MAXCOLS=113 # max cols to output const MAXRCOLS=112 # MAXCOLS-1 const LEFTCOL=1 # left vertical line const RIGHTCOL=113 # right vertical line const MAXROWS=66 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows page MAXROWS # no form feeds const VENDOR_COPY=1 const FILE_COPY=2 const MAX_COPIES=2 pcopies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "P/O Order - Plain" # view in pdf properties prejob { logocols=14,logorows=6 dim copy_title$[MAX_COPIES] if MAX_COPIES>=1 then copy_title$[VENDOR_COPY]="Vendor Copy" if MAX_COPIES>=2 then copy_title$[FILE_COPY]="File Copy" doc_title$="PURCHASE ORDER" merge "zMrg get watermark text" } prepage { xcol=6,xrow=1 merge "zMrg get company info" # continued? cont$="",sub_line=52 for i=52 to MAXROWS x=pos("(continued"=text$[i]) if x then cont$="Continued"; sub_line=55; x$=set(x,i,30,""); break next i } # shift over 1 for more room on left cmove LEFTCOL,1,RIGHTCOL,MAXROWS,2,1 # default detail line cerase LEFTCOL,22,MAXCOLS,22 cerase LEFTCOL,24,MAXCOLS,24 cbox LEFTCOL,22,RIGHTCOL,{sub_line},MBOXSIZE,crows=24::DSHADE, ccols=6 50 61 68 81 95 const BROW=1 const EROW=MAXROWS cfont 2,BROW,4,EROW,DBCFONT # line # cfont 6,BROW,49,EROW,DBFONT # item # cfont 51,BROW,60,EROW,DBRFONT # price cfont 62,BROW,67,EROW,DBCFONT # units cfont 69,BROW,80,EROW,DBRFONT # qty ord cfont 82,BROW,94,EROW,DBRFONT # qty rcvd cfont 96,BROW,MAXRCOLS,EROW,DBRFONT # b/o cfont 2,BROW,5,EROW,ICFONT # line # cfont 7,BROW,49,EROW,IFONT # item # cfont 51,BROW,60,EROW,IRFONT # price cfont 62,BROW,67,EROW,ICFONT # units cfont 69,BROW,80,EROW,IRFONT # qty ord cfont 82,BROW,94,EROW,IRFONT # qty rcvd cfont 96,BROW,MAXRCOLS,EROW,IRFONT # b/o # header section cerase 1,1,MAXCOLS,9 cbox LEFTCOL,1,RIGHTCOL,MAXROWS,MBOXSIZE,crows=9:MBOXSIZE merge "zMrg Form Header" # PO block cbox 88,5.5,MAXCOLS,8.5,1,ccols=102::ISHADE,crows=6.5 7.5 text 89,6,"PO Number",DFONT text 89,7,"Page",DFONT text 89,8,"Req'd Ship Date",DFONT text 103,6,{trim(get(69,4,10))},DBFONT text 103,7,{trim(get(83,4,10))},DBFONT text 103,8,{trim(get(69,7,14))},DBFONT # ribbon info cerase LEFTCOL,12,RIGHTCOL,12 cbox LEFTCOL,9,RIGHTCOL,12,MBOXSIZE,crows=10.5::ISHADE, ccols=12 33 44 69 cfont 2,10,11,10,ICFONT cfont 13,10,32,10,ICFONT cfont 34,10,43,10,ICFONT cfont 45,10,67,10,ICFONT cfont 69,10,MAXCOLS,10,ICFONT cfont 2,11,11,11,DBCFONT cfont 13,11,32,11,DBCFONT cfont 34,11,43,11,DBCFONT cfont 45,11,67,11,DBCFONT cfont 69,11,MAXRCOLS,11,DBCFONT # vendor address cmove 12,20,MAXRCOLS,21,13,20 cmove 49,20,MAXRCOLS,21,62,20 cbox LEFTCOL,12,MAXCOLS,22,MBOXSIZE,ccols=12::ISHADE 50 61::ISHADE cfont 10,13,10,21,ICFONT cfont 13,13,49,21,DBFONT # vend addr cfont 59,13,59,21,ICFONT cfont 62,13,MAXRCOLS,21,DBFONT # ship to addr # line detail # description font " @2,24,2,51",5,0,77,1,DFONT # description # watermark - large font with light shading WATERMARK 1,51.25,{doc_title$},cgtimes,120,shade=WATERMARK_SHADE,center,cols=MAXCOLS,fit,spacing=.75 # sub totals cerase LEFTCOL,55,RIGHTCOL,55 cbox "Subtotal@1,53",-6,-1,RIGHTCOL,55,MBOXSIZE,crows=53.5::HSHADE box "Subtotal@1,53",9,-1,1,3 box "Tax@1,53",4,-1,1,3 box "Freight@1,53",8,-1,1,3 box "Misc.@1,53",6,-1,1,3 box "Prepaid@1,53",8,-1,1,3 box "Total@1,53",6,-1,1,3 font "Subtotal@1,53",0,0,9,1,IRFONT font "Tax@1,53",0,0,4,1,IRFONT font "Freight@1,53",0,0,8,1,IRFONT font "Misc.@1,53",0,0,6,1,IRFONT,black font "Prepaid@1,53",0,0,8,1,IRFONT,black font "Total@1,53",0,0,6,1,IRFONT,black font "Subtotal@1,53",-4,1,13,1,DBRFONT font "Tax@1,53",-10,1,14,1,DBRFONT font "Freight@1,53",-6,1,14,1,DBRFONT font "Misc.@1,53",-8,1,14,1,DBRFONT font "Prepaid@1,53",-6,1,14,1,DBRFONT font "Total@1,53",-9,1,15,1,DBRFONT # message area cbox LEFTCOL,55,MAXCOLS,MAXROWS,MBOXSIZE cfont 2,56,10,56,IFONT cfont 12,56,60,56,IFONT cfont 2,57,60,65,IFONT # approval line cerase 61,56,RIGHTCOL,65 cbox 65,58,MAXRCOLS,58 text 65.5,58.75,"Received by",HCFONT,cols=45 cbox 65,62,MAXRCOLS,62 text 65.5,62.75,"Authorized Signature",HCFONT,cols=45 text 1,{MAXROWS-.5},{copy_title$[copy]},HBCFONT,12,cols=MAXCOLS text 1,{MAXROWS-.5},{cont$},HBRFONT,cols=MAXRCOLS [AR Statement - plain] dsn_sample "../unform_test/osas/txt7/ar_plainpaper_stmt.txt" detect 0,1,"S T A T E M E N T" # set up document constants const MAXCOLS=80 # max cols to output const MAXRCOLS=79 # MAXCOLS-1 const LEFTCOL=1 # left vertical line const RIGHTCOL=80 # right vertical line const MAXROWS=66 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows const CUSTOMER_COPY=1 const REMITTANCE_COPY=2 const FILE_COPY=3 const MAX_COPIES=3 pcopies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "A/R Statement - Plain" # view in pdf properties prejob { doc_title$="STATEMENT" merge "zMrg get watermark text" logocols=12,logorows=6 dim copy_title$[MAX_COPIES] if MAX_COPIES>=1 then copy_title$[CUSTOMER_COPY]="Customer Copy" if MAX_COPIES>=2 then copy_title$[REMITTANCE_COPY]="Remittance Copy" if MAX_COPIES>=3 then copy_title$[FILE_COPY]="File Copy" } prepage { xcol=2,xrow=3 merge "zMrg get company info" } # make space on left & top cmove LEFTCOL,1,RIGHTCOL,MAXROWS,2,2 # default detail line const BROW=1 const EROW=MAXROWS cfont 2,BROW,11,EROW,DBCFONT # date cfont 13,BROW,20,EROW,DFONT # inv # cfont 22,BROW,26,EROW,DCFONT # type cfont 28,BROW,34,EROW,DFONT # check # cfont 36,BROW,46,EROW,DBRFONT # charges cfont 48,BROW,58,EROW,DBRFONT # credits cfont 60,BROW,MAXRCOLS,EROW,DBRFONT # balance # detail section cerase LEFTCOL,16,RIGHTCOL,16 cerase LEFTCOL,18,RIGHTCOL,18 cbox LEFTCOL,16,RIGHTCOL,49,MBOXSIZE,crows=18::DSHADE, ccols=12 21 27 35 47 59 const BROW=17 const EROW=17 cfont 2,BROW,11,EROW,ICFONT # date cfont 13,BROW,20,EROW,IFONT # inv # cfont 22,BROW,26,EROW,ICFONT # type cfont 28,BROW,34,EROW,IFONT # check # cfont 36,BROW,46,EROW,IRFONT # charges cfont 48,BROW,58,EROW,IRFONT # credits cfont 60,BROW,MAXRCOLS,EROW,IRFONT # balance # header section cerase 1,1,MAXCOLS,9 cbox LEFTCOL,1,RIGHTCOL,MAXROWS,MBOXSIZE,crows=9:MBOXSIZE merge "zMrg Form Header" # Invoice block cbox 60,4,RIGHTCOL,9,1,crows=5.5 7.25,ccols=70::ISHADE text 61,5,"Date",HFONT text 61,6.75,"Account #",HFONT text 61,8.5,"Page #",HFONT text 71,5,{trim(cut(60,9,10,""))},DBFONT,10 text 71,6.75,{trim(cut(47,9,10,""))},DBFONT,10 text 71,8.5,{trim(cut(61,3,10,""))},DBFONT,10 # address & balance info cbox LEFTCOL,9,RIGHTCOL,16,MBOXSIZE cfont 1,10,49,15,DBFONT cfont 48,13,52,13,IBFONT,10 cfont 48,14,79,14,DBFONT,10 # Messages cbox LEFTCOL,49,RIGHTCOL,53,MBOXSIZE cfont 1,50,MAXCOLS,52,IFONT # watermark - large font with light shading WATERMARK 1,48.5,{doc_title$},cgtimes,120,shade=WATERMARK_SHADE,center,cols=MAXCOLS,fit,spacing=.75 # footer cerase 1,53,MAXCOLS,53 cerase 1,55,MAXCOLS,55 cerase 1,57,MAXCOLS,57 cbox LEFTCOL,53,MAXCOLS,57,MBOXSIZE,crows=55::HSHADE,ccols=11 22 32 42 52 61 cfont 2,54,10,54,HRFONT cfont 12,54,21,54,HRFONT cfont 23,54,31,54,HRFONT cfont 33,54,41,54,HRFONT cfont 43,54,51,54,HRFONT cfont 53,54,60,54,HRFONT cfont 62,54,MAXRCOLS,54,HBRFONT cfont 2,56,10,56,DBRFONT,10 cfont 12,56,21,56,DBRFONT,10 cfont 23,56,31,56,DBRFONT,10 cfont 33,56,41,56,DBRFONT,10,black cfont 43,56,51,56,DBRFONT,10,black cfont 53,56,60,56,DBRFONT,10,black cfont 62,56,MAXRCOLS,56,DBRFONT,11,black cfont LEFTCOL,58,RIGHTCOL,63,IFONT text 1,{MAXROWS-.5},{copy_title$[copy]},HBCFONT,12,cols=MAXCOLS [AR Statement - std] # This format has "tearoff stub", replaced by remittance copy dsn_sample "../unform_test/osas/txt7/ar_standard_stmt.txt" detect 60,6,"~DATEMASK" detect 88,6,"~DATEMASK" # set up document constants const MAXCOLS=80 # max cols to output const MAXRCOLS=79 # MAXCOLS-1 const LEFTCOL=1 # left vertical line const RIGHTCOL=80 # right vertical line const MAXROWS=66 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows const CUSTOMER_COPY=1 const REMITTANCE_COPY=2 const FILE_COPY=3 const MAX_COPIES=3 pcopies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "A/R Statement - Standard" # view in pdf properties prejob { doc_title$="STATEMENT" merge "zMrg get watermark text" logocols=12,logorows=6 dim copy_title$[MAX_COPIES] if MAX_COPIES>=1 then copy_title$[CUSTOMER_COPY]="Customer Copy" if MAX_COPIES>=2 then copy_title$[REMITTANCE_COPY]="Remittance Copy" if MAX_COPIES>=3 then copy_title$[FILE_COPY]="File Copy" } prepage { xcol=2,xrow=3 merge "zMrg get company info" date$=trim(get(60,6,10)) cust_code$=trim(get(47,6,7)) pageno$=trim(get(60,1,7)) x$=set(1,16,97,"") if trim(get(60,55,20))<>"" then payby_date$="To avoid additional finance charges, pay by " +trim(get(60,55,20)) for i=MAXROWS to 6 step -1 text$[i]=text$[i-5] text$[i-5]="" next i remit$="Remittance Copy - Please return with payment" } # make space on left & top cmove LEFTCOL,1,RIGHTCOL,MAXROWS,1,2 # default detail line const BROW=1 const EROW=MAXROWS cfont 2,BROW,10,EROW,DBCFONT # date cfont 12,BROW,20,EROW,DFONT # inv # cfont 22,BROW,24,EROW,DCFONT # type cfont 26,BROW,34,EROW,DFONT # check # cfont 36,BROW,47,EROW,DBRFONT # charges cfont 49,BROW,58,EROW,DBRFONT # credits cfont 60,BROW,79,EROW,DBRFONT # balance # detail section #cerase LEFTCOL,16,RIGHTCOL,16 #cerase LEFTCOL,18,RIGHTCOL,18 cbox LEFTCOL,20,RIGHTCOL,51,MBOXSIZE,crows=21.5::DSHADE, ccols=11 21 25 35 48 59 const BROW=21 const EROW=21 text 1,21,"Invoice Date",ICFONT,cols=10 text 12,21,"Invoice No",IFONT text 22,21,"Type",ICFONT,cols=3 text 26,21,"Check No",IFONT text 36,21,"Charges",IRFONT,cols=12 text 49,21,"Credits",IRFONT,cols=10 text 60,21,"Balance",IRFONT,cols=20 # header section cerase 1,1,MAXCOLS,12 cbox LEFTCOL,1,RIGHTCOL,MAXROWS,MBOXSIZE,crows=9:MBOXSIZE merge "zMrg Form Header" # Invoice block cbox 60,4,RIGHTCOL,9,1,crows=5.5 7.25,ccols=70::ISHADE text 61,5,"Date",HFONT text 61,6.75,"Account #",HFONT text 61,8.5,"Page #",HFONT text 71,5,{date$},DBFONT,10 text 71,6.75,{cust_code$},DBFONT,10 text 71,8.5,{pageno$},DBFONT,10 # address & balance info cerase 75,11,97,51 cbox LEFTCOL,9,RIGHTCOL,20,MBOXSIZE cfont 1,10,49,19,DBFONT text 65,15,"Terms",IBFONT cfont 47,15,79,15,DBRFONT # Messages cbox LEFTCOL,51,MAXCOLS,57,MBOXSIZE cfont 1,52,MAXCOLS,56,IFONT # watermark - large font with light shading WATERMARK 1,50.5,{doc_title$},cgtimes,120,shade=WATERMARK_SHADE,center,cols=MAXCOLS,fit,spacing=.75 # aging table cerase 75,58,97,58 cerase 1,60,97,MAXROWS cbox LEFTCOL,57,MAXCOLS,60,MBOXSIZE,crows=58.5::HSHADE,ccols=10 21 31 41 52 62 text 1,58,"Unpaid F/C",HRFONT,cols=9 text 11,58,"Current",HRFONT,cols=10 text 22,58,"31-60 Days",HRFONT,cols=9 text 32,58,"61-90 Days",HRFONT,cols=9 text 42,58,"Over 90 Days",HRFONT,cols=10 text 52,58,"New F/C",HRFONT,cols=10 text 63,58,"Amount Due",HBRFONT,cols=16 cfont 1,59,9,59,DBRFONT cfont 11,59,20,59,DBRFONT,black cfont 22,59,30,59,DBRFONT cfont 32,59,40,59,DBRFONT,black cfont 42,59,50,59,DBRFONT cfont 52,59,61,59,DBRFONT,black cfont 63,59,79,59,DBRFONT text 2,63,{payby_date$},HFONT text 1,{MAXROWS-.5},{copy_title$[copy]},HBCFONT,12,cols=MAXCOLS # # 8.5 x 11 forms - if you prefer these layouts over the ones above # then swap the rule sets # [SO Invoice - 8.5 x 11] dsn_sample "../unform_test/osas/txt7/so_invc_8.5x11.txt" # handles invoice, quote, credit memo detect 62,6,"~ DATEMASK " detect 77,17,"~\.[0-9][0-9]" # set up document constants const MAXCOLS=80 # max cols to output const MAXRCOLS=79 # MAXCOLS-1 const LEFTCOL=1 # left vertical line const RIGHTCOL=80 # right vertical line const MAXROWS=66 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows const CUSTOMER_COPY=1 const FILE_COPY=2 const TOTALS_COPY=3 const MAX_COPIES=3 pcopies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "S/O Invoice - 8.5 x 11" # view in pdf properties prejob { logocols=14,logorows=6 dim copy_title$[MAX_COPIES] if MAX_COPIES>=1 then copy_title$[CUSTOMER_COPY]="Customer Copy" if MAX_COPIES>=2 then copy_title$[FILE_COPY]="File Copy" } prepage { if trim(get(1,1,80))<>"" then pcopies=CUSTOMER_COPY, copy_title$[CUSTOMER_COPY]=trim(get(1,1,80)) # get invoice title doc_title$="INVOICE",reprint$="" # get title from body of invoice, if available. # Must handle credit memo text/quote. x$=trim(cut(13,10,26,"")) x=pos("REPRINT"=x$) if x then reprint$="REPRINT" x=pos("C R E D I T"=X$) if x then doc_title$="CREDIT MEMO" x=pos("Q U O T E"=X$) if x then doc_title$="QUOTE" xcol=0,xrow=0 merge "zMrg get company info" shipto$=trim(cut(45,10,6,"")) if shipto$<>"" then shipto$="Your ship to code is "+shipto$ due$=trim(get(70,17,11)),x$=set(70,17,11,"") totaldue$="" if title$="INVOICE" totaldue$="The total due on this invoice is $"+ due$+"." # continued? cont$="",sub_line=50 for i=50 to MAXROWS x=pos("(continued"=text$[i]) if x then cont$="Continued on next page ..."; sub_line=55; x$=set(x,i,30,""); break next i if cont$="" then exec("cbox 1,58,RIGHTCOL,61,MBOXSIZE,crows=59.5::HSHADE 61,ccols=15 28 41 54 67") if cont$="" then exec("text 3,59,""Taxable"",HRFONT,cols=12,10") if cont$="" then exec("text 16,59,""Non-Taxable"",HRFONT,cols=12,10") if cont$="" then exec("text 29,59,""Freight"",HRFONT,cols=12,10") if cont$="" then exec("text 42,59,""Sales Tax"",HRFONT,cols=12,10") if cont$="" then exec("text 55,59,""Misc Charge"",HRFONT,cols=12,10") if cont$="" then exec("text 67,59,""Grand Total"",HBRFONT,cols=12,10") amount_paid$=trim(get(23,61,11)) amt_paid$=trim(get(36,61,15)) net_due$=trim(get(58,61,7)) nt_due$=trim(get(67,61,14)) if amount_paid$="" then goto no_amount_paid amount_paid$=amount_paid$(1,len(amount_paid$)-1) # remove colon net_due$=net_due$(1,len(net_due$)-1) # remove colon x$="cbox 61,61,RIGHTCOL,64,1,ccols=70::DSHADE,crows=62.5" exec(x$) x$="text 62,62,"+$22$+amount_paid$+$22$+",IFONT,10" exec(x$) x$="text 71,62,"+$22$+amt_paid$+$22$+",DBRFONT,10,cols=9" exec(x$) x$="text 62,63.5,"+$22$+net_due$+$22$+",IBFONT,10" exec(x$) x$="text 71,63.5,"+$22$+nt_due$+$22$+",DBRFONT,10,cols=9" exec(x$) no_amount_paid: # mark line types (D=detail, L=lot, R=remark/desc, S=serial for i=28 to 54 if mid(text$[i],4,3)="Lot" and mid(text$[i],38,7)="Ordered" then i=i+1;goto bottom_loop if mid(text$[i],6,3)="Ser" and mid(text$[i],61,1)="." then goto bottom_loop if mid(text$[i],77,1)="." then goto bottom_loop # component? if mid(text$[i],2,17)="End of Components" then compon=0 if compon and len(trim(text$[i]))>2 and mid(text$[i],1,2)=" " then text$[i](1,1)="C";i=i+1;goto bottom_loop if mid(text$[i],2,11)="Component :" then compon=1 # must be remark if text$[i]<>"" then text$[i](1,1)="R" bottom_loop: next i } precopy { x$=trim(get(1,21,MAXCOLS)) if copy=3 and x$<>"Run Totals:" then skip=1 if copy<3 and x$="Run Totals:" then skip=1 if copy=3 then doc_title$="Summary" merge "zMrg get watermark text" } # customer or file copy if copy CUSTOMER_COPY,FILE_COPY # default detail line const BROW=1 const EROW=MAXROWS cfont 2,BROW,21,EROW,DBFONT # item # cfont 23,BROW,24,EROW,DBCFONT # tx cfont 26,BROW,30,EROW,DBCFONT # uom cfont 32,BROW,41,EROW,DBRFONT # qty ord cfont 43,BROW,53,EROW,DBRFONT,black # qty ship cfont 55,BROW,65,EROW,DBRFONT # price cfont 67,BROW,MAXRCOLS,EROW,DBRFONT # ext cbox LEFTCOL,26,RIGHTCOL,55,MBOXSIZE,crows=27.5::DSHADE,ccols=22 25 31 42 54 66 text 2,27,"Item Information",IFONT text 23,27,"Tx",ICFONT,cols=2 text 26,27,"U/M",ICFONT,cols=5 text 32,27,"Ordered",IRFONT,cols=10 text 43,27,"Shipped",IRFONT,cols=11 text 55,27,"Unit Price",IRFONT,cols=11 text 67,27,"Extension",IRFONT,cols=13 # header section cerase 1,1,MAXCOLS,6 cbox LEFTCOL,1,RIGHTCOL,MAXROWS,MBOXSIZE,crows=10:MBOXSIZE merge "zMrg Form Header" # Invoice block cbox 66,4,RIGHTCOL,10,1,ccols=72::ISHADE,crows=6 8 text 67,5,"Invoice",HFONT text 67,7,"Date",HFONT text 67,9,"Page",HFONT text 73,5,{trim(cut(52,6,8,""))},DBFONT text 73,7,{trim(cut(63,6,8,""))},DBFONT text 73,9,{trim(cut(72,6,7,""))},DBFONT # sold to cbox LEFTCOL,10,MAXCOLS,20,MBOXSIZE,ccols=5::ISHADE 40 44::ISHADE text 2,11,"Sold\nTo",HCFONT,cols=3 cfont 6,11,39,18,DBFONT,black # sold to addr text 6,19,{"Your customer code is "+trim(cut(6,10,6,""))},DBFONT # ship to text 41,11,"Ship\nTo",HCFONT,cols=3 cfont 45,11,MAXRCOLS,18,DBFONT,black # ship to addr text 45,18,{shipto$},DBFONT text 45,19,{totaldue$},DBFONT # ribbon 1 cbox LEFTCOL,20,MAXCOLS,23,MBOXSIZE,crows=21.5::ISHADE,ccols=7 13 25 37 46 58 70 text 2,21,"Slsp1",ICFONT,cols=5 text 8,21,"Slsp2",ICFONT,cols=5 text 14,21,"Due Date",ICFONT,cols=11 text 26,21,"Disc Due Date",ICFONT,cols=11 text 38,21,"Order No",ICFONT,cols=8 text 47,21,"Order Date",ICFONT,cols=11 text 59,21,"Ship Date",ICFONT,cols=11 text 71,21,"Ship No",ICFONT,cols=9 cfont 2,22,6,22,DBCFONT # slsp 1 cfont 8,22,12,22,DBCFONT # slsp 2 cfont 14,22,24,22,DBCFONT # due date cfont 26,22,36,22,DBCFONT # disc due date cfont 38,22,45,22,DBCFONT,black # order # cfont 47,22,57,22,DBCFONT,black # order date cfont 59,22,69,22,DBCFONT # ship date cfont 71,22,MAXRCOLS,22,DBCFONT # ship # # ribbon 2 cbox LEFTCOL,23,MAXCOLS,26,MBOXSIZE,crows=24.5::ISHADE,ccols=18 45 text 2,24,"Terms Description",ICFONT,cols=17 text 19,24,"Customer PO No",ICFONT,cols=25 text 46,24,"Ship Via",ICFONT,cols=34 cfont 2,25,17,25,DBCFONT # terms cfont 19,25,44,25,DBCFONT,black # cust po cfont 46,25,MAXRCOLS,25,DBCFONT,black # ship via # detail section # lot line font "Lot@4,28,6,54",0,0,3,1,IRFONT # lot font "Lot@4,28,6,54",4,0,20,1,DBFONT # lot id font "Lot@4,28,6,54",34,0,9,2,IRFONT # lot ord/ship font "Lot@4,28,6,54",43,0,13,2,DBRFONT,black # lot qty font "Lot@4,28,6,54",57,0,10,2,IFONT # lot uom # ser line font "Ser@6,28,8,54",0,0,3,1,IRFONT # ser font "Ser@6,28,8,54",4,0,20,1,DBFONT # ser id # component lines font "C@1,28,1,54",2,0,30,1,DBFONT # item # font "C@1,28,1,54",2,1,45,1,DFONT # desc font "C@1,28,1,54",44,0,5,1,DBCFONT # uom font "C@1,28,1,54",50,0,19,1,DBRFONT # qty # description font "R@1,28,1,54",1,0,77,1,DFONT # description cerase 1,28,1,54 # watermark - large font with light shading WATERMARK 1,54.5,{doc_title$},cgtimes,120,shade=WATERMARK_SHADE,center,cols=MAXCOLS,fit,spacing=.75 # message area cbox LEFTCOL,55,MAXCOLS,58,MBOXSIZE cfont 2,56,55,57,ILFONT,black # mesg cfont 57,57,66,57,IBRFONT # subtotal: cfont 67,57,MAXRCOLS,57,DBRFONT # subtotal amt # footer text 1,{MAXROWS-.5},{copy_title$[copy]},HBCFONT,12,cols=MAXCOLS text 1,{MAXROWS-.5},{cont$},HBRFONT,cols=MAXRCOLS # totals cfont 2,60,14,60,DBRFONT # taxable cfont 16,60,27,60,DBRFONT # non-taxable cfont 29,60,40,60,DBRFONT,black # freight cfont 42,60,53,60,DBRFONT # sales tax cfont 55,60,66,60,DBRFONT,black # misc cfont 68,60,MAXRCOLS,60,DBRFONT,10 # grand total end if if copy TOTALS_COPY cfont 21,21,40,50,HFONT cfont 42,21,53,50,DFONT,right cfont 54,21,54,50,DFONT,black bold "Total",-5,0,25,1 end if [Generic] # This rule set will set columns & rows and # enhance the hdg for all other reports # requires UnForm 5 detect 0,1,"~(PAGE)|(Page)" # set up document constants const MAXCOLS=250 # max cols to output const MAXROWS=66 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows const MAX_COPIES=1 pcopies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "Generic Report" # view in pdf properties prepage { maxlen=80 # min columns is 80 for i=1 to MAXROWS if len(cvs(text$[i],2))>maxlen then maxlen=len(cvs(text$[i],2)) next i cols$=str(maxlen+1) # load row 1 variables rptdate$=trim(get(1,1,10)) x=pos("PAGE"=text$[1]) if x=0 then x=pos("Page"=text$[1]) pageno$=trim(get(x,1,11)) compname$=trim(get(21,1,x-1-20)) x$=set(1,1,200,"") # load row 2 variables time$=trim(get(1,2,10)) x=pos("AM"=time$);if x=0 then x=pos("PM"=time$) if x=0 then left2$=trim(get(1,2,20)),time$="" title$=trim(get(21,2,100)) x$=set(1,2,200,"") # load row 3 variables if time$="" then time$=trim(get(1,3,10)) subtitle$=trim(get(21,3,100)) x$=set(1,3,200,"") # Now draw box around header exec("cbox 1,.5,"+cols$+",3.75,MBOXSIZE,HSHADE") # now place line 1 headers that need justification x$="text 1,1.25,"+$22$+compname$+$22$+ ",HBCFONT,14,cols="+str(maxlen) exec(x$) x$="text 1,1.25,"+$22$+pageno$+$22$+ ",HBRFONT,cols="+str(maxlen) exec(x$) # now place line 2 headers that need justification x$="text 1,2.25,"+$22$+title$+$22$+ ",HBCFONT,12,cols="+str(maxlen) exec(x$) # now place line 3 headers that need justification x$="text 1,3.25,"+$22$+subtitle$+$22$+ ",HBCFONT,cols="+str(maxlen) exec(x$) } text 2,1.25,{rptdate$},HBFONT text 2,2.25,{time$},HBFONT text 2,3.25,{left2$},HBFONT font "~(End of Report)|(END OF REPORT)",0,0,13,1,HBFONT ## # 8.5 x 11 rule sets from 61 rule file ## [AR Statement - 8.5x11] dsn_sample "../unform_test/osas/txt7/ar_85x11_stmt.txt" # 8.5x11 statement has bug on multiple statements - an extra line is # added after the first page!!! Therefore, the funky prepage logic. detect 49,7,"~ DATEMASK" detect 77,13,"~\.[0-9][0-9]" # set up document constants const MAXCOLS=80 # max cols to output const MAXRCOLS=79 # MAXCOLS-1 const LEFTCOL=1 # left vertical line const RIGHTCOL=80 # right vertical line const MAXROWS=66 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows const CUSTOMER_COPY=1 const REMITTANCE_COPY=2 const FILE_COPY=3 const MAX_COPIES=3 pcopies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "A/R Statement 8.5x11" # view in pdf properties prejob { logocols=14,logorows=6 doc_title$="STATEMENT" merge "zMrg get watermark text" # set up copy titles dim copy_title$[MAX_COPIES] if MAX_COPIES>=1 then copy_title$[CUSTOMER_COPY]="Customer Copy" if MAX_COPIES>=2 then copy_title$[REMITTANCE_COPY]="Remittance Copy" if MAX_COPIES>=3 then copy_title$[FILE_COPY]="File Copy" } prepage { page=page+1 if page>1 then for i=2 to MAXROWS; text$[i-1]=text$[i]; text$[i]=""; next i date$=trim(get(50,7,10)) cust_code$=trim(get(61,7,7)) pageno$=trim(get(69,7,4)) xcol=0,xrow=0 merge "zMrg get company info" } # default detail line const BROW=21 const EROW=52 cfont 2,BROW,11,EROW,DBCFONT # date cfont 13,BROW,22,EROW,DFONT # inv # cfont 24,BROW,26,EROW,DCFONT # type cfont 28,BROW,39,EROW,DFONT # check # cfont 41,BROW,50,EROW,DBRFONT # charges cfont 52,BROW,63,EROW,DBRFONT # credits cfont 65,BROW,MAXRCOLS,EROW,DBRFONT # balance # header section cerase 1,1,MAXCOLS,7 cbox LEFTCOL,1,RIGHTCOL,MAXROWS,MBOXSIZE,crows=9:MBOXSIZE merge "zMrg Form Header" # Invoice block cbox 60,4,RIGHTCOL,9,1,crows=5.5 7.25,ccols=70::ISHADE text 61,5,"Date",HFONT text 61,6.75,"Account",HFONT text 61,8.5,"Page",HFONT text 71,5,{date$},DBFONT,10 text 71,6.75,{cust_code$},DBFONT,10 text 71,8.5,{pageno$},DBFONT,10 # address & balance info cbox LEFTCOL,9,RIGHTCOL,19,MBOXSIZE cfont 1,10,49,18,DBFONT text 51,13,"Amount Due",IBFONT,10 cfont 70,13,MAXRCOLS,13,DBRFONT,10 text 51,15,"Terms",IBFONT,10 cfont 66,15,MAXRCOLS,15,DBRFONT,10 # detail section cbox LEFTCOL,19,RIGHTCOL,51,MBOXSIZE,crows=20.5::DSHADE, ccols=12 23 27 40 51 64 text 2,20,"Invoice Date",ICFONT,cols=10 text 13,20,"Invoice No",IFONT text 24,20,"Type",ICFONT,cols=3 text 28,20,"Check No",IFONT text 39,20,"Charges",IRFONT,cols=12 text 52,20,"Credits",IRFONT,cols=12 text 67,20,"Balance",IRFONT,cols=13 # Messages cbox LEFTCOL,51,MAXCOLS,58,MBOXSIZE cfont 2,52,MAXCOLS,57,IFONT # watermark - large font with light shading WATERMARK 1,50.5,{doc_title$},cgtimes,120,shade=WATERMARK_SHADE,center,cols=MAXCOLS,fit,spacing=.75 # footer text 1,{MAXROWS-.5},{copy_title$[copy]},HBCFONT,12,cols=MAXCOLS cbox LEFTCOL,58,RIGHTCOL,61,MBOXSIZE,crows=59.5::HSHADE 61, ccols=14 27 40 53 66 text 1,59,"Current",HRFONT,cols=13 text 15,59,"31-60 Days",HRFONT,cols=12 text 28,59,"61-90 Days",HRFONT,cols=12 text 41,59,"Over 90 Days",HRFONT,cols=12 text 54,59,"Finance Charge",HRFONT,cols=12 text 67,59,"Amount Due",HBRFONT,cols=12 cfont 1,60,13,60,DBRFONT cfont 15,60,26,60,DBRFONT cfont 28,60,39,60,DBRFONT cfont 41,60,52,60,DBRFONT,black cfont 54,60,65,60,DBRFONT,black cfont 67,60,MAXRCOLS,60,DBRFONT,10 [PO Order - 8.5 x 11] dsn_sample "../unform_test/osas/txt7/po_8.5x11.txt" detect 53,3,"~ [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9] DATEMASK" detect 75,6,"~[0-9]" # page # detect 5,9,"~ [0-z]" # cust name # set up document constants const MAXCOLS=81 # max cols to output const MAXRCOLS=80 # MAXCOLS-1 const LEFTCOL=1 # left vertical line const RIGHTCOL=81 # right vertical line const MAXROWS=66 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows const VENDOR_COPY=1 const FILE_COPY=2 const MAX_COPIES=2 pcopies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "P/O Order - 8.5 x 11" # view in pdf properties prejob { logocols=12,logorows=7 dim copy_title$[MAX_COPIES] if MAX_COPIES>=1 then copy_title$[VENDOR_COPY]="Vendor Copy" if MAX_COPIES>=2 then copy_title$[FILE_COPY]="File Copy" doc_title$="PURCHASE ORDER" merge "zMrg get watermark text" } prepage { xcol=0,xrow=0 merge "zMrg get company info" } # shift down 1 for more room at top cmove LEFTCOL,1,RIGHTCOL,MAXROWS,1,3 # default detail line const BROW=25 const EROW=50 cfont 2,BROW,5,EROW,DBCFONT # line # cfont 7,BROW,26,EROW,DBFONT # item # cfont 28,BROW,33,EROW,DBCFONT # uom cfont 35,BROW,46,EROW,DBRFONT # price cfont 49,BROW,61,EROW,DBRFONT # qty ord cfont 64,BROW,MAXRCOLS,EROW,DBRFONT # ext # header section cerase 1,1,MAXCOLS,9 cbox LEFTCOL,1,RIGHTCOL,MAXROWS,MBOXSIZE,crows=10:MBOXSIZE merge "zMrg Form Header" # Invoice block cbox 60,4.5,RIGHTCOL,9.5,1,ccols=72::ISHADE,crows=5.5 6.5 7.5 8.5 text 61,5,"PO Number",DFONT text 61,6,"PO Date",DFONT text 61,7,"Req'd Ship Date",DFONT text 61,8,"Location",DFONT text 61,9,"Page",DFONT text 73,5,{trim(get(54,3,8))},DBFONT text 73,6,{trim(get(65,3,10))},DBFONT text 73,7,{trim(get(54,6,10))},DBFONT text 73,8,{trim(get(66,6,6))},DBFONT text 73,9,{trim(get(75,6,3))},DBFONT # vendor address cmove 5,16,MAXRCOLS,19,6,16 cmove 42,16,MAXRCOLS,19,45,16 cbox LEFTCOL,10,RIGHTCOL,20,MBOXSIZE,ccols=5::ISHADE 40 44::ISHADE text 1,11,"V\ne\nn\nd\no\nr",HCFONT,cols=5,fit cfont 6,11,39,19,DBLFONT # vend addr text 40,11,"S\nh\ni\np\n\nT\no",HCFONT,cols=5,fit cfont 45,11,MAXRCOLS,19,DBFONT # ship to addr # ribbon info cbox LEFTCOL,20,RIGHTCOL,23,MBOXSIZE,crows=21.5::ISHADE, ccols=21 40 59 text 1,21,"Ordered By",ICFONT,cols=20 text 22,21,"Ship Via",ICFONT,cols=18 text 41,21,"F.O.B.",ICFONT,cols=18 text 60,21,"Terms Description",ICFONT,cols=19 cfont 1,22,20,22,DBCFONT cfont 22,22,39,22,DBCFONT cfont 41,22,58,22,DBCFONT cfont 60,22,79,22,DBCFONT # line detail cbox LEFTCOL,23,RIGHTCOL,51,MBOXSIZE,crows=24.5::DSHADE,ccols=6 34 47 62 text 2,24,"Entry #",ICFONT,cols=4 text 7,24,"Item ID",IFONT text 28,24,"U/M",ICFONT,cols=6 text 35,24,"Unit Price",IRFONT,cols=12 text 49,24,"Ordered Quantity",IRFONT,cols=13 text 64,24,"Extension",IRFONT,cols=16 # description font " @2,23,2,50",5,0,54,1,DFONT # description # req date font "Req Date",0,0,19,1,DBRFONT # req date # watermark - large font with light shading WATERMARK 1,50.5,{doc_title$},cgtimes,120,shade=WATERMARK_SHADE,center,cols=MAXCOLS,fit,spacing=.75 # message area cbox LEFTCOL,51,RIGHTCOL,53,MBOXSIZE cfont 1,52,48,52,IFONT cfont 50,52,60,52,DBRFONT cfont 63,52,MAXRCOLS,52,DBRFONT # sub totals cbox LEFTCOL,53,RIGHTCOL,56,MBOXSIZE,crows=54.5::HSHADE,ccols=15 30 45 60 text 1,54,"Tax",HRFONT,cols=13 text 16,54,"Freight",HRFONT,cols=13 text 31,54,"Miscellaneous",HRFONT,cols=13 text 46,54,"Prepaid",HRFONT,cols=13 text 61,54,"Grand Total",HBRFONT,cols=19 cfont 1,55,13,55,DBRFONT cfont 16,55,28,55,DBRFONT cfont 31,55,43,55,DBRFONT,black cfont 46,55,58,55,DBRFONT,black cfont 61,55,MAXRCOLS,55,DBRFONT,fit # approval line cbox 55,60,RIGHTCOL,60 text 55.5,60.75,"Received by",HFONT cbox 55,64,MAXCOLS,64 text 55.5,64.75,"Authorized Signature",HFONT text 1,{MAXROWS-.5},{copy_title$[copy]},HBCFONT,12,cols=MAXCOLS [PO Order - Standard] dsn_sample "../unform_test/osas/txt7/po_std.txt" detect 68,1,"~ [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]" detect 85,1,"~[0-9]" # page # detect 68,4,"~ DATEMASK" # cust name # set up document constants const MAXCOLS=109 # max cols to output const MAXRCOLS=108 # MAXCOLS-1 const LEFTCOL=1 # left vertical line const RIGHTCOL=109 # right vertical line const MAXROWS=66 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows const VENDOR_COPY=1 const FILE_COPY=2 const MAX_COPIES=2 pcopies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "P/O Order - Standard" # view in pdf properties prejob { logocols=14,logorows=6 dim copy_title$[MAX_COPIES] if MAX_COPIES>=1 then copy_title$[VENDOR_COPY]="Vendor Copy" if MAX_COPIES>=2 then copy_title$[FILE_COPY]="File Copy" doc_title$="PURCHASE ORDER" merge "zMrg get watermark text" } prepage { xcol=0,xrow=0 merge "zMrg get company info" # continued? cont$="",sub_line=52 for i=52 to MAXROWS x=pos("(continued"=text$[i]) if x then cont$="Continued"; sub_line=55; x$=set(x,i,30,""); break next i } # shift down 1 for more room at top cmove LEFTCOL,1,RIGHTCOL,MAXROWS,2,4 # default detail line cerase LEFTCOL,22,MAXCOLS,22 cerase LEFTCOL,24,MAXCOLS,24 cbox LEFTCOL,22,RIGHTCOL,{sub_line},MBOXSIZE,crows=24::DSHADE, ccols=5.5 50 61 68 81 95 const BROW=1 const EROW=MAXROWS cfont 2,BROW,4,EROW,DBCFONT # line # cfont 6,BROW,49,EROW,DBFONT # item # cfont 51,BROW,60,EROW,DBRFONT # price cfont 62,BROW,67,EROW,DBCFONT # units cfont 69,BROW,80,EROW,DBRFONT # qty ord cfont 82,BROW,94,EROW,DBRFONT # qty rcvd cfont 96,BROW,MAXRCOLS,EROW,DBRFONT # b/o # line detail text 2,23,"Line",ICFONT,cols=3 text 7,23,"Item/Description",IFONT text 51,23,"Unit Price",IRFONT,cols=10 text 62,23,"Units",IRFONT,cols=5 text 69,23,"Ordered",IRFONT,cols=12 text 82,23,"Received",IRFONT,cols=13 text 96,23,"Backordered",IRFONT,cols=13 # header section cerase 1,1,MAXCOLS,9 cbox LEFTCOL,1,RIGHTCOL,MAXROWS,MBOXSIZE,crows=9:MBOXSIZE merge "zMrg Form Header" # PO block cbox 86,5.5,MAXCOLS,8.5,1,ccols=99::ISHADE,crows=6.5 7.5 text 87,6,"PO Number",DFONT text 87,7,"Page",DFONT text 87,8,"Req'd Ship Date",DFONT text 100,6,{trim(get(69,1,8))},DBFONT text 100,7,{trim(get(83,1,3))},DBFONT text 100,8,{trim(get(69,4,10))},DBFONT # ribbon info cerase LEFTCOL,12,RIGHTCOL,12 cbox LEFTCOL,9,RIGHTCOL,12,MBOXSIZE,crows=10.5::ISHADE, ccols=12 33 44 69 text 2,10,"Ord. Date",ICFONT,cols=9 text 13,10,"Ordered By",ICFONT,cols=19 text 34,10,"Terms",ICFONT,cols=9 text 45,10,"F.O.B.",ICFONT,cols=22 text 69,10,"Ship Via",ICFONT,cols=40 cfont 2,11,11,11,DBCFONT cfont 13,11,32,11,DBCFONT cfont 34,11,43,11,DBCFONT cfont 45,11,67,11,DBCFONT cfont 69,11,MAXRCOLS,11,DBCFONT # vendor address cmove 12,20,MAXRCOLS,21,13,20 cmove 49,20,MAXRCOLS,21,62,20 cmove 13,13,49,21,22,13 cbox LEFTCOL,12,MAXCOLS,22,MBOXSIZE,ccols=12::ISHADE 50 61::ISHADE text 10,14,"V\ne\nn\nd\no\nr",ICFONT cfont 13,13,49,21,DBFONT # vend addr text 59,14,"S\nh\ni\np\n\nT\no",ICFONT cfont 62,13,MAXRCOLS,21,DBFONT # ship to addr # line detail # description font " @2,24,2,51",5,0,77,1,DFONT # description # watermark - large font with light shading WATERMARK 1,51.5,{doc_title$},cgtimes,120,shade=WATERMARK_SHADE,center,cols=MAXCOLS,fit,spacing=.75 # sub totals cbox "Subtotal@1,53",-6,-.5,RIGHTCOL,55.5,MBOXSIZE,crows=54.5::HSHADE box "Subtotal@1,53",9,-.5,1,2 box "Tax@1,53",4,-.5,1,2 box "Freight@1,53",8,-.5,1,2 box "Misc.@1,53",6,-.5,1,2 box "Prepaid@1,53",13,-.5,1,2 font "Subtotal@1,53",0,0,9,1,IRFONT font "Tax@1,53",0,0,4,1,IRFONT font "Freight@1,53",0,0,8,1,IRFONT font "Misc.@1,53",0,0,6,1,IRFONT,black font "Prepaid@1,53",0,0,13,1,IRFONT,black font "Total@1,53",0,0,23,1,IRFONT,black font "Subtotal@1,53",-4,1,13,1,DBRFONT font "Tax@1,53",-10,1,14,1,DBRFONT font "Freight@1,53",-6,1,14,1,DBRFONT font "Misc.@1,53",-8,1,14,1,DBRFONT font "Prepaid@1,53",-6,1,14,1,DBRFONT font "Total@1,53",-1,1,15,1,DBRFONT # message area cbox LEFTCOL,55.5,MAXCOLS,MAXROWS,MBOXSIZE cfont 2,56,10,56,IFONT cfont 12,56,60,56,IFONT cfont 2,57,60,65,IFONT # approval line cerase 61,56,RIGHTCOL,65 cbox 65,58,MAXRCOLS,58 text 65.5,58.75,"Received by",HCFONT,cols=45 cbox 65,62,MAXRCOLS,62 text 65.5,62.75,"Authorized Signature",HCFONT,cols=45 text 1,{MAXROWS-.5},{copy_title$[copy]},HBCFONT,12,cols=MAXCOLS text 1,{MAXROWS-.5},{cont$},HBRFONT,cols=MAXRCOLS [SO Pick/Pack List - 8.5 x 11] dsn_sample "../unform_test/osas/txt7/so_pick_8.5x11.txt" #dsn_sample "../unform_test/osas/txt7/so_pack_8.5x11.txt" detect 0,4,"~ [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9] " detect 0,4,"~ DATEMASK " detect 5,9,"~ [A-Z0-9a-z*]+" detect 5,10,"~ [A-Z0-9a-z]+" # set up document constants const MAXCOLS=80 # max cols to output const MAXRCOLS=79 # MAXCOLS-1 const LEFTCOL=1 # left vertical line const RIGHTCOL=80 # right vertical line const MAXROWS=66 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows const WHSE_COPY=1 const MAX_COPIES=1 pcopies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "S/O Pick/Pack List - 8.5 x 11" # view in pdf properties prejob { logocols=12,logorows=6 # pick list qty fields are shifted right 1 character more than pack pick=0 for i=24 to 61 if trim(get(51,i,1))<>"" then pick=1;break next i if pick then doc_title$="PICKING SLIP" else doc_title$="PACKING LIST" merge "zMrg get watermark text" # set up copy titles dim copy_title$[MAX_COPIES] if MAX_COPIES>=1 then if pick then copy_title$[WHSE_COPY]="Warehouse Copy" else copy_title$[WHSE_COPY]="Customer Copy" # determine if picking list or packing list } prepage { if trim(get(1,7,80))<>"" then pcopies=WHSE_COPY, copy_title$[WHSE_COPY]=trim(get(1,7,80)) xcol=0,xrow=0 merge "zMrg get company info" shipto$="" soldto$="" if trim(get(6,9,10))<>"" then shipto$="Your ship to code is "+trim(get(6,9,10)) if trim(get(46,9,10))<>"" then soldto$="Your customer code is "+trim(get(46,9,10)) # continued? cont$="",sub_line=52 for i=52 to MAXROWS x=pos("(continued"=text$[i]) if x then cont$="Continued on next page ..."; sub_line=55; x$=set(x,i,30,""); break next i } cmove LEFTCOL,1,MAXCOLS,MAXROWS,2,1 # default detail line const BROW=1 const EROW=MAXROWS cfont 2,BROW,4,EROW,DBCFONT # line # cfont 6,BROW,25,EROW,DBFONT # item # cfont 27,BROW,31,EROW,DBCFONT # uom cfont 33,BROW,38,EROW,DBCFONT # bin cfont 40,BROW,52,EROW,DBRFONT # qty ord cfont 54,BROW,66,EROW,DBRFONT # qty ship cfont 68,BROW,MAXRCOLS,EROW,DBRFONT # qty b/o # header section cerase 1,1,MAXCOLS,9 cbox LEFTCOL,1,RIGHTCOL,MAXROWS,MBOXSIZE,crows=9:MBOXSIZE merge "zMrg Form Header" # right header cbox 60,3,RIGHTCOL,7,1,ccols=70::ISHADE,crows=4 5 6 7 text 61,3.5,"Order #",IFONT,cols=9 text 61,4.5,"Order Date",IFONT,cols=9 text 61,5.5,"Batch #",IFONT,cols=9 text 61,6.5,"Page",IFONT,cols=9 text 71,3.5,{trim(cut(51,4,8,""))},DBFONT,cols=9 text 71,4.5,{trim(cut(63,4,8,""))},DBFONT,cols=9 text 71,5.5,{trim(cut(40,4,6,""))},DBFONT,cols=9 text 71,6.5,{trim(cut(74,4,2,""))},DBFONT,cols=9 cbox 60,7,MAXCOLS,9,1,crows=8::ISHADE text 61,7.5,"Customer PO #",ICFONT,cols=19 text 61,8.5,{trim(cut(51,7,25,""))},DBFONT # ship to section cbox LEFTCOL,9,MAXCOLS,19,MBOXSIZE,ccols=6::ISHADE 41 46::ISHADE text 2,10,"Ship",ICFONT,cols=4 text 2,11,"To",ICFONT,cols=4 cfont 7,10,40,17,DBFONT,black text 7,18,{shipto$},DBFONT # sold to section text 42,10,"Sold",ICFONT,cols=4 text 42,11,"To",ICFONT,cols=4 cfont 47,10,MAXRCOLS,17,DBFONT text 47,18,{soldto$},DBFONT # ribbon section cbox LEFTCOL,19,RIGHTCOL,22,MBOXSIZE,crows=20.5::ISHADE, ccols=7 13 21 44 58 69 text 2,20,"Slsp 1",ICFONT,cols=5 text 8,20,"Slsp 2",ICFONT,cols=5 text 14,20,"Location",ICFONT,cols=7 text 22,20,"Ship Via",ICFONT,cols=22 text 45,20,"Pack List #",ICFONT,cols=13 text 59,20,"Rqstd Ship Date",ICFONT,cols=10 text 70,20,"Actual Ship Date",ICFONT,cols=10 cfont 2,21,6,21,DBCFONT cfont 8,21,12,21,DBCFONT,black cfont 14,21,20,21,DBCFONT cfont 22,21,43,21,DBCFONT cfont 45,21,57,21,DBCFONT cfont 59,21,68,21,DBCFONT cfont 70,21,MAXRCOLS,21,DBCFONT # detail cbox LEFTCOL,22,RIGHTCOL,62,MBOXSIZE, crows=23.5::DSHADE,ccols=5 32 39 53 67 text 2,23,"Line",ICFONT,cols=3 text 6,23,"Item ID",IFONT,cols=21 text 27,23,"U/M",ICFONT,cols=5 text 33,23,"Bin",ICFONT,cols=6 text 40,23,"Ordered",IRFONT,cols=13 text 54,23,"Shipped",IRFONT,cols=13 text 68,23,"Back Ordered",IRFONT,cols=12 # handle memo lines font " @2,24,4,61",4,0,40,1,DFONT,black # memo lines # watermark - large font with light shading WATERMARK 1,61.5,{doc_title$},cgtimes,120,shade=WATERMARK_SHADE,center,cols=MAXCOLS,fit,spacing=.75 # footer text 1,{MAXROWS-.5},{copy_title$[copy]},HBCFONT,12,cols=MAXCOLS text 1,{MAXROWS-.5},{cont$},HBRFONT,cols=MAXRCOLS cfont 2,63,MAXCOLS,65,IFONT # memo lines #************************************************************* # Merge rule sets for the osas65 rule file * #************************************************************* [zMrg load rpt header] rptdate$=trim(get(1,1,10)) x=pos(" Page "=text$[1]) compname$=trim(get(20,1,x-1-20)) pageno$=trim(get(x,1,20)) time$=trim(get(1,2,8)) title$=trim(get(20,2,150)) opt1$=trim(get(20,3,150)) if brow>=4 then opt2$=trim(get(20,4,150)) if brow>=5 then opt3$=trim(get(20,5,150)) if brow>=6 then opt4$=trim(get(20,6,150)) [zMrg Report Header] cerase 1,1,MAXCOLS,{brow} cbox LEFTCOL,.5,RIGHTCOL,{brow+.75},MBOXSIZE,HSHADE text 2,1.5,{rptdate$},HFONT,black text 2,2.5,{time$},HFONT,black text 1,1.5,{pageno$},HRFONT,cols=MAXRCOLS,black text 1,1.5,{compname$},HBCFONT,14,cols=MAXCOLS,black text 1,2.5,{title$},HBCFONT,12,cols=MAXCOLS,black text 1,3.25,{opt1$},HCFONT,9,cols=MAXCOLS,black text 1,4.15,{opt2$},HCFONT,9,cols=MAXCOLS,black text 1,5.15,{opt3$},HCFONT,9,cols=MAXCOLS,black text 1,6.15,{opt4$},HCFONT,9,cols=MAXCOLS,black [zMrg Form Header] LOGO_IMAGE 1,1,{logocols},{logorows},"COMP_LOGO" text 1,2.25,{doc_title$},HBRFONT,16,cols=MAXRCOLS text 1,3.25,{reprint$},HRFONT,12,cols=MAXRCOLS text 1,2.25,{comp_name$},HBCFONT,14,cols=MAXRCOLS text 1,3.25,{comp_addr1$},HCFONT,12,cols=MAXRCOLS text 1,4.25,{comp_addr2$},HCFONT,12,cols=MAXRCOLS text 1,5.25,{comp_addr3$},HCFONT,12,cols=MAXRCOLS text 1,6.25,"COMP_PHONES",HCFONT,12,cols=MAXRCOLS text 1,7.25,"COMP_EMAIL",HCFONT,cols=MAXRCOLS text 1,8.25,"COMP_WEBSITE",HCFONT,cols=MAXRCOLS [zMrg get watermark text] wmlines=1,wdoc_title$="",xdoc_title$=trim(doc_title$) watermark_loop: x=pos(" "=xdoc_title$) if x=0 then if wdoc_title$="" then wdoc_title$=xdoc_title$ else wdoc_title$=wdoc_title$+$0a$+trim(xdoc_title$) fi; goto end_watermark_loop if wdoc_title$="" then wdoc_title$=trim(xdoc_title$(1,x)) else wdoc_title$=wdoc_title$+$0a$+trim(xdoc_title$(1,x)) xdoc_title$=trim(xdoc_title$(x+1)) wmlines=wmlines+1 goto watermark_loop end_watermark_loop: [zMrg get company info] if xcol>0 and xrow>0 and trim(get(xcol,xrow,40))<>"" then comp_name$=trim(get(xcol,xrow,40));comp_addr1$=trim(get(xcol,xrow+1,40)); comp_addr2$=trim(get(xcol,xrow+2,40)); comp_addr3$=trim(get(xcol,xrow+3,40)) if xcol=0 or xrow=0 or trim(get(xcol,xrow,40))="" then comp_name$="COMP_NAME";comp_addr1$="COMP_ADDR1"; comp_addr2$="COMP_ADDR2"; comp_addr3$="COMP_ADDR3" [zMrg - END]