# ################################################################## # osas65.rul rule file for standard OSAS6.5 Accounting Software # # Based upon OSAS 6.5 demo data # # Requires, at least, UnForm version 5.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/26/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 forms: # ap - aged detail, aged summary # ap - checks: laser # ar - aged detail, aged summary # ar - statement: laser, plain paper # gl - balance sheet: budget, prev yr # gl - income statement: budget, prev yr # gl - trial balance: actual, budget, prev yr # po - order: laser, plain # pr - checks: laser # so - pick list: laser, plain paper # so - pack list: laser, plain paper # so - invoice: laser, plain paper, 8.5 x 11 # generic reports (row 1 contains either PAGE or Page) # to be Completed forms: # ap - checks : blank, preprinted # ar - statement: 8.5 x 11, std # po - order : 8.5 x 11, std # pr - checks : blank, preprinted # so - pick list: 8.5 x 11, std # so - pack list: 8.5 x 11 # so - invoice : std # # Modification history # # Last modified 08/23/2004 # # 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 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 #************************************************************* # Merge rule sets for the osas65 rule file * #************************************************************* [Mrg 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)) [Mrg 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 [Mrg 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 [Mrg 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: [Mrg 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" [Mrg - END] #*************************************************************** # 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/txt611/so_invoice1_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 { # 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 "Mrg get watermark text" xcol=0,xrow=0 merge "Mrg 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$="" x=pos("(continued on next page)"=text$[55]) if x then cont$="Continued on next page" 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 "Mrg 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-9*(wmlines-1)},{wdoc_title$},cgtimes,120, shade=WATERMARK_SHADE,center,cols=MAXCOLS,fit,spacing=1 # 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,63,{cont$},ICFONT,12,cols=MAXCOLS erase "(continued",0,0,25,1 # totals cerase LEFTCOL,60,RIGHTCOL,60 cbox "!=(continued@11,55,20,55",-10,3,MAXCOLS,61,MBOXSIZE, crows=59.5 61::HSHADE,ccols=27 48 69 90 114 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 text "!=(continued@11,55,20,55",-9,5.5,"Taxable",HRFONT,cols=25,10 text "!=(continued@11,55,20,55",18,5.5,"Non-Taxable",HRFONT,cols=19,10 text "!=(continued@11,55,20,55",39,5.5,"Freight",HRFONT,cols=19,10 text "!=(continued@11,55,20,55",60,5.5,"Sales Tax",HRFONT,cols=19,10 text "!=(continued@11,55,20,55",81,5.5,"Misc Charge",HRFONT,cols=22,10 text "!=(continued@11,55,20,55",104,5.5,"Grand Total",HBRFONT,cols=16,10 [SO Pick/Pack List - laser] dsn_sample "/u0/unform_test/osas/txt/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 "Mrg 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 { xcol=0,xrow=0 merge "Mrg get company info" shipto$="" if trim(get(47,9,10))<>"" then shipto$="Your ship to code is "+trim(get(47,9,10)) } # 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 "Mrg 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,{"Your customer code is "+trim(cut(7,9,10,""))},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,{60-9*(wmlines-1)},{wdoc_title$},cgtimes,120, shade=WATERMARK_SHADE,center,cols=MAXCOLS,fit,spacing=1 # footer text 1,{MAXROWS-.5},{copy_title$[copy]},HBCFONT,12,cols=MAXCOLS cfont 2,63,MAXCOLS,65,IFONT # memo lines [PO Order - laser] dsn_sample "/u0/unform_test/osas/txt/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=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 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 "Mrg get watermark text" } prepage { xcol=0,xrow=0 merge "Mrg get company info" } # shift down 1 for more room at top vshift 1 # default detail line const BROW=1 const EROW=MAXROWS 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 "Mrg Form Header" # Invoice block cbox 60,4.5,MAXCOLS,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 cbox LEFTCOL,10,MAXCOLS,20,MBOXSIZE,ccols=41 45::ISHADE cfont 6,11,39,19,DBFONT # vend addr text 41,11,"Ship\nTo",HCFONT,cols=5,fit cfont 46,11,MAXRCOLS,19,DBFONT # ship to addr # ribbon info cbox LEFTCOL,20,MAXCOLS,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,MAXCOLS,51,MBOXSIZE,crows=24.5::DSHADE,ccols=6 34 48 63 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 # tricky due to vshift above; must search in "old" area and offset to new font " @2,24,2,50",5,1,77,1,DFONT # description # watermark - large font with light shading WATERMARK 1,{50-9*(wmlines-1)},{wdoc_title$},cgtimes,120, shade=WATERMARK_SHADE,center,cols=MAXCOLS,fit,spacing=1 # message area cbox LEFTCOL,51,MAXCOLS,53,MBOXSIZE cfont 1,52,48,52,IFONT cfont 50,52,60,52,DBRFONT cfont 63,52,77,52,DBRFONT # sub totals cbox LEFTCOL,53,MAXCOLS,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,MAXCOLS,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 "/u0/unform_test/osas/txt/ar_stmt_laser.txt" detect 0,6,"~ DATEMASK" detect 0,13,"~\.[0-9][0-9]" # set up document constants const MAXCOLS=80 # max cols to output const MAXRCOLS=79 # MAXCOLS-1 const LEFTCOL=.5 # left vertical line const RIGHTCOL=80.5 # 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 "A/R Statement - Laser" # view in pdf properties prejob { doc_title$="STATEMENT" merge "Mrg 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$[FILE_COPY]="File Copy" } prepage { xcol=0,xrow=0 merge "Mrg get company info" } # default detail line const BROW=1 const EROW=MAXROWS cfont 1,BROW,10,EROW,DBCFONT # date cfont 12,BROW,23,EROW,DFONT # inv # cfont 25,BROW,27,EROW,DCFONT # type cfont 29,BROW,40,EROW,DFONT # check # cfont 42,BROW,53,EROW,DBRFONT # charges cfont 55,BROW,66,EROW,DBRFONT # credits cfont 68,BROW,MAXRCOLS,EROW,DBRFONT # balance # header section cerase 1,1,MAXCOLS,7 cbox LEFTCOL,1,RIGHTCOL,MAXROWS,MBOXSIZE,crows=9:MBOXSIZE merge "Mrg 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=11 24 28 41 54 67 text 1,20,"Invoice Date",ICFONT,cols=10 text 12,20,"Invoice No",IFONT text 25,20,"Type",ICFONT,cols=3 text 29,20,"Check No",IFONT text 42,20,"Charges",IRFONT,cols=12 text 55,20,"Credits",IRFONT,cols=12 text 68,20,"Balance",IRFONT,cols=12 # Messages cbox LEFTCOL,53,RIGHTCOL,58,MBOXSIZE cfont 1,54,MAXCOLS,57,IFONT # watermark - large font with light shading WATERMARK 1,{52-9*(wmlines-1)},{wdoc_title$},cgtimes,120, shade=WATERMARK_SHADE,center,cols=MAXCOLS,fit,spacing=1 # 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=12 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 "/u0/unform_test/osas/txt/ap_checks_ly1.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=61 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 prejob { logocols=10,logorows=5 } # make space on left shift 1 # Check LOGO_IMAGE 1,1,10,5,"COMP_LOGO" cbox LEFTCOL,1,RIGHTCOL,17.75,MBOXSIZE,HSHADE 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 44,5.5,RIGHTCOL,7.5,1,crows=6.5::100,ccols=52 63 text 45,6,"Check #",ICFONT,10,cols=7,shade=0 cfont 45,7,51,7,DBCFONT,11 text 53,6,"Date",ICFONT,10,cols=10,shade=0 cfont 53,7,62,7,DBCFONT,11 text 64,6,"Amount",IRFONT,10,cols=18,shade=0 cfont 64,7,81,7,DBRFONT,11 text 2,10,"Pay",IFONT,14 text 7,10,{trim(cut(5,9,70,""))},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(44,8,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,37,DBCFONT cfont 14,25,24,37,DBCFONT cfont 26,25,36,37,DBCFONT cfont 38,25,50,37,DBRFONT cfont 52,25,65,37,DBRFONT cfont 67,25,MAXRCOLS,37,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 24,41.5,76,44,1,crows=42.5::DSHADE,ccols=35 67 cfont 25,42,34,42,ICFONT cfont 36,42,66,42,ICFONT cfont 68,42,75,42,ICFONT cfont 25,43,34,43,DBCFONT cfont 36,43,66,43,DBCFONT cfont 68,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 [PR Checks - laser] dsn_sample "/u0/unform_test/osas/txt/pr_check_laser.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]" # 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 precopy { # Summary? x$=trim(get(1,1,MAXCOLS)) if copy=1 and x$<>"" then skip=1 if copy=2 and x$="" then skip=1 } # shift right 1 to clear up column 1 shift 1 if copy 1 # first adjust format to standard cmove 1,20,MAXCOLS,60,1,22 # Check LOGO_IMAGE 1,1,10,5,"COMP_LOGO" cbox LEFTCOL,1,RIGHTCOL,17.75,MBOXSIZE,HSHADE 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,70,""))},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 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 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 #*************************************************************** # Less frequently used rule sets * #*************************************************************** [A/P Aged Detail] dsn_sample "/u0/unform_test/osas/txt/ap_aged_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=5 # used by rpt hdr } prepage { merge "Mrg load rpt header" } # shift right 1 col for better spacing shift 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 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 "Mrg Report Header" # detail cerase 1,8,MAXCOLS,8 cbox LEFTCOL,6.25,RIGHTCOL,7.5,MBOXSIZE,10 const BROW=7 const EROW=7 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]@1,9,1,MAXROWS",0,0,37,1,DBFONT font "~[A-Za-z0-9]@1,9,1,MAXROWS",39,0,14,1,DBFONT font "~[A-Za-z0-9]@1,9,1,MAXROWS",60,0,67,1,DFONT # vendor total line erase "~VENDOR .* TOTAL@2,9,20,MAXROWS",0,-1,MAXCOLS,1 box "~VENDOR .* TOTAL@2,9,20,MAXROWS",28,-1,102,1,5 font "~VENDOR .* TOTAL@2,9,20,MAXROWS",0,0,20,1,DBFONT # invoice total font " TOTAL @10,9,16,MAXROWS",0,0,7,1,DFONT # Grand totals line erase "GRAND TOTAL",0,-1,MAXCOLS,1 box "GRAND TOTAL",-1,-1,MAXCOLS,2,1,10 font "GRAND TOTAL",0,0,20,1,HBFONT font "End of Report",0,0,14,1,DFONT [A/P Aged Summary] dsn_sample "/u0/unform_test/osas/txt/ap_aged_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=5 # used by rpt hdr } prepage { merge "Mrg load rpt header" } # shift right 1 col for better spacing shift 1 # default detail line const BROW=1 const EROW=MAXROWS cfont 2,BROW,9,EROW,DFONT # vendor cfont 11,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 "Mrg Report Header" # detail cerase 1,8,MAXCOLS,8 cbox LEFTCOL,6.25,RIGHTCOL,7.5,MBOXSIZE,10 const BROW=7 const EROW=7 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]@1,9,1,MAXROWS",0,0,37,1,DBFONT font "~[A-Za-z0-9]@1,9,1,MAXROWS",39,0,14,1,DBFONT font "~[A-Za-z0-9]@1,9,1,MAXROWS",60,0,67,1,DFONT # vendor total line font "~VENDOR .* TOTAL@2,9,20,MAXROWS",0,0,20,1,DFONT # Grand totals line erase "GRAND TOTAL",0,-1,MAXCOLS,1 box "GRAND TOTAL",-1,-1,MAXCOLS,2,1,10 font "GRAND TOTAL",0,0,20,1,HBFONT font "End of Report",0,0,14,1,DFONT [A/R Aged Detail] dsn_sample "/u0/unform_test/osas/txt/ar_aged_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 "Mrg load rpt header" } # shift right 1 col for better spacing shift 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 "Mrg 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 "~(...)...-@39,8,47,MAXROWS",-39,0,37,1,DBFONT font "~(...)...-@39,8,47,MAXROWS",-1,0,48,1,DBCFONT font "~(...)...-@39,8,47,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,MAXCOLS,2,1,10 font "GRAND TOTAL",0,0,20,1,HBFONT font "End of Report",0,0,14,1,DFONT [A/R Aged Summary] dsn_sample "/u0/unform_test/osas/txt/ar_aged_sum.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 "Mrg load rpt header" } # shift right 1 col for better spacing shift 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 "Mrg 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 "~(...)...-@11,8,19,MAXROWS",-10,1,37,2,DBFONT # Grand totals line erase "GRAND TOTAL",0,-1,MAXCOLS,1 box "GRAND TOTAL",-1,-1,MAXCOLS,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 "/u0/unform_test/osas/txt/gl_bal_prev.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=.5 # 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 # default detail line const BROW=1 const EROW=MAXROWS cfont 1,BROW,15,EROW,DBCFONT # acnt no cfont 17,BROW,45,EROW,DFONT # desc cfont 47,BROW,59,EROW,DBRFONT # curr yr cfont 60,BROW,60,EROW,DBFONT,black # ) cfont 63,BROW,75,EROW,DBRFONT # prev yr/budget cfont 76,BROW,76,EROW,DBFONT,black # ) # header cerase LEFTCOL,1,MAXCOLS,4 cbox LEFTCOL,.1,RIGHTCOL,4,MBOXSIZE,HSHADE text 1,1.5,{trim(cut(10,1,58,""))},HBCFONT,14,cols=MAXCOLS text 1,2.75,{trim(cut(1,3,MAXCOLS,""))},HBCFONT,12,cols=MAXCOLS text 1,1.5,{trim(cut(70,1,10,""))},HRFONT,cols=MAXRCOLS 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 1,BROW,15,EROW,ICFONT # acnt no cfont 17,BROW,45,EROW,IFONT # desc cfont 47,BROW,59,EROW,IRFONT # curr yr cfont 63,BROW,75,EROW,IRFONT # prev yr/budget # special detail lines font "~ [A-Z]@22,11,24,MAXROWS",2,0,50,1,DBFONT,11 font "~ [A-Z]@13,11,15,MAXROWS",2,0,50,1,DBFONT,10 font "~ TOTAL@17,11,23,MAXROWS",2,0,27,1,DBFONT,10 box "~ TOTAL@17,11,23,MAXROWS",1,-.85,58,1.4,1,DSHADE erase "~ TOTAL@17,11,23,MAXROWS",0,-1,MAXCOLS,1 erase "~ TOTAL@17,11,23,MAXROWS",0,1,MAXCOLS,1 # unaudited font "UNAUDITED",0,0,9,1,HFONT [G/L Income Statement with Budget Comp] dsn_sample "/u0/unform_test/osas/txt/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=.5 # 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 # default detail line const BROW=1 const EROW=MAXROWS cfont 1,BROW,6,EROW,DBCFONT # acnt no cfont 8,BROW,39,EROW,DFONT # desc # current period cfont 40,BROW,51,EROW,DBRFONT,black # this yr cfont 52,BROW,52,EROW,DBFONT # - cfont 54,BROW,59,EROW,DRFONT # % cfont 60,BROW,60,EROW,DFONT,black # - cfont 62,BROW,74,EROW,DBRFONT # budget cfont 75,BROW,75,EROW,DBFONT,black # - cfont 77,BROW,82,EROW,DRFONT # % cfont 83,BROW,83,EROW,DFONT,black # - # year to date cfont 85,BROW,97,EROW,DBRFONT # this yr cfont 98,BROW,98,EROW,DBFONT,black # - cfont 100,BROW,105,EROW,DRFONT # % cfont 106,BROW,106,EROW,DFONT,black # - cfont 108,BROW,120,EROW,DBRFONT # budget cfont 121,BROW,121,EROW,DBFONT,black # - cfont 123,BROW,128,EROW,DRFONT # % cfont 129,BROW,129,EROW,DFONT,black # - # header cbox LEFTCOL,.1,RIGHTCOL,4,MBOXSIZE,HSHADE text 1,1.5,{trim(cut(10,1,100,""))},HBCFONT,14,cols=MAXCOLS text 1,2.75,{trim(cut(1,3,MAXCOLS,""))},HBCFONT,12,cols=MAXCOLS text 1,1.5,{trim(cut(121,1,10,""))},HRFONT,cols=MAXRCOLS 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 1,BROW,6,EROW,ICFONT # acnt no cfont 8,BROW,39,EROW,IFONT # desc # current period const BROW=8 const EROW=8 cfont 40,BROW,51,EROW,IRFONT,black # this yr cfont 54,BROW,59,EROW,IRFONT # % cfont 62,BROW,74,EROW,IRFONT # budget cfont 77,BROW,82,EROW,IRFONT # % # year to date cfont 85,BROW,97,EROW,IRFONT # this yr cfont 100,BROW,105,EROW,IRFONT # % cfont 108,BROW,120,EROW,IRFONT # budget cfont 123,BROW,128,EROW,IRFONT # % # special detail lines font "~ [A-Z]@6,11,8,MAXROWS",2,0,50,1,DBFONT,11 font "~ [A-Z]@7,11,9,MAXROWS",2,0,50,1,DBFONT,10 font "~ TOTAL@9,11,15,MAXROWS",2,0,27,1,DBFONT,10 box "~ TOTAL@9,11,15,MAXROWS",1,-.85,119,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 "~ TOTAL@10,11,16,MAXROWS",2,0,27,1,DBFONT,10 box "~ TOTAL@10,11,16,MAXROWS",1,-.85,118,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 "~ GROSS@10,11,16,MAXROWS",2,0,27,1,DBFONT,10 box "~ GROSS@10,11,16,MAXROWS",1,-.85,118,1.4,1,HSHADE font "~ PROFI@10,11,16,MAXROWS",2,0,27,1,DBFONT,10 box "~ PROFI@10,11,16,MAXROWS",1,-.85,118,1.4,1,HSHADE font "~ NET@10,11,14,MAXROWS",2,0,27,1,DBFONT,10 box "~ NET@10,11,14,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 "/u0/unform_test/osas/txt/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=.5 # 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 # default detail line const BROW=1 const EROW=MAXROWS cfont 1,BROW,6,EROW,DBCFONT # acnt no cfont 8,BROW,36,EROW,DFONT # desc # current period cfont 37,BROW,48,EROW,DBRFONT,black # this yr cfont 49,BROW,49,EROW,DBFONT # - cfont 51,BROW,56,EROW,DRFONT # % cfont 57,BROW,57,EROW,DFONT,black # - cfont 59,BROW,70,EROW,DBRFONT # prev yr cfont 71,BROW,71,EROW,DBFONT,black # - cfont 73,BROW,80,EROW,DRFONT # % cfont 81,BROW,81,EROW,DFONT,black # - # year to date cfont 83,BROW,94,EROW,DBRFONT # this yr cfont 95,BROW,95,EROW,DBFONT,black # - cfont 97,BROW,102,EROW,DRFONT # % cfont 103,BROW,103,EROW,DFONT,black # - cfont 105,BROW,116,EROW,DBRFONT # prev yr cfont 117,BROW,117,EROW,DBFONT,black # - cfont 119,BROW,126,EROW,DRFONT # % cfont 127,BROW,127,EROW,DFONT,black # - # header cbox LEFTCOL,.1,RIGHTCOL,4,MBOXSIZE,HSHADE text 1,1.5,{trim(cut(10,1,100,""))},HBCFONT,14,cols=MAXCOLS text 1,2.75,{trim(cut(1,3,MAXCOLS,""))},HBCFONT,12,cols=MAXCOLS text 1,1.5,{trim(cut(121,1,10,""))},HRFONT,cols=MAXRCOLS 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 1,BROW,5,EROW,ICFONT,black # acnt no cfont 6,BROW,36,EROW,IFONT # desc # current period const BROW=8 const EROW=8 cbox 37,7.5,80,7.5 cfont 37,7,80,7,ICFONT,black cfont 37,BROW,48,EROW,IRFONT,black # this yr cfont 51,BROW,56,EROW,IRFONT # % text 59,BROW,{trim(cut(65,8,9,""))},IRFONT,cols=13 # prev yr cfont 73,BROW,80,EROW,IRFONT # % # year to date cbox 83,7.5,126,7.5 cfont 83,7,126,7,ICFONT,black cfont 83,BROW,94,EROW,IRFONT # this yr cfont 97,BROW,102,EROW,IRFONT # % text 105,BROW,{trim(cut(111,8,9,""))},IRFONT,cols=12 # prev yr cfont 119,BROW,126,EROW,IRFONT # % # special detail lines font "~ [A-Z]@4,11,6,MAXROWS",2,0,50,1,DBFONT,11 font "~ [A-Z]@5,11,7,MAXROWS",2,0,50,1,DBFONT,10 font "~ TOTAL@7,11,13,MAXROWS",2,0,27,1,DBFONT,10 box "~ TOTAL@7,11,13,MAXROWS",1,-.85,119,1.4,1,DSHADE erase "~ TOTAL@7,11,13,MAXROWS",0,-1,MAXCOLS,1 erase "~ TOTAL@7,11,13,MAXROWS",0,1,MAXCOLS,1 font "~ TOTAL@8,11,14,MAXROWS",2,0,27,1,DBFONT,10 box "~ TOTAL@8,11,14,MAXROWS",1,-.85,118,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 "~ GROSS@8,11,14,MAXROWS",2,0,27,1,DBFONT,10 box "~ GROSS@8,11,14,MAXROWS",1,-.85,118,1.4,1,HSHADE font "~ PROFI@8,11,14,MAXROWS",2,0,27,1,DBFONT,10 box "~ PROFI@8,11,14,MAXROWS",1,-.85,118,1.4,1,HSHADE font "~ NET@8,11,14,MAXROWS",2,0,27,1,DBFONT,10 box "~ NET@8,11,14,MAXROWS",1,-.85,118,1.4,1,HSHADE # unaudited font "UNAUDITED",0,0,9,1,HFONT [G/L Trial Balance] dsn_sample "/u0/unform_test/osas/txt/gl_trial_prev.txt" detect 0,3,"TRIAL BALANCE" detect 1,8,"GL" # set up document constants const MAXCOLS=130 # max cols to output const MAXRCOLS=129 # MAXCOLS-1 const LEFTCOL=.5 # left vertical line const RIGHTCOL=130 # 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 # default detail line const BROW=1 const EROW=MAXCOLS cfont 1,BROW,13,EROW,DBFONT # acnt # cfont 15,BROW,50,EROW,DBFONT # desc cfont 54,BROW,66,EROW,DBRFONT # debit cfont 74,BROW,86,EROW,DBRFONT # credit cfont 97,BROW,109,EROW,DBRFONT # debit cfont 117,BROW,129,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,3,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 54,6,95,7,ICFONT,10 cfont 97,6,135,7,ICFONT,10 cfont 1,BROW,13,EROW,IFONT # acnt # cfont 15,BROW,50,EROW,IFONT # desc cfont 54,BROW,66,EROW,IRFONT # debit cfont 74,BROW,86,EROW,IRFONT # credit cfont 97,BROW,109,EROW,IRFONT # debit cfont 117,BROW,129,EROW,IRFONT # credit # totals erase " BALANCE@13,10,21,MAXROWS",0,-1,MAXCOLS,1 erase " BALANCE@13,10,21,MAXROWS",0,1,MAXCOLS,1 box " BALANCE@13,10,21,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 "/u0/unform_test/osas/txt611/so_invoice1_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 { # 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 "Mrg get watermark text" xcol=30,xrow=1 merge "Mrg 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: # check for continued cont$=cut(1,47,40,"") if trim(cont$)<>"" then for i=47 to 55; text$[i]=text$[i+1],text$[i+1]=""; next i; cont$="Continued on next page" } # more room at top vshift 1 # 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 "Mrg 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,{63-13*(wmlines-1)},{wdoc_title$},cgtimes,120, shade=WATERMARK_SHADE,center,cols=MAXCOLS,fit,spacing=1.25 # message area cbox LEFTCOL,48,MAXCOLS,51.5,MBOXSIZE cfont 2,49,91,51,IFONT,black cfont 93,51,102,51,IFONT,black # totals cbox LEFTCOL,51.5,MAXCOLS,53.5,MBOXSIZE,crows=52.5::ISHADE, ccols=25 40 55 70 85 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$},IRFONT,12,cols=MAXRCOLS cerase 80,55,MAXCOLS,58 [SO Pick Slip - plain] dsn_sample "/u0/unform_test/osas/txt/pickslip_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 "Mrg get watermark text" # set up copy titles dim copy_title$[MAX_COPIES] if MAX_COPIES>=1 then copy_title$[WHSE_COPY]="Warehouse Copy" } prepage { xcol=31,xrow=2 merge "Mrg get company info" shipto$="" if trim(get(26,12,10))<>"" then shipto$="Your ship to code is "+trim(cut(26,12,10,"")) } # shift down to make room vshift 2 # default detail line cbox LEFTCOL,21,RIGHTCOL,62,MBOXSIZE, crows=23::DSHADE,ccols=15 55 66 72 88 107 const BROW=1 const EROW=MAXROWS cfont 10,BROW,14,EROW,DBCFONT # line # cfont 16,BROW,54,EROW,DFONT # item #/desc cfont 56,BROW,65,EROW,DBCFONT # bin cfont 67,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,14,EROW,ICFONT # line # cfont 16,BROW,54,EROW,IFONT # item #/desc cfont 56,BROW,65,EROW,ICFONT # bin cfont 67,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:MBOXSIZE merge "Mrg 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=10 22 35 45 56 73 115 cbox 92,9,115,11.5 cfont 11,10,21,10,ICFONT cfont 23,10,34,10,ICFONT cfont 36,10,44,10,ICFONT cfont 46,10,55,10,ICFONT cfont 57,10,72,10,ICFONT cfont 74,10,91,10,ICFONT cfont 93,10,114,10,ICFONT cfont 116,10,MAXCOLS,10,ICFONT cfont 11,11,21,11,DBCFONT,black cfont 23,11,34,11,DBCFONT,black cfont 36,11,44,11,DBCFONT,black cfont 46,11,55,11,DBCFONT,black cfont 57,11,72,11,DBCFONT,black cfont 74,11,91,11,DBCFONT,black cfont 74,12,114,12,DBFONT,black cfont 93,11,114,11,DBCFONT,black cfont 116,11,MAXCOLS,11,DBCFONT,black # ship to section cbox LEFTCOL,12.5,MAXCOLS,21,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,4,"","Y","Y")},DBFONT text 11,20,{shipto$},DBFONT # sold to section text 58,13,{trim(cut(58,13,8,""))},ICFONT,cols=8 text 67,13,{mcut(67,13,30,4,"","Y","Y")},DBFONT text 67,20,{"Your customer code is "+trim(cut(67,12,10,""))},DBFONT # watermark - large font with light shading WATERMARK 1,{60-9*(wmlines-1)},{wdoc_title$},cgtimes,120, shade=WATERMARK_SHADE,center,cols=MAXCOLS,fit,spacing=1 # footer text 1,{MAXROWS-.5},{copy_title$[copy]},HBCFONT,12,cols=MAXCOLS cfont 2,63,MAXCOLS,65,IFONT # memo lines [SO Pack List - plain] dsn_sample "/u0/unform_test/osas/txt/packslip_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 "Mrg get watermark text" # set up copy titles dim copy_title$[MAX_COPIES] if MAX_COPIES>=1 then copy_title$[CUSTOMER_COPY]="Customer Copy" } prepage { xcol=31,xrow=2 merge "Mrg get company info" shipto$="" if trim(get(26,11,10))<>"" then shipto$="Your ship to code is "+trim(cut(26,11,10,"")) } # shift down to make room vshift 3 # default detail line cbox LEFTCOL,21,RIGHTCOL,62,MBOXSIZE, crows=23::DSHADE,ccols=15 66 72 88 107 const BROW=1 const EROW=MAXROWS cfont 10,BROW,14,EROW,DBCFONT # line # cfont 16,BROW,54,EROW,DFONT # item #/desc cfont 67,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,14,EROW,ICFONT # line # cfont 16,BROW,54,EROW,IFONT # item #/desc cfont 67,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,6 cbox LEFTCOL,1,RIGHTCOL,MAXROWS,MBOXSIZE,crows=9:MBOXSIZE merge "Mrg 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,RIGHTCOL,12.5,MBOXSIZE,crows=10.5::ISHADE, ccols=10 22 35 45 56 73 115 cbox 92,9,115,11.5 cfont 11,10,21,10,ICFONT cfont 23,10,34,10,ICFONT cfont 36,10,44,10,ICFONT cfont 46,10,55,10,ICFONT cfont 57,10,72,10,ICFONT cfont 74,10,91,10,ICFONT cfont 93,10,114,10,ICFONT cfont 116,10,MAXCOLS,10,ICFONT cfont 11,11,21,11,DBCFONT,black cfont 23,11,34,11,DBCFONT,black cfont 36,11,44,11,DBCFONT,black cfont 46,11,55,11,DBCFONT,black cfont 57,11,72,11,DBCFONT,black cfont 74,11,91,11,DBCFONT,black cfont 74,12,114,12,DBFONT,black cfont 93,11,114,11,DBCFONT,black cfont 116,11,MAXCOLS,11,DBCFONT,black # ship to section cbox LEFTCOL,12.5,MAXCOLS,21,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,20,{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,20,{"Your customer code is "+trim(cut(67,11,10,""))},DBFONT # watermark - large font with light shading WATERMARK 1,{60-9*(wmlines-1)},{wdoc_title$},cgtimes,120, shade=WATERMARK_SHADE,center,cols=MAXCOLS,fit,spacing=1 # footer text 1,{MAXROWS-.5},{copy_title$[copy]},HBCFONT,12,cols=MAXCOLS cfont 2,63,MAXCOLS,65,IFONT # memo lines [PO Order - plain] dsn_sample "/u0/unform_test/osas/txt/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 "Mrg get watermark text" } prepage { xcol=6,xrow=1 merge "Mrg 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 shift 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 "Mrg 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 51 73 cfont 2,10,11,10,ICFONT cfont 13,10,32,10,ICFONT cfont 34,10,50,10,ICFONT cfont 52,10,72,10,ICFONT cfont 74,10,MAXCOLS,10,ICFONT cfont 2,11,11,11,DBCFONT cfont 13,11,32,11,DBCFONT cfont 34,11,50,11,DBCFONT cfont 52,11,72,11,DBCFONT cfont 74,11,MAXRCOLS,11,DBCFONT # vendor address 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 # tricky due to shift above; must search in "old" area and offset to new font " @2,24,2,51",5,0,77,1,DFONT # description # watermark - large font with light shading WATERMARK 1,{51-9*(wmlines-1)},{wdoc_title$},cgtimes,120, shade=WATERMARK_SHADE,center,cols=MAXCOLS,fit,spacing=1 # sub totals cerase LEFTCOL,55,RIGHTCOL,55 cbox "Subtotal@1,53",-5,-1,RIGHTCOL,53.5,MBOXSIZE,HSHADE cbox "Subtotal@1,53",-5,.5,RIGHTCOL,55 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",1,0,8,1,IRFONT font "Tax@1,53",1,0,3,1,IRFONT font "Freight@1,53",1,0,7,1,IRFONT font "Misc.@1,53",1,0,5,1,IRFONT,black font "Prepaid@1,53",1,0,7,1,IRFONT,black font "Total@1,53",1,0,5,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 "/u0/unform_test/osas/txt/ar_stmt_plain1.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 FILE_COPY=2 const MAX_COPIES=2 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 "Mrg 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$[FILE_COPY]="File Copy" } prepage { xcol=2,xrow=3 merge "Mrg get company info" } # make space on left & top shift 1 vshift 1 # 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,15,RIGHTCOL,15 cerase LEFTCOL,17,RIGHTCOL,17 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,8 cbox LEFTCOL,1,RIGHTCOL,MAXROWS,MBOXSIZE,crows=9:MBOXSIZE merge "Mrg 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-9*(wmlines-1)},{wdoc_title$},cgtimes,120, shade=WATERMARK_SHADE,center,cols=MAXCOLS,fit,spacing=1 # footer cerase 1,52,MAXCOLS,52 cerase 1,54,MAXCOLS,54 cerase 1,56,MAXCOLS,56 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,79,56,DBRFONT,11,black cfont LEFTCOL,58,RIGHTCOL,63,IFONT 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 "/u0/unform_test/osas/txt611/so_invoice1_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 { # 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 "Mrg 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$+"." # look for continued cont$="N" for i=50 to 66 x=pos("(continued on next page)"=text$[i]) if x then cont$="Y";x$=set(x,i,24,"");exitto exit_loop next i exit_loop: 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 # continued? cont$="" x=pos("(continued on next page)"=text$[55]) if x then cont$="Continued on next page" } 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 "Mrg 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 "Mrg 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-9*(wmlines-1)},{wdoc_title$},cgtimes,120,shade=WATERMARK_SHADE,center,cols=MAXCOLS,fit,spacing=1 # 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,63,{cont$},ICFONT,12,cols=MAXCOLS erase "(continued",0,0,25,1 # totals cbox "!=(continued@11,55,20,55",-10,3,RIGHTCOL,61,MBOXSIZE,crows=59.5 61::HSHADE,ccols=15 28 41 54 67 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 text "!=(continued@11,55,20,55",-8,4,"Taxable",HRFONT,cols=12,10 text "!=(continued@11,55,20,55",5,4,"Non-Taxable",HRFONT,cols=12,10 text "!=(continued@11,55,20,55",18,4,"Freight",HRFONT,cols=12,10 text "!=(continued@11,55,20,55",31,4,"Sales Tax",HRFONT,cols=12,10 text "!=(continued@11,55,20,55",44,4,"Misc Charge",HRFONT,cols=12,10 text "!=(continued@11,55,20,55",56,4,"Grand Total",HBRFONT,cols=12,10 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] # Tested OK with 6.1.1 9/21/01 - bcj # 8.5x11 statement has bug on multiple statements - an extra line is # added after the first page!!! Therefore, the funky prepage logic. # added e-mail and web site - 07/23/01 detect 0,7,"~ DATEMASK" detect 0,13,"~\.[0-9][0-9]" const MAXCOLS=80 const MAXRCOLS=78 const MAXROWS=66 const LEFTCOL=.5 cols MAXCOLS page MAXROWS rows MAXROWS const CUSTOMER_COPY=1 const FILE_COPY=2 pcopies 2 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)) } # Top section const HFONT=univers,10,italic const DFONT=cgtimes,10,bold const SHADE=10 cerase 1,1,MAXCOLS,7 LOGO_IMAGE 1,1,10,6,COMP_LOGO text 1,2.25,"STATEMENT",univers,18,bold,right,cols=MAXRCOLS text 1,2.25,"COMP_NAME",univers,15,bold,center,cols=MAXRCOLS text 1,3.35,"COMP_ADDR1",univers,12,center,cols=MAXRCOLS text 1,4.35,"COMP_ADDR2",univers,12,center,cols=MAXRCOLS text 1,5.35,"COMP_PHONES",univers,12,center,cols=MAXRCOLS text 1,6.25,"COMP_EMAIL",univers,10,center,cols=MAXRCOLS text 1,7.25,"COMP_WEBSITE",univers,10,center,cols=MAXRCOLS # upper right block cbox 60,4,MAXCOLS,6,1,10 cbox 60,6,MAXCOLS,8 cbox 68,4,68,8 cbox 74,4,74,8 text 61,5,"Date",HFONT,center,cols=7 text 61,7,{date$},DFONT,center,cols=7 text 69,5,"Account",HFONT text 69,7,{cust_code$},DFONT text 75,5,"Page",HFONT text 75,7,{pageno$},DFONT # address & balance info cbox LEFTCOL,8,MAXCOLS,9.5,1,10 cbox LEFTCOL,9.5,MAXCOLS,20 text 1,9,"Customer",HFONT cfont 1,10,49,19,DFONT text 51,13,"Amount Due",HFONT,bold cfont 70,13,79,13,DFONT,right text 51,15,"Terms",HFONT cfont 66,15,79,15,DFONT,right # line item detail cbox LEFTCOL,20,MAXCOLS,21.5,1,10 cbox LEFTCOL,21.5,MAXCOLS,51 cbox 12,20,12,51 cbox 23,20,23,51 cbox 27,20,27,51 cbox 38,20,38,51 cbox 51,20,51,51 cbox 64,20,64,51 text 1,21,"Invoice Date",HFONT,center,cols=12 text 14,21,"Invoice No",HFONT text 24,21,"Type",HFONT text 28,21,"Check No",HFONT text 39,21,"Charges",HFONT,right,cols=12 text 52,21,"Credits",HFONT,right,cols=12 text 65,21,"Balance",HFONT,right,cols=15 AR_STMT_CFONT 1,20,11,50,DFONT,center AR_STMT_CFONT 13,20,22,50,DFONT AR_STMT_CFONT 24,20,26,50,DFONT,center AR_STMT_CFONT 28,20,37,50,DFONT AR_STMT_CFONT 39,20,50,50,DFONT,right AR_STMT_CFONT 52,20,63,50,DFONT,right AR_STMT_CFONT 65,20,79,50,DFONT,right # Messages cbox LEFTCOL,51,MAXCOLS,58 cfont 1,52,MAXCOLS,57,DFONT # aging table cbox LEFTCOL,58,MAXCOLS,59.5,1,10 cbox LEFTCOL,59.5,MAXCOLS,61 box 14,58,1,3 box 27,58,1,3 box 40,58,1,3 box 53,58,1,3 box 66,58,1,3 text 1,59,"Current",HFONT,right,cols=13 text 15,59,"31-60 Days",HFONT,right,cols=12 text 28,59,"61-90 Days",HFONT,right,cols=12 text 41,59,"Over 90 Days",HFONT,right,cols=12 text 54,59,"Finance Charge",HFONT,right,cols=12 text 67,59,"Amount Due",HFONT,bold,right,cols=13 cfont 1,60,13,60,DFONT,right cfont 15,60,26,60,DFONT,right cfont 28,60,39,60,DFONT,right cfont 41,60,52,60,DFONT,right cfont 54,60,65,60,DFONT,right cfont 67,60,79,60,DFONT,right if copy CUSTOMER_COPY text 1,65,"Customer Copy",univers,12,bold,center,cols=MAXCOLS endif if copy FILE_COPY text 1,65,"Accounting Copy",univers,12,bold,center,cols=MAXCOLS endif [PO Purchase Order - 8.5 x 11] # Tested OK with 6.1.1 9/21/01 - bcj # adjusted detects for greater uniqueness - 06/25/01 # added e-mail and web site - 07/23/01 # adjusted PO # section to allow more space for company info - 07/23/01 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 const MAXCOLS=80 const MAXRCOLS=78 const MAXROWS=66 const LEFTCOL=.5 cols MAXCOLS page MAXROWS rows MAXROWS const VENDOR_COPY=1 const FILE_COPY=2 pcopies 2 vshift 2 prepage { pono$=trim(get(54,3,8)) podate$=trim(get(65,3,10)) reqdate$=trim(get(54,6,10)) location$=trim(get(66,6,6)) pageno$=trim(get(75,6,3)) x$=set(1,15,10,"") } # Title area text 1,2.25,"Purchase Order",univers,18,bold,right,cols=MAXRCOLS LOGO_IMAGE 1,1,10,6,COMP_LOGO text 1,2.25,"COMP_NAME",univers,15,bold,center,cols=MAXRCOLS text 1,3.35,"COMP_ADDR1",univers,12,center,cols=MAXRCOLS text 1,4.35,"COMP_ADDR2",univers,12,center,cols=MAXRCOLS text 1,5.35,"COMP_PHONES",univers,12,center,cols=MAXRCOLS text 1,6.25,"COMP_EMAIL",univers,10,center,cols=MAXRCOLS text 1,7.25,"COMP_WEBSITE",univers,10,center,cols=MAXRCOLS # upper right info const DFONT=cgtimes,10,bold const HFONT=univers,10,italic const SHADE=10 cbox 60,4.5,MAXCOLS,9.5 cbox 60,4.5,72,9.5,1,SHADE cbox 60,5.5,MAXCOLS,6.5 cbox 60,7.5,MAXCOLS,8.5 cerase 54,3,MAXCOLS,6 text 61,5,"PO Number",HFONT text 61,6,"PO Date",HFONT text 61,7,"Req'd Ship Date",HFONT text 61,8,"Location",HFONT text 61,9,"Page",HFONT text 73,5,{pono$},DFONT text 73,6,{podate$},DFONT text 73,7,{reqdate$},DFONT text 73,8,{Location$},DFONT text 73,9,{Pageno$},DFONT # Address section cbox LEFTCOL,10,MAXCOLS,20 cbox LEFTCOL,10,5,20,1,SHADE cbox 40.5,10,45,20,1,SHADE text 1,11,"Vendor",HFONT text 41.5,11,"Ship",HFONT text 41.5,12,"To",HFONT cfont 6,11,39,19,DFONT cfont 46,11,79,19,DFONT # ribbon info cbox LEFTCOL,20,MAXCOLS,21.5,1,SHADE cbox LEFTCOL,21.5,MAXCOLS,23 box 21,20,1,3 box 40,20,1,3 box 59,20,1,3 text 1,21,"Ordered By",HFONT text 22,21,"Ship Via",HFONT text 41,21,"F.O.B.",HFONT text 60,21,"Terms Description",HFONT cfont 1,22,20,22,DFONT cfont 22,22,39,22,DFONT cfont 41,22,58,22,DFONT cfont 60,22,MAXCOLS,22,DFONT # line detail cbox LEFTCOL,23,MAXCOLS,24.5,1,SHADE cbox LEFTCOL,24.5,MAXCOLS,51 box 6,23,1,28 box 34,23,1,28 box 48,23,1,28 box 62,23,1,28 text 1,24,"Entry #",HFONT text 7,24,"Item ID",HFONT text 28,24,"U/M",HFONT text 35,24,"Unit Price",HFONT,right,cols=13 text 49,24,"Ordered Quantity",HFONT,right,cols=13 text 63,24,"Extension",HFONT,right,cols=15 PO_CFONT 2,25,4,50,DFONT PO_FONT "~ [0-9]@1,23,2,48",6,2,18,1,DFONT PO_FONT "~ [0-9]@1,23,2,48",27,2,3,1,DFONT PO_CFONT 35,25,47,50,DFONT,right PO_CFONT 49,25,61,50,DFONT,right PO_CFONT 63,25,77,50,DFONT,right PO_FONT " @1,23,2,48",6,2,35,1,DFONT # message area cbox LEFTCOL,51,MAXCOLS,53 cfont 1,52,48,52,DFONT cfont 50,52,60,52,DFONT,right cfont 63,52,77,52,DFONT,right # sub totals cbox LEFTCOL,53,MAXCOLS,54.5,1,SHADE cbox LEFTCOL,54.5,MAXCOLS,56 box 15,53,1,3 box 30,53,1,3 box 45,53,1,3 box 60,53,1,3 text 1,54,"Tax",HFONT,right,cols=14 text 16,54,"Freight",HFONT,right,cols=14 text 31,54,"Misc.",HFONT,right,cols=14 text 46,54,"Prepaid",HFONT,right,cols=14 text 61,54,"Grand Total",HFONT,bold,right,cols=17 cfont 1,55,14,55,DFONT,right cfont 16,55,29,55,DFONT,right cfont 31,55,44,55,DFONT,right cfont 46,55,59,55,DFONT,right cfont 61,55,77,55,DFONT,right # approval line cbox 55,60,MAXCOLS,60 text 55.5,60.75,"Received by",HFONT,10 cbox 55,64,MAXCOLS,64 text 55.5,64.75,"Authorized Signature",HFONT,10 if copy VENDOR_COPY text 1,65.5,"Vendor Copy",univers,12,bold,center,cols=MAXRCOLS endif if copy FILE_COPY text 1,65.5,"Accounting Copy",univers,12,bold,center,cols=MAXRCOLS endif [SO Pick/Pack List - 8.5 x 11] # Tested OK with 6.1.1 9/21/01 - bcj # See notes at top about pick/pack list # added e-mail and web site - 07/23/01 # adjusted PO # section to allow more space for company info - 07/23/01 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]+" const MAXCOLS=81 const MAXRCOLS=79 const MAXROWS=66 const LEFTCOL=.5 cols MAXCOLS rows MAXROWS pcopies 1 prepage { ordno$=trim(get(51,4,8)) orddate$=trim(get(63,4,8)) pageno$=trim(get(72,4,7)) custpono$=trim(get(51,7,25)) x$=set(52,4,28,"") custno$=trim(get(6,9,10));x$=set(6,9,10,"") # mark line types (D=detail, L=lot, R=remark/desc, S=serial for i=24 to 54 if mid(text$[i],5,13)="Lot Numbers :" then text$[i](1,1)="L",i=i+1; if len(text$[i])>0 then text$[i](1,1)="L" fi; goto bottom_loop if mid(text$[i],60,1)="." or mid(text$[i],61,1)="." or mid(text$[i],46,1)="." or mid(text$[i],47,1)="." then goto bottom_loop # must be remark if text$[i]<>"" then text$[i](1,1)="R" bottom_loop: next i } # Title area cbox LEFTCOL,1,MAXCOLS,MAXROWS cbox LEFTCOL,1,MAXCOLS,9 erase 1,1,MAXCOLS,7 text 1,2.25,"PICKPACK_8.5X11_TITLE",univers,18,bold,right,cols=MAXRCOLS LOGO_IMAGE 1,1,10,6,COMP_LOGO text 1,2.25,"COMP_NAME",univers,15,bold,center,cols=MAXRCOLS text 1,3.35,"COMP_ADDR1",univers,12,center,cols=MAXRCOLS text 1,4.35,"COMP_ADDR2",univers,12,center,cols=MAXRCOLS text 1,5.35,"COMP_PHONES",univers,12,center,cols=MAXRCOLS text 1,6.25,"COMP_EMAIL",univers,10,center,cols=MAXRCOLS text 1,7.25,"COMP_WEBSITE",univers,10,center,cols=MAXRCOLS # Invoice block const HFONT=univers,10,italic const DFONT=cgtimes,10,bold const SHADE=10 cbox 60,3.5,MAXCOLS,6.5 cbox 60,3.5,72,6.5,1,SHADE cbox 60,4.5,MAXCOLS,5.5 text 61,4,"Order #",HFONT text 61,5,"Order Date",HFONT text 61,6,"Page",HFONT text 73,4,{ordno$},DFONT text 73,5,{orddate$},DFONT text 73,6,{Pageno$},DFONT cbox 60,7,MAXCOLS,9 cbox 60,7,MAXCOLS,8,1,SHADE text 61,7.5,"Customer PO #",HFONT text 61,8.5,{custpono$},DFONT # address region cbox LEFTCOL,9,MAXCOLS,19 cbox LEFTCOL,9,5,19,1,SHADE cbox 39.5,9,44,19,1,SHADE text 1.5,10,"Ship",HFONT text 1.5,11,"To",HFONT text 40.5,10,"Sold",HFONT text 40.5,11,"To",HFONT cfont 6,10,39,17,DFONT cfont 45,10,MAXRCOLS,17,DFONT text 6,18,{"Your customer code is "+custno$},DFONT # subhead 1 cbox LEFTCOL,19,MAXCOLS,20.5,1,SHADE cbox LEFTCOL,20.5,MAXCOLS,22 box 7,19,1,3 box 13,19,1,3 box 21,19,1,3 box 44,19,1,3 box 56,19,1,3 box 69,19,1,3 text 1,20,"Slsp 1",HFONT text 8,20,"Slsp 2",HFONT text 14,20,"Location",HFONT text 22,20,"Ship Via",HFONT text 45,20,"Pack List #",HFONT,center,cols=11 text 57,20,"Rqstd Ship Date",HFONT,center,cols=12 text 70,20,"Actual Ship Date",HFONT,center,cols=10 cfont 1,21,6,21,DFONT cfont 8,21,12,21,DFONT cfont 14,21,20,21,DFONT cfont 22,21,43,21,DFONT cfont 45,21,55,21,DFONT,center cfont 57,21,68,21,DFONT,center cfont 70,21,MAXCOLS,21,DFONT,center # items cbox LEFTCOL,22,MAXCOLS,23.5,1,SHADE cbox LEFTCOL,23.5,MAXCOLS,62 box 4,22,1,40 box 25,22,1,40 box 30,22,1,40 box 40,22,1,40 box 53,22,1,40 box 67,22,1,40 text 1,23,"Line",HFONT text 5,23,"Item ID",HFONT text 26,23,"U/M",HFONT text 31,23,"Bin",HFONT text 41,23,"Ordered",HFONT,right,cols=12 text 54,23,"Shipped",HFONT,right,cols=13 text 68,23,"Back Ordered",HFONT,right,cols=12 # item lines SO_PICKPACK_FONT "~[0-9][0-9][0-9]@1,24,3,61",0,0,3,1,DFONT SO_PICKPACK_FONT "~[0-9][0-9][0-9]@1,24,3,61",4,0,20,1,DFONT SO_PICKPACK_FONT "~[0-9][0-9][0-9]@1,24,3,61",25,0,4,1,DFONT SO_PICKPACK_FONT "~[0-9][0-9][0-9]@1,24,3,61",30,0,9,1,DFONT SO_PICKPACK_FONT "~[0-9][0-9][0-9]@1,24,3,61",40,0,12,1,DFONT,right SO_PICKPACK_FONT "~[0-9][0-9][0-9]@1,24,3,61",53,0,13,1,DFONT,right SO_PICKPACK_FONT "~[0-9][0-9][0-9]@1,24,3,61",67,0,13,1,DFONT,right # lot lines SO_PICKPACK_FONT "L@1,24,1,61",4,0,35,1,DFONT SO_PICKPACK_FONT "L@1,24,1,61",40,0,12,1,DFONT,right SO_PICKPACK_FONT "L@1,24,1,61",54,0,12,1,DFONT,right erase "L@1,24,1,61",0,0,1,1 # desc/remarks SO_PICKPACK_FONT "R@1,24,1,61",4,0,70,1,DFONT erase "R@1,24,1,61",0,0,1,1