# ######################################################### # sxe-7.rul rule file for NxTrend application # # Requires, at least, UnForm version 7.0.09 # ######################################################### # 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. # ######################################################### # # 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. # # # Modification history # # Last modified 04/09/2007 - BCJ # # 01/31/2007 -- BCJ # Added item line shading in pick slip # Fixed invoice description overflow # Fixed missing P/O lines issue # 02/05/2007 -- BCJ # Added item line shading to other rule sets # Added short stub a/p check # 02/09/2007 -- BCJ # moved middle stub on a/p check down 2 rows # 02/12/2007 -- BCJ # adjusted memo handling on invoice, acks,pick, and P/O's # corrected staging area text printing in instructions field in pick tickets # 04/09/2007 -- BCJ # adjusted pick shading & rt hdr section # adjusted detail qtys & rt hdr section # adjusted detail qtys, rt hdr section, totals # # rule sets included with this rule file # A/P: checks (short & long) # A/R: statements # I/C: transfer_packing lists # P/O: purchase orders, return merchandise forms # S/O: invoices, credit memos, pick slips # S/O: order acknowledgements, quotes # # Global constants ####################################### # 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 global COMP_NAME="Company Name: Edit rule file" global COMP_ADDR1="Address 1" global COMP_ADDR2="Address 2" global COMP_ADDR3="Address 3" global COMP_PHONES="Phone: ###-###-#### Fax: ###-###-####" global COMP_EMAIL="E-Mail: xxxx@xxxxxxxxxxxxxxx.com" global COMP_WEBSITE="Website: www.xxxxxxxxxxxxxxx.com" # Merge rule file that contains all "extra" # features, eg. archiving, emailing, etc. global MERGE_FILE="sxe-7m.rul" # Base engine for document handling, eg. emailing # use full path if not in UnForm directory global DOC_ENGINE="eDocEngine.rul" # Logos global LOGO_IMAGE="image" global COMP_LOGO="sdsilogo.pcl" # change to your logo file name # A/P check constants global AP_BANK_NAME="Bank Name" global AP_BANK_ADDR1="1 Bank Address" global AP_BANK_ADDR2="City CA 12345" global AP_ROUTING="12-345/6789" global AP_MICR_ACCOUNTNO=":123456789:9999-1234<34>" global AP_MICR="micr" # remove # to turn on # check signature on AP/PR checks, global SIGNATURE_IMAGE="#image" # remove # to turn on global SIGNATURE="" # insert signature file name # watermarks global WATERMARK_SHADE=10 # adjust to desired darkness global WATERMARK="text" # remove # to turn on # change #gs on to gs on to turn on graphical shading # change gs on to #gs on to turn off graphical shading global GSON="gs on" # main heading constants global HFONT= univers,11,fit global HLFONT= HFONT,left global HCFONT= HFONT,center global HRFONT= HFONT,right global HSHADE= 30 # bold global HBFONT= HFONT,bold global HBLFONT=HBFONT,left global HBCFONT=HBFONT,center global HBRFONT=HBFONT,right # internal heading font constants (ribbons, detail headers) global IFONT= univers,8,italic,fit global ILFONT= IFONT,left global ICFONT= IFONT,center global IRFONT= IFONT,right global ISHADE= 20 # bold global IBFONT= IFONT,bold global IBLFONT=IBFONT,left global IBCFONT=IBFONT,center global IBRFONT=IBFONT,right # detail data font constants global DFONT= cgtimes,9 global DLFONT= DFONT,left global DCFONT= DFONT,center global DRFONT= DFONT,right global DSHADE= 10 # bold global DBFONT= DFONT,bold global DBLFONT=DBFONT,left global DBCFONT=DBFONT,center global DBRFONT=DBFONT,right # default major section box size global MBOXSIZE=5 # trim & lf constants global UFTRIM="Y" global UFSAVELF="Y" [SO Acknowledgement/Quote] dsn_sample "/u0/unform_test/sxe/txt/ack11401.txt" #dsn_sample "/u0/unform_test/sxe/txt/quote1.txt" #dsn_sample "/u0/unform_test/sxe/txt/ack2.txt" #dsn_sample "/u0/unform_test/sxe/txt/ack1.txt" #dsn_sample "/u0/unform_test/sxe/txt/ack.txt" #dsn_sample "/u0/unform_test/sxe/txt/quote.txt" # applies to form format #1 detect 0,2,"^Order Acknowledgement" # set up document constants local MAXCOLS=134 # max cols to output local MAXRCOLS=133 # MAXCOLS-1 local LEFTCOL=1 # left vertical line local RIGHTCOL=134 # right vertical line local MAXROWS=58 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows local CUSTOMER_COPY=1 local SCANNING_COPY=2 local FILE_COPY=3 local MAX_COPIES=3 copies MAX_COPIES landscape dpi 600 # see global constant above GSON # graphical shading title "Order Acknowledgement" # view in pdf properties prejob { dim copy_title$[MAX_COPIES] if MAX_COPIES>=1 then : copy_title$[CUSTOMER_COPY]="Customer Copy" endif if MAX_COPIES>=3 then : copy_title$[FILE_COPY]="Office Copy" endif } prepage { doc_title$="ORDER ACKNOWLEDGEMENT" if pos("Quote Order"=text$[2]) then : doc_title$="QUOTE" endif docid$=get(121,3,12,"UFTRIM") docdate$=get(106,3,12,"UFTRIM") if docdate$="" then docdate$=get(94,5,8) custpo$=get(104,5,22,"UFTRIM") xrow1=22,xrow2=58 merge "zMrg check continued" xcol=68,xrow=7,xcols=70,xrows=5 merge "zMrg load comp info" xcol=12,xrow=7,xcols=35,xrows=5 merge "zMrg load cust info" bill$=cust_info$ xcol=12,xrow=12,xcols=35,xrows=6 merge "zMrg load cust info" ship$=cust_info$ # find totals trow=22 if trow_fnd then : trow_fnd=0 goto skip_total_srch endif for row=22 to 57 if mid(text$[row],97,5)="Total" then : trow=row,trow_fnd=1 break endif next row skip_total_srch: if trow_fnd=0 then trow=MAXROWS } # shift right 1 cmove LEFTCOL,1,RIGHTCOL,MAXROWS,2,1 # header section cerase 1,1,MAXCOLS,18 merge "zMrg form header" # bill to cbox LEFTCOL,13,100,18,ccols=9::ISHADE 51 59::ISHADE text 2,14,"Bill\nTo",ICFONT,cols=7 text 2,16,{get(11,4,13,"UFTRIM")},DBCFONT,cols=7 text 10,14,{bill$},DBFONT,11 # ship to text 52,14,"Ship\nTo",ICFONT,cols=7 text 60,14,{ship$},DBFONT,11 # rt hdr cbox 102,4.5,RIGHTCOL,14.5,1,ccols=110::ISHADE,crows=5.5 6.5 7.5 8.5 9.5 10.5 11.5 12.5 13.5 text 103,5,"Order #",IFONT text 103,6,"Date",IFONT text 103,7,"PO #",IFONT text 103,8,"PO Date",IFONT text 103,9,"UPC Vndr",IFONT text 103,10,"Page #",IFONT text 103,11,"Ship Point",IFONT text 103,12,"Via",IFONT text 103,13,"Ship Date",IFONT text 103,14,"Terms",IFONT text 111,5,{docid$},DBFONT text 111,6,{docdate$},DBFONT text 111,7,{cust_po$},DBFONT,fit text 111,8,{get(94,5,8,"UFTRIM")},DBFONT text 111,9,{get(93,3,10,"UFTRIM")},DBFONT text 111,10,{get(127,5,6,"UFTRIM")},DBFONT text 111,11,{get(50,15,31,"UFTRIM")},DBFONT,fit,cols=22 text 111,12,{get(82,15,20,"UFTRIM")},DBFONT,fit,cols=22 text 111,13,{get(104,15,8,"UFTRIM")},DBFONT text 111,14,{get(117,15,25,"UFTRIM")},DBFONT,fit,cols=22 # instructions cbox 102,15.5,RIGHTCOL,17.5,1,crows=16.5::ISHADE text 103,16,"Instructions",ICFONT,cols=30 text 103,17,{get(50,13,40,"UFTRIM")},DBCFONT,fit,cols=30 # detail section cbox LEFTCOL,18.5,RIGHTCOL,{MAXROWS-.5},MBOXSIZE,crows=20.5::DSHADE,ccols=5 40 51 64 76 82 96 102 116 cerase 1,21,MAXCOLS,21 cfont 2,19,4,20,IRFONT cfont 6,19,29,20,IFONT cfont 31,19,39,20,IRFONT cfont 41,19,50,20,IRFONT cfont 53,19,63,20,IRFONT cfont 65,19,75,20,IRFONT cfont 77,19,81,20,ICFONT cfont 83,19,95,20,IRFONT cfont 97,19,101,20,ICFONT cfont 103,19,115,20,IRFONT cfont 117,19,MAXRCOLS,20,IRFONT cfont 2,21,4,57,DRFONT cfont 6,21,29,57,DFONT cfont 31,21,37,57,DRFONT cfont 39,21,50,57,DBRFONT cfont 52,21,63,57,DBRFONT cfont 65,21,75,57,DBRFONT cfont 77,21,81,57,DCFONT cfont 83,21,95,57,DBRFONT cfont 97,21,101,57,DCFONT cfont 103,21,115,57,DBRFONT,black cfont 117,21,MAXRCOLS,57,DBRFONT # memo/description lines font " @1,21,4,trow",5,0,90,1,DLFONT # shade item lines for easier reading shade "~ ..[0-9A-Za-z]@1,21,4,trow",0.5,0,MAXRCOLS,1,DSHADE # watermark - large font with light shading WATERMARK 1,{MAXROWS-1},{doc_title$},cgtimes,120,shade=WATERMARK_SHADE,center,cols=MAXCOLS,fit,spacing=.75 # group sub-totals box "=============",0,0,16,1 font "=============",-24,1,21,1,IBRFONT font "=============",0,1,16,1,DBRFONT,10 erase "=============",0,0,13,1 # footer font "Lines Total@5,22,17,57",0,0,11,1,IBFONT font "Qty Shipped Total@44,22,61,57",0,0,19,1,IBRFONT cfont 98,{trow},114,{MAXROWS-1},IBRFONT,black merge "zMrg bottom row" merge "SO Acknowledgement/Quote","MERGE_FILE" [IC Transfer_Packing List] #dsn_sample "/u0/unform_test/sxe/txt/inv_xfer2.txt" dsn_sample "/u0/unform_test/sxe/txt/inv_xfer1.txt" # applies to form format #1 detect 0,2,"^Transfer/Packing List" # set up document constants local MAXCOLS=134 # max cols to output local MAXRCOLS=133 # MAXCOLS-1 local LEFTCOL=1 # left vertical line local RIGHTCOL=134 # right vertical line local MAXROWS=57 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows local WAREHOUSE_COPY=1 local SCANNING_COPY=2 local FILE_COPY=3 local MAX_COPIES=3 copies MAX_COPIES landscape dpi 600 # see global constant above GSON # graphical shading title "Transfer/Packing List" # view in pdf properties prejob { dim copy_title$[MAX_COPIES] if MAX_COPIES>=1 then : copy_title$[WAREHOUSE_COPY]="Warehouse Copy" endif if MAX_COPIES>=3 then : copy_title$[FILE_COPY]="Office Copy" endif doc_title$="TRANSFER/PACKING LIST" } prepage { xrow1=22,xrow2=56 merge "zMrg check continued" if left(cont$,4)="Cont" then : x$=mset(1,53,MAXCOLS,2,"") endif xcol=68,xrow=7,xcols=70,xrows=5 merge "zMrg load comp info" xcol=12,xrow=7,xcols=35,xrows=5 merge "zMrg load cust info" bill$=cust_info$ xcol=12,xrow=12,xcols=35,xrows=5 merge "zMrg load cust info" ship$=cust_info$ text$[54]=sub(text$[54],":"," ") } # shift right 1 cmove LEFTCOL,1,RIGHTCOL,MAXROWS,2,1 # header section cerase 1,1,MAXCOLS,16 merge "zMrg form header" # bill to cbox LEFTCOL,12,100,16,ccols=9::ISHADE 52 59::ISHADE text 2,13,"Bill\nTo",ICFONT,cols=7 text 2,15,{get(11,4,20,"UFTRIM")},DBCFONT,cols=7 text 10,13,{bill$},DBFONT,11 # ship to text 53,13,"Ship\nTo",ICFONT,cols=7 text 60,13,{ship$},DBFONT,11 # rt hdr cbox 102,2.5,RIGHTCOL,12.5,1,ccols=112::ISHADE,crows=3.5 4.5 5.5 6.5 7.5 8.5 9.5 10.5 11.5 text 103,3,"Transfer #",IFONT text 103,4,"Order Date",IFONT text 103,5,"Request Date",IFONT text 103,6,"Shipped Date",IFONT text 103,7,"UPC Vendor",IFONT text 103,8,"Page #",IFONT text 103,9,"Ship Point",IFONT text 103,10,"Via",IFONT text 103,11,"Staging Area",IFONT text 103,12,"Terms",IFONT text 113,3,{get(105,3,24,"UFTRIM")},DBFONT text 113,4,{get(94,5,8,"UFTRIM")},DBFONT text 113,5,{get(100,15,8,"UFTRIM")},DBFONT,fit text 113,6,{get(110,15,8,"UFTRIM")},DBFONT text 113,7,{get(93,3,10,"UFTRIM")},DBFONT text 113,8,{get(127,5,6,"UFTRIM")},DBFONT text 113,9,{get(50,15,31,"UFTRIM")},DBFONT,fit,cols=21 text 113,10,{get(81,15,19,"UFTRIM")},DBFONT,fit,cols=21 text 113,11,{get(81,13,30,"UFTRIM")},DBFONT text 113,12,{get(120,15,18,"UFTRIM")},DBFONT,fit # instructions cbox 102,13.5,RIGHTCOL,15.5,1,crows=14.5::ISHADE text 103,14,"Instructions",ICFONT,cols=31 text 103,15,{get(50,13,30,"UFTRIM")},DBCFONT,cols=31 # detail section cerase 1,19,MAXCOLS,19 cbox LEFTCOL,16.5,RIGHTCOL,{MAXROWS-.5},MBOXSIZE,crows=18.5::DSHADE,ccols=8 33 39 55 68 81 92 98 110 cfont 2,17,7,19,ICFONT cfont 9,17,32,19,ILFONT cfont 34,17,38,19,ICFONT cfont 40,17,54,19,ICFONT cfont 56,17,67,19,IRFONT cfont 69,17,80,19,IRFONT cfont 82,17,91,19,IRFONT cfont 93,17,96,19,ICFONT cfont 98,17,109,19,ICFONT,black cfont 110,17,MAXRCOLS,19,ICFONT cfont 2,20,7,55,DCFONT cfont 9,20,32,55,DLFONT cfont 34,20,38,55,DCFONT cfont 40,20,54,55,DCFONT cfont 56,20,67,55,DBRFONT cfont 69,20,80,55,DBRFONT cfont 82,20,91,55,DBRFONT cfont 93,20,96,55,DCFONT cfont 98,20,109,55,DCFONT,black cfont 110,20,MAXRCOLS,55,DCFONT # memo/description lines font " @1,20,3,55",7,0,100,1,DFONT # shade item lines for easier reading shade "~ ..[0-9A-Za-z]@1,20,4,55",0.5,0,MAXRCOLS,1,DSHADE # watermark - large font with light shading WATERMARK 1,56,{doc_title$},cgtimes,120,shade=WATERMARK_SHADE,center,cols=MAXCOLS,fit,spacing=.75 # footer font "Lines Total@5,20,16,57",0,0,11,1,IBFONT font "Lines Not Printed@29,20,46,55",-8,0,31,1,IBFONT font "Qty Shipped Total@59,20,76,57",0,0,19,1,IBRFONT font "Total@91,20,96,55",0,0,5,1,IBRFONT font "Picked By@2,20,10,55",0,0,10,1,IBFONT font "Packed By@16,20,25,55",0,0,10,1,IBFONT font "Checked By@30,20,41,55",0,0,11,1,IBFONT font "Cube@47,20,52,55",0,0,6,1,IBRFONT font "Cube@47,20,52,55",0,1,10,1,DBFONT font "Weight@63,20,70,55",0,0,7,1,IBRFONT font "Weight@63,20,70,55",0,1,11,1,DBFONT font "Freight Charges@76,20,91,55",0,0,15,1,IBRFONT cerase LEFTCOL,56,RIGHTCOL,56 text 2,{MAXROWS+.5},"Received By Date Received",IBFONT,9 merge "zMrg bottom row" merge "IC Transfer_Packing List","MERGE_FILE" [SO Invoice/Credit Memo] dsn_sample "/u0/unform_test/sxe/txt/inv11401.txt" #dsn_sample "/u0/unform_test/houston/txt/inv" #dsn_sample "/u0/unform_test/houston/txt/view0674.txt" #dsn_sample "/u0/unform_test/sxe/txt/inv2.txt" #dsn_sample "/u0/unform_test/sxe/txt/inv1.txt" #dsn_sample "/u0/unform_test/sxe/txt/inv.txt" #dsn_sample "/u0/unform_test/sxe/txt/creditmemo.txt" # applies to form format #1 detect 12,2,"^Invoice" # set up document constants local MAXCOLS=134 # max cols to output local MAXRCOLS=133 # MAXCOLS-1 local LEFTCOL=1 # left vertical line local RIGHTCOL=134 # right vertical line local MAXROWS=58 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows local CUSTOMER_COPY=1 local SCANNING_COPY=2 local FILE_COPY=3 local MAX_COPIES=3 copies MAX_COPIES landscape dpi 600 # see global constant above GSON # graphical shading title "Invoice" # view in pdf properties prejob { dim copy_title$[MAX_COPIES] if MAX_COPIES>=1 then : copy_title$[CUSTOMER_COPY]="Customer Copy" endif if MAX_COPIES>=3 then : copy_title$[FILE_COPY]="Office Copy" endif } prepage { doc_title$="INVOICE" if pos("Correction"=text$[2]) then : doc_title$="CREDIT MEMO" endif docid$=get(121,3,12,"UFTRIM") docdate$=get(106,3,8,"UFTRIM") if docdate$="" then docdate$=get(105,15,8) xrow1=22,xrow2=58 merge "zMrg check continued" cash_disc$="" x=pos("Cash Discount"=text$[56]) if x then : cash_disc$=get(x,56,50,"UFTRIM") x$=set(x,56,50,"") endif xcol=68,xrow=7,xcols=70,xrows=5 merge "zMrg load comp info" xcol=12,xrow=12,xcols=35,xrows=5 merge "zMrg load cust info" bill$=cust_info$ xcol=12,xrow=7,xcols=35,xrows=5 merge "zMrg load cust info" ship$=cust_info$ duplicate$="" if get(53,2,25)="*** D U P L I C A T E ***" then : duplicate$="DUPLICATE" endif } # shift right 1 cmove LEFTCOL,1,RIGHTCOL,MAXROWS,2,1 # header section cerase 1,1,MAXCOLS,18 merge "zMrg form header" # bill to cbox LEFTCOL,13,100,18,ccols=9::ISHADE 51 59::ISHADE text 2,14,"Bill\nTo",ICFONT,cols=7 text 2,16,{get(11,4,20,"UFTRIM")},DBCFONT,cols=7 text 10,14,{mget(12,12,30,4,"UFTRIM","UFSAVELF")},DBFONT,11 # ship to text 52,14,"Ship\nTo",ICFONT,cols=7 text 60,14,{mget(12,7,30,4,"UFTRIM","UFSAVELF")},DBFONT,11 # rt hdr cbox 102,4.5,RIGHTCOL,14.5,1,ccols=110::ISHADE,crows=5.5 6.5 7.5 8.5 9.5 10.5 11.5 12.5 13.5 text 103,5,"Order #",IFONT text 103,6,"Date",IFONT text 103,7,"PO #",IFONT text 103,8,"PO Date",IFONT text 103,9,"UPC Vndr",IFONT text 103,10,"Page #",IFONT text 103,11,"Ship Point",IFONT text 103,12,"Via",IFONT text 103,13,"Ship Date",IFONT text 103,14,"Terms",IFONT text 111,5,{docid$},DBFONT text 111,6,{docdate$},DBFONT text 111,7,{get(104,5,22,"UFTRIM")},DBFONT,fit text 111,8,{get(94,5,8,"UFTRIM")},DBFONT text 111,9,{get(93,3,10,"UFTRIM")},DBFONT text 111,10,{get(127,5,6,"UFTRIM")},DBFONT text 111,11,{get(50,15,30,"UFTRIM")},DBFONT,fit,cols=21 text 111,12,{get(81,15,24,"UFTRIM")},DBFONT,fit,cols=21 text 111,13,{get(105,15,8,"UFTRIM")},DBFONT text 111,14,{get(117,15,25,"UFTRIM")},DBFONT,fit # instructions cbox 102,16,RIGHTCOL,18,1,crows=17::ISHADE text 103,16.5,"Instructions",ICFONT,cols=30 text 103,17.5,{get(50,13,40,"UFTRIM")},DBCFONT,fit,cols=30 # detail section cbox LEFTCOL,18.5,RIGHTCOL,{MAXROWS-.5},MBOXSIZE,crows=20.5::DSHADE,ccols=5 38 51 64 76 82 96 102 116 cerase 1,21,MAXCOLS,21 cfont 2,19,4,20,IRFONT cfont 6,19,29,20,IFONT cfont 31,19,37,20,IRFONT cfont 39,19,50,20,IRFONT cfont 53,19,63,20,IRFONT cfont 65,19,75,20,IRFONT cfont 77,19,81,20,ICFONT cfont 83,19,95,20,IRFONT cfont 97,19,101,20,ICFONT cfont 103,19,115,20,IRFONT cfont 117,19,MAXRCOLS,20,IRFONT cfont 2,21,4,55,DRFONT cfont 6,21,29,55,DFONT cfont 31,21,37,55,DRFONT cfont 39,21,50,55,DBRFONT cfont 52,21,63,55,DBRFONT cfont 65,21,75,55,DBRFONT cfont 77,21,81,55,DCFONT cfont 83,21,95,55,DBRFONT cfont 97,21,101,55,DCFONT cfont 103,21,115,55,DBRFONT cfont 117,21,MAXRCOLS,55,DBRFONT # memo lines font " @1,21,4,55",5,0,100,1,DLFONT # shade item lines for easier reading shade "~ ..[0-9A-Za-z]@1,21,4,55",0.5,0,MAXRCOLS,1,DSHADE erase "CREDIT - DO NOT PAY@98,21,116,55",0,1,19,1 font "CREDIT - DO NOT PAY@98,21,116,55",0,0,32,1,DBRFONT # watermark - large font with light shading WATERMARK 1,{MAXROWS-1},{doc_title$},cgtimes,120, shade=WATERMARK_SHADE,center,cols=MAXCOLS, fit,spacing=1 # footer font "Lines Total@5,22,17,56",0,0,11,1,IBFONT font "Qty Shipped Total@44,22,61,56",0,0,19,1,IBRFONT font " Total @95,22,111,56",0,0,20,1,IBRFONT font "Invoice Total@97,22,111,56",0,0,18,1,IBRFONT merge "zMrg bottom row" merge "SO Invoice/Credit Memo","MERGE_FILE" [SO Pick ticket] dsn_sample "/u0/unform_test/sxe/txt/pck11401.txt" #dsn_sample "/u0/unform_test/sxe/txt/pick2.txt" #dsn_sample "/u0/unform_test/sxe/txt/pick1.txt" #dsn_sample "/u0/unform_test/sxe/txt/pick.txt" #1 # applies to form format #1 detect 0,2,"^Pick Ticket" # set up document constants local MAXCOLS=134 # max cols to output local MAXRCOLS=133 # MAXCOLS-1 local LEFTCOL=1 # left vertical line local RIGHTCOL=134 # right vertical line local MAXROWS=58 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows local CUSTOMER_COPY=1 local SCANNING_COPY=2 local FILE_COPY=3 local MAX_COPIES=3 copies MAX_COPIES landscape dpi 600 # see global constant above GSON # graphical shading title "Pick Ticket" # view in pdf properties prejob { dim copy_title$[MAX_COPIES] if MAX_COPIES>=1 then : copy_title$[CUSTOMER_COPY]="Office Copy" endif if MAX_COPIES>=3 then : copy_title$[FILE_COPY]="Customer Copy" endif doc_title$="PICK TICKET" } prepage { docdate$=get(100,15,8,"UFTRIM") if docdate$="" then docdate$=get(110,15,8) xrow=2 merge "zMrg check reprint" xrow1=20,xrow2=58 merge "zMrg check continued" if left(cont$,4)="Cont" then : x$=mset(1,53,MAXCOLS,2,"") x$=set(102,55,13,"") end_row=57 else end_row=52 endif rcvd_by$="" x=pos("Received By"=text$[56]) if x then : rcvd_by$=get(x,56,50,"UFTRIM") x$=set(x,56,50,"") endif if rcvd_by$<>"" then : rcvd_by$=rcvd_by$(1,13)+dim(30)+rcvd_by$(14) endif if left(cont$,4)="Cont" then rcvd_by$="" xcol=68,xrow=7,xcols=70,xrows=5,pick=1 merge "zMrg load comp info" xcol=12,xrow=7,xcols=35,xrows=5 merge "zMrg load cust info" bill$=cust_info$ xcol=12,xrow=12,xcols=35,xrows=5 merge "zMrg load cust info" ship$=cust_info$ } # shift right 1 cmove LEFTCOL,1,RIGHTCOL,MAXROWS,2,2 # header section cerase 1,1,MAXCOLS,16 merge "zMrg form header" text 1,2.5,{reprint$},HRFONT,cols=MAXRCOLS # bill to cbox LEFTCOL,12,100,17,ccols=9::ISHADE 51 59::ISHADE text 2,13,"Bill\nTo",ICFONT,cols=7 text 2,15,{get(11,4,13,"UFTRIM")},DBCFONT,cols=7 text 10,13,{mget(12,7,30,4,"UFTRIM","UFSAVELF")},DBFONT,11 # ship to text 52,13,"Ship\nTo",ICFONT,cols=7 text 60,13,{mget(12,12,30,4,"UFTRIM","UFSAVELF")},DBFONT,11 # rt hdr cbox 102,4.5,RIGHTCOL,14.5,1,ccols=110::ISHADE,crows=5.5 6.5 7.5 8.5 9.5 10.5 11.5 12.5 13.5 text 103,5,"Order #",IFONT text 103,6,"Req. Date",IFONT text 103,7,"PO #",IFONT text 103,8,"PO Date",IFONT text 103,9,"UPC Vndr",IFONT text 103,10,"Page #",IFONT text 103,11,"Ship Point",IFONT text 103,12,"Via",IFONT text 103,13,"Ship Date",IFONT text 103,14,"Terms",IFONT text 111,5,{get(108,3,12,"UFTRIM")},DBFONT text 111,6,{docdate$},DBFONT text 111,7,{get(104,5,22,"UFTRIM")},DBFONT,fit text 111,8,{get(94,5,8,"UFTRIM")},DBFONT text 111,9,{get(93,3,10,"UFTRIM")},DBFONT text 111,10,{get(127,5,6,"UFTRIM")},DBFONT text 111,11,{get(50,15,30,"UFTRIM")},DBFONT,fit,cols=22 text 111,12,{get(81,15,19,"UFTRIM")},DBFONT,fit,cols=22 text 111,13,{get(110,15,8,"UFTRIM")},DBFONT text 111,14,{get(120,15,25,"UFTRIM")},DBFONT,fit,cols=22 # instructions cbox 102,15,RIGHTCOL,17,1,ccols=110::ISHADE,crows=16 text 103,15.5,"Instructions",IFONT text 111,15.5,{get(50,13,30,"UFTRIM")},DBFONT,fit,cols=22.5 text 103,16.5,"Staging",IFONT text 111,16.5,{get(81,13,13,"UFTRIM")},DBFONT,fit,cols=22 # detail section cbox LEFTCOL,17.5,RIGHTCOL,{end_row},MBOXSIZE,crows=19.5::DSHADE,ccols=8 39 52 64 77 90 97 110 116 cerase 1,20,MAXCOLS,20 cfont 2,18,7,19,IRFONT cfont 9,18,33,19,ILFONT,black cfont 34,18,38,19,IRFONT cfont 39,18,52,19,ICFONT cfont 53,18,63,19,IRFONT cfont 65,18,76,19,IRFONT cfont 78,18,89,19,IRFONT cfont 91,18,96,19,ICFONT cfont 98,18,109,19,ICFONT cfont 110,18,116,19,ICFONT,black cfont 118,18,MAXRCOLS,19,IRFONT cfont 2,21,7,52,DRFONT cfont 9,21,33,52,DFONT cfont 34,21,38,52,DRFONT cfont 39,21,52,52,DCFONT cfont 53,21,63,52,DBRFONT cfont 65,21,76,52,DBRFONT cfont 78,21,89,52,DBRFONT cfont 91,21,96,52,DCFONT cfont 98,21,109,52,DCFONT cfont 110,21,116,52,DCFONT,black cfont 118,21,MAXRCOLS,52,DBRFONT # shade item lines for easier reading shade "~ ..[0-9A_Za-z]@1,21,4,52",0.5,0,MAXRCOLS,1,DSHADE # notes font " @1,21,7,52",8,0,100,1,IFONT # watermark - large font with light shading WATERMARK 1,{end_row-1},{doc_title$},cgtimes,120, shade=WATERMARK_SHADE,center,cols=MAXCOLS, fit,spacing=1 # footer cfont 2,54,4,54,DBRFONT cfont 6,54,16,54,IBFONT cfont 22,54,46,54,IBRFONT cfont 48,54,50,54,DBFONT cfont 60,54,76,54,IBRFONT cfont 78,54,89,54,DBFONT cfont 92,54,MAXRCOLS,54,IBRFONT cfont 2,55,11,55,IBFONT cfont 16,55,25,55,IBFONT cfont 31,55,41,55,IBFONT cfont 48,55,57,55,IBRFONT cfont 64,55,74,55,IBRFONT cfont 77,55,92,55,IBRFONT cfont 2,56,11,56,DBFONT cfont 16,56,25,56,DBFONT cfont 31,56,41,56,DBFONT cfont 48,56,57,56,DBRFONT cfont 64,56,74,56,DBRFONT cfont 77,56,92,56,DBRFONT merge "zMrg bottom row" merge "SO Pick ticket","MERGE_FILE" [AR Statement] dsn_sample "/u0/unform_test/sxe/txt/stmt1.txt" #dsn_sample "/u0/unform_test/sxe/txt/stmt.txt" # applies to form format #1 detect 66,6,"^Statement" # set up document constants local MAXCOLS=81 # max cols to output local MAXRCOLS=80 # MAXCOLS-1 local LEFTCOL=1 # left vertical line local RIGHTCOL=82 # right vertical line local MAXROWS=60 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows local CUSTOMER_COPY=1 local REMIT_COPY=2 local SCANNING_COPY=3 local FILE_COPY=4 local MAX_COPIES=4 copies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "Statement" # view in pdf properties prejob { dim copy_title$[MAX_COPIES] if MAX_COPIES>=1 then : copy_title$[CUSTOMER_COPY]="Customer Copy" endif if MAX_COPIES>=2 then : copy_title$[REMIT_COPY]="Remittance Copy" endif if MAX_COPIES>=4 then : copy_title$[FILE_COPY]="Office Copy" endif doc_title$="STATEMENT" } prepage { xcol=11,xrow=5,xcols=54,xrows=7 merge "zMrg load comp info" xcol=11,xrow=15,xcols=35,xrows=6 merge "zMrg load cust info" bill$=cust_info$ xrow1=27,xrow2=58 merge "zMrg check continued" x$=set(1,cont_row,MAXCOLS,"") if left(cont$,4)="Cont" then : exec("cerase 1,51,81,58") detrow=60 else exec("cbox LEFTCOL,51,RIGHTCOL,57,MBOXSIZE,crows=52.5::DSHADE 54 55.5::DSHADE,ccols=17 32 47 62") detrow=50 endif } # shift right 1 cmove LEFTCOL,1,RIGHTCOL,MAXROWS,2,1 # erase columns ! vline "!!",erase # erase rows - or = hline "==",erase hline "--",erase hline "^^" # default line enhancement local BROW=26 local EROW=49 cfont 2,BROW,10,EROW,DBCFONT cfont 11,BROW,20,EROW,DBCFONT,black cfont 21,BROW,24,EROW,DBCFONT cfont 25,BROW,32,EROW,DBCFONT,black cfont 33,BROW,43,EROW,DBCFONT cfont 44,BROW,68,EROW,DBRFONT,black cfont 69,BROW,MAXRCOLS,EROW,DBRFONT # header section cerase 1,1,MAXCOLS,20 merge "zMrg form header" text 1,3,{reprint$},HRFONT,cols=MAXRCOLS # bill to cbox LEFTCOL,13,40,18,ccols=9::ISHADE 40 text 2,14,"Customer",ICFONT,cols=7 text 2,15,{get(71,5,10,"UFTRIM")},DBCFONT,cols=7 text 10,14,{bill$},DBFONT,11 text 65.5,14.5,"Amount Paid",HBFONT text 63.4,16.5,"$ ________________",HBFONT # handle copy title cbox 60,4.25,RIGHTCOL,5.75,1,100 text 61,5.1,{copy_title$[copy]},HBCFONT,12,cols=19,shade 0 # right header cbox 60,6,RIGHTCOL,9,1,ccols=70::DSHADE,crows=7 8 text 61,6.5,"Customer No.",IFONT,cols=9 text 61,7.5,"Date",IFONT,cols=9 text 61,8.5,"Total Due",IFONT,cols=9 text 71,6.5,{get(76,5,4,"UFTRIM")},DBFONT,cols=9 text 71,7.5,{get(69,7,8,"UFTRIM")},DBFONT,cols=9 text 71,8.5,{get(70,9,10,"UFTRIM")},DBFONT,cols=9 # ribbon section cerase 1,21,15,23 cerase 19,21,30,23 cbox LEFTCOL,20.5,30,22.5,MBOXSIZE,crows=21.5::DSHADE, ccols=16 text 1,21,"Statement Date",ICFONT,cols=15 text 19,21,"Customer No.",ICFONT,cols=10 text 1,22,{cut(4,23,8,"")},DBCFONT,cols=15 text 19,22,{cut(24,23,4,"")},DBCFONT,cols=10 # detail cbox LEFTCOL,23,RIGHTCOL,{detrow},MBOXSIZE,crows=25::DSHADE,ccols=11 20 25 32 44 59 69 # detail headings cerase 1,25,RIGHTCOL,25 text 2,24,"Invoice Date",ICFONT,cols=9 text 11,24,"Due Date",ICFONT,cols=10 text 21,24,"Type",ICFONT,cols=4 text 25,24,"Status",ICFONT,cols=8 text 33,24,"Invoice No.",ICFONT,cols=11 text 44,24,"" text 59,24,"Charge",IRFONT,cols=10 text 69,24,"Credit",IRFONT,cols=12 font "UNAPPLIED CASH@30,24,50,50",0,0,14,1,DBRFONT,black #detail erase "Balance Due:",0,0,RIGHTCOL,0 # watermark - large font with light shading WATERMARK 1,{detrow-.5},{doc_title$},cgtimes,120, shade=WATERMARK_SHADE,center,cols=MAXCOLS, fit,spacing=1 #Totals data cfont 2,53,16,53,DBRFONT cfont 18,53,31,53,DBRFONT cfont 33,53,46,53,DBRFONT cfont 48,53,61,53,DBRFONT cfont 63,53,80,53,DBRFONT cfont 2,56,16,56,DBRFONT cfont 18,56,31,56,DBRFONT cfont 33,56,46,56,DBRFONT cfont 48,56,61,56,DBRFONT cfont 63,56,80,56,DBRFONT # Totals labels cfont 2,52,16,52,IRFONT cfont 18,52,31,52,IRFONT cfont 33,52,46,52,IRFONT cfont 48,52,61,52,IRFONT cfont 63,52,80,52,IRFONT cfont 2,55,16,55,IRFONT cfont 18,55,31,55,IRFONT cfont 33,55,46,55,IRFONT cfont 48,55,61,55,IRFONT cfont 63,55,80,55,IRFONT #Continued text 1,{MAXROWS+.5},{cont$},DBRFONT,10,cols=MAXRCOLS merge "AR Statement","MERGE_FILE" [PO Purchase order/Returns] #dsn_sample "/u0/unform_test/sxe/txt/po_rtns.txt" #dsn_sample "/u0/unform_test/sxe/txt/po_rtns1.txt" #dsn_sample "/u0/unform_test/sxe/txt/po2.txt" dsn_sample "/u0/unform_test/houston/txt/po181fax.txt" # applies to form format #1 detect 0,1,"^~(Purchase Order)|(RETURN MERCHANDISE)" # set up document constants local MAXCOLS=134 # max cols to output local MAXRCOLS=133 # MAXCOLS-1 local LEFTCOL=1 # left vertical line local RIGHTCOL=134 # right vertical line local MAXROWS=62 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows local VENDOR_COPY=1 local SCANNING_COPY=2 local FILE_COPY=3 local MAX_COPIES=3 copies MAX_COPIES landscape dpi 600 # see global constant above GSON # graphical shading title "Purchase Order" # view in pdf properties prejob { dim copy_title$[MAX_COPIES] if MAX_COPIES>=1 then : copy_title$[VENDOR_COPY]="Vendor Copy" endif if MAX_COPIES>=3 then : copy_title$[FILE_COPY]="Office Copy" endif } prepage { doc_title$=upper(get(11,1,30,"UFTRIM")) docid$=get(115,2,12,"UFTRIM") docdate$=get(105,2,8,"UFTRIM") xrow1=18,xrow2=60 merge "zMrg check continued" xcol=52,xrow=5,xcols=30,xrows=4,pick=1 merge "zMrg load comp info" xcol=11,xrow=5,xcols=30,xrows=4 merge "zMrg load cust info" vend$=cust_info$ xcol=96,xrow=5,xcols=30,xrows=4 merge "zMrg load cust info" bill$=cust_info$ xcol=11,xrow=10,xcols=30,xrows=4 merge "zMrg load cust info" ship$=cust_info$ # get "signature" and clear if not last page sign$=mget(80,cont_row,40,3,"UFSAVELF","UFTRIM") if left(cont$,4)="Cont" then : detrow=62 sign$="" else detrow=60 endif } # shift right 1 cmove LEFTCOL,1,RIGHTCOL,MAXROWS,2,7 # header section cerase 1,1,MAXCOLS,20 merge "zMrg form header" # vendor/seller cbox LEFTCOL,9,45,14,MBOXSIZE,ccols=9::ISHADE text 2,10,"Vendor",ICFONT,10,cols=7 text 2,11,{get(11,3,12,"UFTRIM")},DBCFONT,cols=7 text 10,10,{mget(11,5,30,4,"UFTRIM","UFSAVELF")},DBFONT,10 # ship to cbox LEFTCOL,14,45,19,MBOXSIZE,ccols=9::ISHADE text 2,15,"Ship\nTo",ICFONT,10,cols=7 text 10,15,{mget(11,10,30,4,"UFTRIM","UFSAVELF")},DBFONT,10 # sold to cbox 45,9,92,14,MBOXSIZE,ccols=53::ISHADE text 46,10,"Sold\nTo",ICFONT,10,cols=7 text 54,10,{mget(52,5,30,4,"UFTRIM","UFSAVELF")},DBFONT,10 # invoice to cbox 45,14,92,19,MBOXSIZE,ccols=53::ISHADE text 46,15,"Invoice\nto",ICFONT,10,cols=7 text 54,15,{mget(96,5,30,4,"UFTRIM","UFSAVELF")},DBFONT,10 # rt hdr cbox 102,3.5,RIGHTCOL,14.5,1,ccols=113::ISHADE,crows=4.5 5.5 6.5 7.5 8.5 9.5 10.5 11.5 12.5 13.5 text 103,4,"PO #",IFONT text 103,5,"Date",IFONT text 103,6,"Page",IFONT text 103,7,"UPC Vendor",IFONT text 103,8,"Via",IFONT text 103,9,"Due Date",IFONT text 103,10,"Freight",IFONT text 103,11,"Terms",IFONT text 103,12,"Schedule",IFONT text 103,13,"Resale #",IFONT text 103,14,"Reference",IFONT text 114,4,{docid$},DBFONT text 114,5,{docdate$},DBFONT text 114,6,{get(128,2,12,"UFTRIM")},DBFONT text 114,7,{get(93,2,11,"UFTRIM")},DBFONT text 114,8,{get(47,13,16,"UFTRIM")},DBFONT text 114,9,{get(65,13,8,"UFTRIM")},DBFONT text 114,10,{get(78,13,20,"UFTRIM")},DBFONT text 114,11,{get(100,13,16,"UFTRIM")},DBFONT,fit,cols=21 text 114,12,{get(118,13,20,"UFTRIM")},DBFONT,fit,cols=21 text 114,13,{get(79,11,22,"UFTRIM")},DBFONT,fit text 114,14,{get(103,11,25,"UFTRIM")},DBFONT,fit # instructions cbox 102,15.5,RIGHTCOL,17.5,1,crows=16.5::ISHADE text 103,16,"Instructions",ICFONT,cols=31 text 103,17,{get(47,11,31,"UFTRIM")},DBCFONT,cols=31,fit # detail section cbox LEFTCOL,20,RIGHTCOL,{detrow},MBOXSIZE,crows=23::DSHADE,ccols=5 61 72 81 93 102 116 cerase 1,23,MAXCOLS,23 cfont 1,21,5,22,ICFONT,black cfont 6,21,54,22,ILFONT cfont 56,21,60,22,IRFONT cfont 62,21,71,22,IRFONT cfont 73,21,80,22,ICFONT cfont 82,21,92,22,IRFONT cfont 94,21,101,22,ICFONT cfont 103,21,115,22,IRFONT cfont 116,21,MAXRCOLS,22,ICFONT cfont 2,23,4,57,DCFONT cfont 6,23,54,59,DFONT cfont 56,23,60,59,DRFONT cfont 62,23,71,59,DBRFONT cfont 73,23,80,59,DBCFONT cfont 82,23,92,59,DBRFONT cfont 94,23,101,59,DCFONT cfont 103,23,115,59,DBRFONT cfont 116,23,MAXRCOLS,59,DBCFONT # shade item lines for easier reading shade "~ ..[0-9A-Za-z]@1,23,4,59",0.5,0,MAXRCOLS,1,DSHADE # notes font " @1,23,4,59",5,0,100,1,IFONT # watermark - large font with light shading WATERMARK 1,{detrow-1},{doc_title$},cgtimes,120,shade=WATERMARK_SHADE,center,cols=MAXCOLS,fit,spacing=.75 # footer font "Lines Total@5,24,17,57",0,0,11,1,IBFONT font "Qty Shipped Total@42,24,61,57",0,0,18,1,IBRFONT font "Total Cube@42,24,61,57",0,0,18,1,IBRFONT font "Total Cube@42,24,61,57",18,0,11,1,DBRFONT font "Purchase Total@76,24,90,57",0,0,24,1,IBRFONT font "Bin Loc:@56,24,63,57",0,0,8,1,IBRFONT font "Bin Loc:@56,24,63,57",8,0,14,1,DBRFONT cerase LEFTCOL,{cont_row+6},MAXCOLS,{MAXROWS+6} text 2,61,{sign$},DBFONT merge "zMrg bottom row" merge "PO Purchase order/Returns","MERGE_FILE" [AP Check short stub] #dsn_sample "/u0/unform_test/houston/txt/ChkWthOvrflw.txt" dsn_sample "/u0/unform_test/houston/txt/Check.txt" detect 0,1,"Vendor:" detect 0,1,"Check #:" # Check # # set up document constants const MAXCOLS=82 # max cols to output const MAXRCOLS=81 # MAXCOLS-1 const LEFTCOL=1 # left vertical line const RIGHTCOL=82 # right vertical line const MAXROWS=66 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows page 42 # max input rows pcopies 1 portrait dpi 600 # see global constant above GSON # graphical shading title "A/P Check" # view in pdf properties prepage { chkno$=trim(get(72,1,9)) chk_amt_words$=trim(get(1,30,80)) chk_amt$=trim(get(59,28,20)) chk_date$=trim(get(27,28,8)) vend$=mget(11,33,40,4,"Y","Y") # the following moves will leave a space between # the top two stubs # move check to bottom for i=23 to 44 text$[i+22]=text$[i] text$[i]="" # clear line next i # copy stub from top to middle for i=1 to 22 text$[i+22]=text$[i] next i # remittance advice enclosed advice$=get(15,3,30,"UFTRIM") if left(advice$,5)<>"Remit" then : advice$="" else x$=set(15,3,30,"") x$=set(15,25,30,"") endif } # make room on left and top cmove 1,1,MAXCOLS,MAXROWS,2,2 ########## top stub # top section cbox LEFTCOL,1,RIGHTCOL,3,1,ccols=13::ISHADE 27 43::ISHADE 64 73::ISHADE const BROW=2 const EROW=2 cfont 2,BROW,12,EROW,IRFONT cfont 14,BROW,26,EROW,DBLFONT cfont 28,BROW,42,EROW,IRFONT cfont 44,BROW,63,EROW,DBLFONT cfont 65,BROW,72,EROW,IRFONT cfont 74,BROW,MAXRCOLS,EROW,DBLFONT cbox LEFTCOL,3,RIGHTCOL,18,1,crows=5::ISHADE,ccols=10 13 29 40 52 67 cerase 1,5,MAXCOLS,5 const BROW=4 const EROW=4 cfont 2,BROW,9,EROW,ICFONT cfont 11,BROW,12,EROW,ICFONT cfont 14,BROW,28,EROW,ILFONT cfont 30,BROW,39,EROW,ILFONT cfont 41,BROW,51,EROW,IRFONT cfont 53,BROW,66,EROW,IRFONT cfont 68,BROW,MAXRCOLS,EROW,IRFONT const BROW=6 const EROW=17 cfont 2,BROW,9,EROW,DBCFONT cfont 11,BROW,12,EROW,DCFONT cfont 14,BROW,28,EROW,DBLFONT cfont 30,BROW,39,EROW,DLFONT cfont 41,BROW,51,EROW,DBRFONT cfont 53,BROW,66,EROW,DBRFONT cfont 68,BROW,MAXRCOLS,EROW,DBRFONT # remittance advice text 14,6,{advice$},IFONT cbox 29,18,RIGHTCOL,20,1,ccols=40::ISHADE 52 67 cerase 1,18,RIGHTCOL,18 text 2,19,"Payor Stub",DBFONT const BROW=19 const EROW=19 cfont 1,BROW,39,EROW,DRFONT cfont 41,BROW,51,EROW,DBRFONT cfont 53,BROW,66,EROW,DBRFONT cfont 68,BROW,MAXRCOLS,EROW,DBRFONT ########### middle stub # top section cbox LEFTCOL,23,RIGHTCOL,25,1,ccols=13::ISHADE 27 43::ISHADE 64 73::ISHADE const BROW=24 const EROW=24 cfont 2,BROW,12,EROW,IRFONT cfont 14,BROW,26,EROW,DBLFONT cfont 28,BROW,42,EROW,IRFONT cfont 44,BROW,63,EROW,DBLFONT cfont 65,BROW,72,EROW,IRFONT cfont 74,BROW,MAXRCOLS,EROW,DBLFONT cbox LEFTCOL,25,RIGHTCOL,40,1,crows=27::ISHADE,ccols=10 13 29 40 52 67 cerase 1,27,MAXCOLS,27 const BROW=26 const EROW=26 cfont 2,BROW,9,EROW,ICFONT cfont 11,BROW,12,EROW,ICFONT cfont 14,BROW,28,EROW,ILFONT cfont 30,BROW,39,EROW,ILFONT cfont 41,BROW,51,EROW,IRFONT cfont 53,BROW,66,EROW,IRFONT cfont 68,BROW,MAXRCOLS,EROW,IRFONT const BROW=28 const EROW=39 cfont 2,BROW,9,EROW,DBCFONT cfont 11,BROW,12,EROW,DCFONT cfont 14,BROW,28,EROW,DBLFONT cfont 30,BROW,39,EROW,DLFONT cfont 41,BROW,51,EROW,DBRFONT cfont 53,BROW,66,EROW,DBRFONT cfont 68,BROW,MAXRCOLS,EROW,DBRFONT # remittance advice text 14,28,{advice$},IFONT cbox 29,40,RIGHTCOL,42,1,ccols=40::ISHADE 52 67 cerase 1,40,RIGHTCOL,40 text 2,41,"Payee Stub",DBFONT const BROW=41 const EROW=41 cfont 1,BROW,39,EROW,DRFONT cfont 41,BROW,51,EROW,DBRFONT cfont 53,BROW,66,EROW,DBRFONT cfont 68,BROW,MAXRCOLS,EROW,DBRFONT ########### check cerase 1,47,MAXCOLS,MAXROWS cbox LEFTCOL,47,RIGHTCOL,64.5,MBOXSIZE LOGO_IMAGE 1,47,10,5,"COMP_LOGO" text 15,48.25,"COMP_NAME",HBFONT,14 text 15,49.35,"COMP_ADDR1",HFONT,12 text 15,50.35,"COMP_ADDR2",HFONT,12 text 15,51.35,"COMP_ADDR3",HFONT,12 text 49,48.25,"AP_BANK_NAME",DBFONT text 49,49.05,"AP_BANK_ADDR1",DFONT text 49,49.85,"AP_BANK_ADDR2",DFONT text 70,49.35,"AP_ROUTING",DBFONT # rtg # cbox 48,50.5,81,52.5,1,crows=51.5::100,ccols=57 69 cerase 1,51,MAXCOLS,51 text 49,51,"Check #",ICFONT,shade 0,cols=8 text 49,52,{chkno$},DBCFONT,cols=7 text 58,51,"Date",ICFONT,shade 0,cols=11 text 58,52,{chk_date$},DBCFONT,cols=11 text 70,51,"Amount",IRFONT,shade 0,cols=11 text 70,52,{chk_amt$},DBRFONT,cols=11 text 2,56,"Pay",IFONT,14 text 6.5,56,{chk_amt_words$},IBFONT,10,fit,cols=70 text 2,60,"Pay",IFONT text 2,61,"to the",IFONT text 2,62,"Order",IFONT text 2,63,"of",IFONT text 6.5,60,{vend$},DBFONT text 50,59.50,"Check Void After 180 Days",ICFONT,cols=30 SIGNATURE_IMAGE 50,61,0,0,"SIGNATURE" box 50,62.0,30,1,3 text 50,62.75,"Authorized Signature",ICFONT,cols=30 AP_MICR 15,65.50,"AP_MICR_ACCOUNTNO",{chkno$} merge "AP Check short stub","MERGE_FILE" [AP Check long stub] dsn_sample "/u0/unform_test/sxe/txt/apchk.txt" # applies to form format #1 detect 20,1,"APCHK" # set up document constants local MAXCOLS=82 # max cols to output local MAXRCOLS=81 # MAXCOLS-1 local LEFTCOL=1 # left vertical line local RIGHTCOL=82 # right vertical line local MAXROWS=66 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows page MAXROWS # max input rows pcopies 1 portrait dpi 600 # see global constant above GSON # graphical shading title "A/P Check" # view in pdf properties prepage { # get detail totals gtot$="",dtot$="",ntot$="" for row=4 to 26 if pos("Totals"=text$[row]) then : gtot$=mid(text$[row],39,12) dtot$=mid(text$[row],53,13) ntot$=mid(text$[row],67,14) text$[row]="" break endif next row checkdate$=get(27,51,8,"UFTRIM") chkno$=get(75,2,6,"UFTRIM") chkno$=str(cnum(chkno$):"000000") } # shift for better placement cmove 1,1,MAXCOLS,MAXROWS,2,5 cmove 1,45,MAXCOLS,MAXROWS,1,44 hline "---",erase # Stub # top section cerase 2,1,RIGHTCOL,8 cbox 45,1.5,RIGHTCOL,5.5,1,crows=2.5::ISHADE 3.5 4.5::ISHADE,ccols=58 cbox 71,3.5,71,5.5 LOGO_IMAGE 1,1,10,5,"COMP_LOGO" text 13,2,"COMP_NAME",HBFONT,14 text 13,2.9,"COMP_ADDR1",HFONT,12 text 13,3.9,"COMP_ADDR2",HFONT,12 text 13,4.9,"COMP_ADDR3",HFONT,12 text 46,2,"Vendor #",ICFONT,cols=12 text 59,2,"Vendor Name",ICFONT,cols=23 text 46,3,{get(13,2,12,"UFTRIM")},DBCFONT,cols=12 text 59,3,{get(11,56,40,"UFTRIM")},DBCFONT,cols=23 text 46,4,"Check Date",ICFONT,cols=12 text 59,4,"Check #",ICFONT,cols=12 text 72,4,"Our Customer #",ICFONT,cols=10 text 46,5,{checkdate$},DBCFONT,cols=12 text 59,5,{chkno$},DBCFONT,cols=12 text 72,5,{get(42,2,18,"UFTRIM")},DBCFONT,cols=10 # detail cbox LEFTCOL,7.5,RIGHTCOL,43.5,1,crows=9::DSHADE,ccols=10 13 29 39 53 67 text 2,8.25,"Date",ICFONT,cols=8 text 11,8.25,"Tp",ICFONT,cols=2 text 14,8.25,"Invoice No.",IFONT,cols=15 text 30,8.25,"Reference",IFONT,cols=9 text 40,8.25,"Gross",IRFONT,cols=13 text 54,8.25,"Discount",IRFONT,cols=13 text 68,8.25,"Net",IRFONT,cols=14 cfont 2,9,9,43,DBCFONT # inv dt cfont 11,9,12,43,DBCFONT,black # inv ty cfont 14,9,29,43,DBFONT # inv num cfont 30,9,39,43,DBFONT,black # ref cfont 40,9,52,43,DBRFONT # gross cfont 54,9,66,43,DBRFONT,black # disc cfont 68,9,MAXRCOLS,43,DBRFONT # net # footer cbox 29,43.5,RIGHTCOL,44.5,1,ccols=39::100 53 67 text 30,44,"Totals",IBFONT,shade 0 text 40,44,{gtot$},DBRFONT,cols=13 # inv amt text 54,44,{dtot$},DBRFONT,cols=13 # discount text 68,44,{ntot$},DBRFONT,cols=14 # paid amt # Check cbox LEFTCOL,47,RIGHTCOL,64.5,MBOXSIZE LOGO_IMAGE 1,47,10,5,"COMP_LOGO" text 13,48.25,"COMP_NAME",HBFONT,14 text 13,49.35,"COMP_ADDR1",HFONT,12 text 13,50.35,"COMP_ADDR2",HFONT,12 text 13,51.35,"COMP_ADDR3",HFONT,12 text 49,48.25,"AP_BANK_NAME",DBFONT text 49,49.05,"AP_BANK_ADDR1",DFONT text 49,49.85,"AP_BANK_ADDR2",DFONT text 1,49.85,"AP_ROUTING",DBRFONT,cols=MAXRCOLS text 1,48,{chkno$},HBRFONT,14,cols=MAXRCOLS cbox 57,50.5,MAXRCOLS,52.5,1,crows=51.5::100,ccols=69 text 58,51,"Date",ICFONT,shade 0,cols=11 text 58,52,{checkdate$},DBCFONT,cols=11 text 70,51,"Amount",IRFONT,shade 0,cols=11 text 70,52,{get(59,51,15,"UFTRIM")},DBRFONT,cols=11 cerase 1,54,MAXCOLS,54 text 2,56,"Pay",IFONT,14 text 6.5,56,{get(1,53,MAXCOLS,"UFTRIM")+get(1,54,MAXCOLS,"")},IBFONT,10,cols=75 cerase 1,56,MAXCOLS,57 text 2,59,"Pay",IFONT text 2,60,"to the",IFONT text 2,61,"Order",IFONT text 2,62,"of",IFONT text 6.5,59,{mget(11,56,MAXCOLS,4,"UFSAVELF","UFTRIM")},DBFONT cerase 1,59,MAXCOLS,62 text 50,59.50,"Check Void After 180 Days",ICFONT,cols=30 SIGNATURE_IMAGE 50,61,0,0,"SIGNATURE" box 50,62.0,30,1,3 text 50,62.75,"Authorized Signature",ICFONT,cols=30 AP_MICR 18,65.50,"AP_MICR_ACCOUNTNO",{chkno$} merge "AP Check long stub","MERGE_FILE" [zMrg bottom row] text 1,{MAXROWS+.5},{cash_disc$},DBLFONT text 1,{MAXROWS+.5},{rcvd_by$},DBLFONT text 1,{MAXROWS+.5},{copy_title$[copy]},HBCFONT,cols=MAXRCOLS text 1,{MAXROWS+.5},{cont$},DBRFONT,10,cols=MAXRCOLS [zMrg check reprint] reprint$="" if pos("R E P R I N T"=text$[xrow]) then reprint$="Reprint" if pos("D U P L I C A T E"=text$[xrow]) then reprint$="Duplicate" [zMrg check continued] cont_row=66,cont$="" for xrow=xrow1 to xrow2 cont$=get(1,xrow,9,"UFTRIM") if cont$="Continued" or cont$="Last Page" then break next xrow if xrow<=xrow2 then : cont_row=xrow x$=set(1,xrow,9,"") endif if left(cont$,4)="Cont" then : cont$="Continued on next page ..." else cont$="... Last Page " endif [zMrg load comp info] comp_name$=get(xcol,xrow,40,"UFTRIM") if pick=0 then comp_info$=mget(xcol,xrow,xcols,xrows,"UFSAVELF","UFTRIM") if pick then comp_info$=mget(xcol,xrow,30,xrows-2,"UFSAVELF","UFTRIM") if pick then x$=mget(xcol,xrow+xrows-2,xcols,2,"UFSAVELF","UFTRIM") if pick then comp_info$=comp_info$+$0a$+x$ comp_info$=sub(comp_info$,$0a$+",",$0a$) comp_info$=cvs(comp_info$,32:$0a$) [zMrg load cust info] cust_info$=mget(xcol,xrow,xcols,xrows,"UFSAVELF","UFTRIM") cust_info$=sub(cust_info$,$0a$+",",$0a$) cust_info$=cvs(cust_info$,32:$0a$) [zMrg form header] text 1,1.5,{doc_title$},HBRFONT,14,cols=MAXRCOLS text 1,2.5,{Duplicate$},HBRFONT,cols=MAXRCOLS LOGO_IMAGE 1,1,12,6,"COMP_LOGO" text 1,1.5,{comp_info$},DBCFONT,10,cols=MAXRCOLS