# ################################################################### # F7.5-7.rul rule file for standard Facts Accounting Software # # Based upon Facts 7.5.7 demo data - 66 line non-preprinted docs # # Requires, at least, UnForm version 7.1 # ################################################################### # 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. # # Generic comments ###################################### # # This rule file includes the following rule sets # APP310, APR710, APR730 # ARP110, ARP410, ARP810, ARR715 # GLR710, GLR750, GLR820, GLR822, GLR824, GLR826, GLR828, GLR830, # GLR832, GLR834, GLR836, GLR838, GLR840, GLR842, GLR844, GLR848, # GLR850, GLR852, GLR854, GLR856, GLR880 # ICP310, ICR350 # JCP110, JCP410 # MCP110, MCP210 # POP110 # PRP210 # SOC240, SOP110, SOP210, SOP310, SOP320, SOP330, SOP820 # SRP310 # Generic # # # Modification history # # Last modified 02/18/2009 -- BCJ # 09/22/2008 -- BCJ # Finished retesting all forms and reports with UnForm 7.1 # 10/28/2008 -- BCJ # Fixed bottom line issue in arr715 detail # 11/10/2008 -- BCJ # Fixed dual line total hdr in GLR850 font issue # 02/09/2009 -- BCJ # fixed a few alignment issues in arr715 detail # ditto arr715 trs detail # 02/18/2009 -- BCJ # fixed missing detail lines issue in pick ticket # 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="###-###-#### Fax: ###-###-####" global COMP_EMAIL="" #"E-Mail: xxxx@xxxxxxxxxxxxxxx.com" global COMP_WEBSITE="" #"Website: www.xxxxxxxxxxxxxxx.com" # A/P check constants global AP_BANK_NAME="One Major Bank" global AP_BANK_ADDR1="1 Major Blvd" global AP_BANK_ADDR2="Major City CA 90123" global AP_ROUTING="12-345/6789" global AP_MICR_ACCOUNTNO=":123456789:9999-1234<34>" global AP_MICR="micr" # remove # to turn on global AP_NO_STUBS=2 # 1=vendor stub only # 2=vendor stub and payor stub # P/R check constants global PR_BANK_NAME="One Major Bank" global PR_BANK_ADDR1="1 Major Blvd" global PR_BANK_ADDR2="Major City CA 90123" global PR_ROUTING="12-345/6789" global PR_MICR_ACCOUNTNO=":123456789:9999-1234<34>" global PR_MICR="micr" # remove # to turn on global 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, global SIGNATURE_IMAGE="#image" # remove # to turn on global SIGNATURE="" # insert signature file name # Logos global LOGO_IMAGE="image" # remove # to turn on global COMP_LOGO="sdsilogo.pcl" # change to your logo file name # watermarks global WTRMRK_SHD=10 global WTRMRK="text" #Turn to "#gs on" only if you are running pre-version 6 of UnForm and #a pre-version 5 of ProvideX. global GSON="gs on" # What justification for ITEM column header global IJUST="right" # date mask for detects - 10/17/01 global DATEMASK="[0-1][0-9]/[0-3][0-9]/[0-9][0-9]" # US dt #global DATEMASK="[0-3][0-9]/[0-1][0-9]/[0-9][0-9]" # Can dt # 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 DPFONT= DFONT,decimal global DRFONT= DFONT,right global DSHADE= 10 # bold global DBFONT= DFONT,bold global DBLFONT=DBFONT,left global DBCFONT=DBFONT,center global DBPFONT=DBFONT,decimal global DBRFONT=DBFONT,right # default major section box size global MBOXSIZE=5 [AP] # top of AP rule sets [APP310 Checks] detect 41,5,"~DATEMASK.." detect 60,5,"~([0-9][0-9][0-9][0-9][0-9][0-9])|(XXXXXX)" # Check # # set up document constants local MAXCOLS=84 # max cols to output local MAXRCOLS=83 # MAXCOLS-1 local LEFTCOL=1 # left vertical line local RIGHTCOL=84 # right vertical line local MAXROWS=66 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows page 42 # max input rows local ONE_STUB_COPY=1 local TWO_STUB_COPY=2 local MAX_COPIES=2 copies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "A/P Check" # view in pdf properties prepage { # the following moves will leave a space between # the top two stubs # move check to bottom for i=23 to 42 text$[i+24]=text$[i] text$[i]="" # clear line next i # copy stub from top to middle for i=1 to 22 text$[i+24]=text$[i] next i chkno$=trim(get(60,5,6)) chk_amt_words$=trim(get(1,56,67))+" "+trim(get(1,57,67)) # get comp info from constants? addr3$="COMP_ADDR3" save_addr3$=addr3$ phone$="Phone: COMP_PHONES" if trim(phone$)="Phone:" then phone$="" if addr3$="" then addr3$=phone$,phone$="" } precopy { if copy=ONE_STUB_COPY and copy<>AP_NO_STUBS then skip=1 if copy=ONE_STUB_COPY then for i=1 to 21; text$[i]=""; next i if copy=TWO_STUB_COPY and copy<>AP_NO_STUBS then skip=1 } ########## Payor Stub (top) if copy TWO_STUB_COPY # top section cbox 40,1.5,RIGHTCOL,5.5,1,crows=2.5::ISHADE 3.5 4.5::ISHADE,ccols=53 cbox 70,3.5,70,5.5 text 2,2,"COMP_NAME",HBFONT text 2,2.9,"COMP_ADDR1",HFONT text 2,3.8,"COMP_ADDR2",HFONT text 2,4.7,{addr3$},HFONT text 2,5.6,{phone$},HFONT text 41,2,"Vendor #",ICFONT,cols=12 text 54,2,"Vendor Name",ICFONT,cols=29 cfont 41,3,52,3,DBCFONT # vendor # cfont 54,3,MAXRCOLS,3,DBCFONT # vendor name text 41,4,"Check Date",ICFONT,cols=12 text 54,4,"Check #",ICFONT,cols=16 text 71,4,"Page #",ICFONT,cols=12 cfont 41,5,52,5,DBCFONT # check dt cfont 54,5,69,5,DBCFONT # check # cfont 71,5,MAXRCOLS,5,DBCFONT # page # # detail cbox LEFTCOL,6.5,RIGHTCOL,20.5,1,crows=7.5::DSHADE,ccols=11 22 34 46 58 text 1,7,"Inv Date",ICFONT,cols=10 text 12,7,"Invoice #",ICFONT,cols=10 text 23,7,"Amount",IRFONT,cols=11 text 35,7,"Discount",IRFONT,cols=11 text 47,7,"Amount Paid",IRFONT,cols=11 text 59,7,"Memo",IFONT,cols=20 cfont 1,8,10,20,DBCFONT # inv dt cfont 12,8,21,20,DBCFONT # inv # cfont 23,8,33,20,DBRFONT # inv amt cfont 35,8,45,20,DBRFONT # discount cfont 47,8,57,20,DBRFONT # paid amt cfont 59,8,MAXCOLS,20,IFONT # memo # footer cbox 11,20.5,58,21.5,1,ccols=22::100 34 46 text 12,21,"Totals",IBFONT,shade 0 cfont 23,21,33,21,DBRFONT # inv amt cfont 35,21,45,21,DBRFONT # discount cfont 47,21,57,21,DBRFONT # paid amt text 1,21.5,"Payor's Copy",IBRFONT,cols=MAXRCOLS cbox LEFTCOL,23.5,RIGHTCOL,23.5 endif ########### Vendor Stub # top section cbox 40,25.5,RIGHTCOL,29.5,1,crows=26.5::ISHADE 27.5 28.5::ISHADE,ccols=53 cbox 70,27.5,70,29.5 text 2,26,"COMP_NAME",HBFONT text 2,26.9,"COMP_ADDR1",HFONT text 2,27.8,"COMP_ADDR2",HFONT text 2,28.7,{ADDR3$},HFONT text 2,29.6,{phone$},HFONT text 41,26,"Vendor #",ICFONT,cols=12 text 54,26,"Vendor Name",ICFONT,cols=29 cfont 40,27,52,27,DBCFONT # vendor # cfont 54,27,MAXRCOLS,27,DBCFONT # vendor name text 41,28,"Check Date",ICFONT,cols=12 text 54,28,"Check #",ICFONT,cols=16 text 71,28,"Page #",ICFONT,cols=12 cfont 41,29,52,29,DBCFONT # check dt cfont 54,29,69,29,DBCFONT # check # cfont 71,29,MAXRCOLS,29,DBCFONT # page # # detail cbox LEFTCOL,30.5,RIGHTCOL,44.5,1,crows=31.5::DSHADE,ccols=11 22 34 46 58 text 1,31,"Inv Date",ICFONT,cols=10 text 12,31,"Invoice #",ICFONT,cols=10 text 23,31,"Amount",IRFONT,cols=11 text 35,31,"Discount",IRFONT,cols=11 text 47,31,"Amount Paid",IRFONT,cols=11 text 59,31,"Memo",IFONT,cols=20 cfont 1,32,10,44,DBCFONT # inv dt cfont 12,32,21,44,DBCFONT # inv # cfont 23,32,33,44,DBRFONT # inv amt cfont 35,32,45,44,DBRFONT # discount cfont 47,32,57,44,DBRFONT # paid amt cfont 59,32,MAXCOLS,44,IFONT # memo # footer cbox 11,44.5,58,45.5,1,ccols=22::100 34 46 text 12,45,"Totals",IBFONT,shade 0,cols=6 cfont 23,45,33,45,DBRFONT # inv amt cfont 35,45,45,45,DBRFONT # discount cfont 47,45,57,45,DBRFONT # paid amt text 1,45.5,"Vendor's Copy",IBRFONT,cols=MAXRCOLS cbox LEFTCOL,46.5,RIGHTCOL,46.5 ########### Check 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.85,"AP_ROUTING",DBFONT # rtg # cmove 44,52,63,52,49,52 cbox 48,50.5,81,52.5,1,crows=51.5::100,ccols=57 69 text 49,51,"Check #",ICFONT,shade 0,cols=8 cfont 49,52,56,52,DBCFONT # chk # text 58,51,"Date",ICFONT,shade 0,cols=11 cfont 58,52,68,52,DBCFONT # chk dt cmove 69,56,79,56,70,52 # chk amt text 70,51,"Amount",IRFONT,shade 0,cols=11 cfont 70,52,80,52,DBRFONT # chk amt cerase 1,56,MAXCOLS,57 text 2,56,"Pay",IFONT,14 text 6.5,56,{chk_amt_words$},IBFONT,10,fit,cols=70 cmove 14,60,43,64,9,60 text 2,60,"Pay",IFONT text 2,61,"to the",IFONT text 2,62,"Order",IFONT text 2,63,"of",IFONT cfont 9,60,MAXRCOLS,63,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$} [APP310 Vouchers] detect 0,1,"^APP310" detect 0,2,"^check voucher" # set up document constants local MAXCOLS=80 # max cols to output local MAXRCOLS=79 # MAXCOLS-1 local LEFTCOL=1 # left vertical line local RIGHTCOL=80 # right vertical line local MAXROWS=66 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows local MAX_COPIES=1 copies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "A/P Voucher" # view in pdf properties prepage { doc_title$=trim(get(1,2,MAXCOLS)) # watermark ztext$=doc_title$ zbrow=MAXROWS merge "zMrg watermark" } # default line enhancements cfont 1,1,8,MAXROWS,DBCFONT # date cfont 10,1,19,MAXROWS,DCFONT # inv # cfont 21,1,30,MAXROWS,DBRFONT # amt cfont 32,1,41,MAXROWS,DBRFONT # disc cfont 43,1,52,MAXROWS,DBRFONT # paid amt cfont 54,1,MAXRCOLS,MAXROWS,DFONT # comments # header cerase 1,1,MAXCOLS,2 cbox LEFTCOL,.5,RIGHTCOL,2.75,MBOXSIZE,HSHADE text 2,1.25,{trim(get(1,1,15))},HBFONT text 1,1.25,{trim(get(16,1,50))},HBCFONT,14,cols=MAXCOLS text 1,1.25,{trim(get(75,1,6))},HBRFONT,cols=MAXRCOLS text 1,2.25,{doc_title$},HBCFONT,12,cols=MAXCOLS # ribbon info cfont 1,4,6,4,IRFONT,10,proper # check # title cfont 8,4,13,4,DBFONT,10 # check # cfont 16,4,22,4,IFONT,10,proper # vendor cfont 24,4,MAXRCOLS,4,10,DBFONT # name & code # detail headings cerase 1,7,MAXCOLS,7 cbox LEFTCOL,5,RIGHTCOL,MAXROWS,MBOXSIZE,crows=7::DSHADE cfont 1,6,8,6,ICFONT,10,proper # date cfont 10,6,19,6,ICFONT,10,proper # inv # cfont 21,6,30,6,IRFONT,10,proper # amt cfont 32,6,41,6,IRFONT,10,proper # disc cfont 43,6,52,6,IRFONT,10,proper # paid amt cfont 54,6,MAXRCOLS,6,IFONT,10,proper # comments # footer hline "---",erase box " ---------",2,0.5,32,1.01,1,HSHADE [APR710 CashReqDtl] detect 0,1,"^APR710" detect 0,2,"^cash requirements report" detect 3,3-62,"^document" # set up document constants local MAXCOLS=132 # max cols to output local MAXRCOLS=131 # MAXCOLS-1 local LEFTCOL=1 # left vertical line local RIGHTCOL=132 # right vertical line local MAXROWS=62 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows local MAX_COPIES=1 copies MAX_COPIES landscape dpi 600 # see global constant above GSON # graphical shading title "A/P Cash Requirements Detail" # view in pdf properties prepage { merge "zMrg load row 1 variables" merge "zMrg load row 2 variables" # find detail header dethdr$="DOCUMENT",dethdr_col=3 merge "zMrg find detail header" if detrow=0 then detrow=4 else detrow=detrow-1 } # leave first and last columns empty cmove 1,1,MAXCOLS,MAXROWS,2,1 # header merge "zMrg report header" # subheader cfont 2,3,MAXCOLS,{detrow-1},IFONT # rpt opts # detail cerase 1,{detrow},MAXCOLS,{detrow} cerase 1,{detrow+2},MAXCOLS,{detrow+2} cbox LEFTCOL,{detrow},RIGHTCOL,{detrow+2},1,ISHADE cfont 2,{detrow+1},11,{detrow+1},ICFONT,proper # doc cfont 13,{detrow+1},20,{detrow+1},ICFONT,proper # due date cfont 22,{detrow+1},29,{detrow+1},ICFONT,proper # disc date cfont 31,{detrow+1},41,{detrow+1},IRFONT,proper # amount cfont 43,{detrow+1},53,{detrow+1},IRFONT,proper # discount cfont 55,{detrow+1},66,{detrow+1},IRFONT,proper # 1st date cfont 68,{detrow+1},79,{detrow+1},IRFONT,proper # 2nd date cfont 81,{detrow+1},92,{detrow+1},IRFONT,proper # 3rd date cfont 94,{detrow+1},105,{detrow+1},IRFONT,proper # 4th date cfont 107,{detrow+1},118,{detrow+1},IRFONT,proper # 5th date cfont 120,{detrow+1},MAXRCOLS,{detrow+1},IRFONT,proper # 6th date cfont 2,{detrow+3},11,MAXROWS,DCFONT # doc cfont 13,{detrow+3},20,MAXROWS,DBCFONT # due date cfont 22,{detrow+3},29,MAXROWS,DBCFONT # disc date cfont 31,{detrow+3},41,MAXROWS,DBRFONT # amount cfont 43,{detrow+3},53,MAXROWS,DBRFONT # discount cfont 55,{detrow+3},66,MAXROWS,DRFONT # 1st date cfont 68,{detrow+3},79,MAXROWS,DRFONT # 2nd date cfont 81,{detrow+3},92,MAXROWS,DRFONT # 3rd date cfont 94,{detrow+3},105,MAXROWS,DRFONT # 4th date cfont 107,{detrow+3},118,MAXROWS,DRFONT # 5th date cfont 120,{detrow+3},MAXRCOLS,MAXROWS,DRFONT # 6th date # vendor header font "Vendor@1,4,7,MAXROWS",0,0,6,1,IFONT,10 font "Vendor@1,4,7,MAXROWS",7,0,MAXCOLS,1,DBFONT,10,black # class line font "Class@1,8,6,MAXROWS",0,0,5,1,IBFONT,10 font "Class@1,8,6,MAXROWS",6,0,MAXCOLS,1,DBFONT,10 # vendor tots erase "VENDOR TOTAL",0,-1,MAXCOLS,1 box "VENDOR TOTAL",-1,-.75,115,1.25,1,DSHADE box "VENDOR TOTAL",-17,.5,16,1 font "VENDOR TOTAL",0,0,12,1,IBFONT,PROPER bold "VENDOR TOTAL",0,0,85,1 # class tots erase "CLASS TOTAL",0,-1,MAXCOLS,1 box "CLASS TOTAL",-2,-.75,115,1.25,1,ISHADE box "CLASS TOTAL",-18,.5,17,1 font "CLASS TOTAL",-1,0,12,1,IBLFONT,proper bold "CLASS TOTAL",0,0,104,1 # footer erase "REPORT TOTAL",0,-1,MAXCOLS,1 box "REPORT TOTAL",-17,-1,MAXRCOLS,2,1,HSHADE font "REPORT TOTAL",0,0,12,1,IBFONT,proper bold "REPORT TOTAL",13,0,MAXCOLS,1 # totals # footer font "VENDORS:",0,0,20,1,IBFONT,10,proper font "End of Report",0,0,13,1,IBRFONT,10,proper [APR710 CashReqSum] detect 0,1,"^APR710" detect 0,2,"^cash requirements report" detect 5,3-62,"^vendor" # set up document constants local MAXCOLS=133 # max cols to output local MAXRCOLS=132 # MAXCOLS-1 local LEFTCOL=1 # left vertical line local RIGHTCOL=133 # right vertical line local MAXROWS=62 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows local MAX_COPIES=1 copies MAX_COPIES landscape dpi 600 # see global constant above GSON # graphical shading title "A/P Cash Requirements Summary" # view in pdf properties prepage { merge "zMrg load row 1 variables" merge "zMrg load row 2 variables" # find detail header dethdr$="VENDOR",dethdr_col=5 merge "zMrg find detail header" if detrow=0 then detrow=4 else detrow=detrow-1 } # leave first and last columns empty cmove 1,1,MAXCOLS,MAXROWS,2,1 # header merge "zMrg report header" # subheader cfont 2,3,MAXCOLS,{detrow-1},IFONT # rpt opts # detail cerase 1,{detrow},MAXCOLS,{detrow} cerase 1,{detrow+2},MAXCOLS,{detrow+2} cbox LEFTCOL,{detrow},RIGHTCOL,{detrow+2},1,ISHADE cfont 2,{detrow+1},11,{detrow+1},IRFONT,proper # code cfont 13,{detrow+1},42,{detrow+1},IFONT,proper # name cfont 44,{detrow+1},54,{detrow+1},IRFONT,proper # balance cfont 57,{detrow+1},67,{detrow+1},IRFONT,proper # 1st date cfont 70,{detrow+1},80,{detrow+1},IRFONT,proper # 2nd date cfont 83,{detrow+1},93,{detrow+1},IRFONT,proper # 3rd date cfont 96,{detrow+1},106,{detrow+1},IRFONT,proper # 4th date cfont 109,{detrow+1},119,{detrow+1},IRFONT,proper # 5th date cfont 122,{detrow+1},132,{detrow+1},IRFONT,proper # 6th date cfont 2,{detrow+3},11,MAXROWS,DRFONT # code cfont 13,{detrow+3},42,MAXROWS,DBFONT # name cfont 44,{detrow+3},54,MAXROWS,DBRFONT # balance cfont 57,{detrow+3},67,MAXROWS,DRFONT # 1st date cfont 70,{detrow+3},80,MAXROWS,DRFONT # 2nd date cfont 83,{detrow+3},93,MAXROWS,DRFONT # 3rd date cfont 96,{detrow+3},106,MAXROWS,DRFONT # 4th date cfont 109,{detrow+3},119,MAXROWS,DRFONT # 5th date cfont 122,{detrow+3},132,MAXROWS,DRFONT # 6th date # class line font "Class@1,8,6,MAXROWS",0,0,5,1,IBFONT,10 font "Class@1,8,6,MAXROWS",6,0,MAXCOLS,1,DBFONT,10 # class tots erase "CLASS TOTAL",0,-1,MAXCOLS,1 box "CLASS TOTAL",-2,-.75,104,1.25,1,ISHADE box "CLASS TOTAL",-30,.5,29,1 font "CLASS TOTAL",-1,0,12,1,IBLFONT,proper bold "CLASS TOTAL",0,0,104,1 # footer erase "REPORT TOTAL",0,-1,MAXCOLS,1 box "REPORT TOTAL",-29,-1,MAXRCOLS,2,1,HSHADE font "REPORT TOTAL",0,0,12,1,IBFONT,proper bold "REPORT TOTAL",13,0,MAXCOLS,1 # totals # footer font "VENDORS:",0,0,20,1,IBFONT,10,proper font "End of Report",0,0,13,1,IBRFONT,10,proper [APR730 AgedPayDtl] detect 0,1,"^APR730" detect 0,2,"^aged payables" detect 0,2,"^detail" # set up document constants local MAXCOLS=133 # max cols to output local MAXRCOLS=132 # MAXCOLS-1 local LEFTCOL=1 # left vertical line local RIGHTCOL=133 # right vertical line local MAXROWS=62 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows local MAX_COPIES=1 copies MAX_COPIES landscape dpi 600 # see global constant above GSON # graphical shading title "A/P Detail Aging" # view in pdf properties prepage { merge "zMrg load row 1 variables" merge "zMrg load row 2 variables" # find detail header dethdr$="Vendor",dethdr_col=6 merge "zMrg find detail header" if detrow=0 then detrow=5 else detrow=detrow-1 } # leave first and last columns empty cmove 1,1,MAXCOLS,MAXROWS,2,1 # header merge "zMrg report header" # subheader cfont 2,3,MAXCOLS,{detrow-1},IFONT # rpt opts # detail line cerase 1,{detrow},MAXCOLS,{detrow+2} cbox LEFTCOL,{detrow-.5},RIGHTCOL,{detrow+2},1,DSHADE text 1,{detrow+1},"Vendor ID",IRFONT,cols=12 text 14,{detrow+1},"Name",IFONT text 23,{detrow},"Date Last\nPayment",ICFONT,cols=8 text 32,{detrow+1},"Document",ICFONT,cols=10 text 43,{detrow},"Doc\nGrp",ICFONT,cols=3 text 47,{detrow},"Entry\nDate",ICFONT,cols=8 text 56,{detrow},"Due\nDate",ICFONT,cols=5 text 62,{detrow+1},"Balance",IRFONT,cols=11 text 74,{detrow+1},"Current",IRFONT,cols=11 text 86,{detrow+1},"1-30",IRFONT,cols=11 text 98,{detrow+1},"31-60",IRFONT,cols=11 text 110,{detrow+1},"61-90",IRFONT,cols=11 text 122,{detrow+1},"Over90",IRFONT,cols=11 cfont 1,{detrow+3},12,MAXROWS,DRFONT # vendor code cfont 23,{detrow+3},30,MAXROWS,DBCFONT # pymt date cfont 32,{detrow+3},41,MAXROWS,DCFONT # doc cfont 43,{detrow+3},45,MAXROWS,DCFONT # doc grp cfont 47,{detrow+3},54,MAXROWS,DCFONT # entry date cfont 56,{detrow+3},60,MAXROWS,DCFONT # due date cfont 62,{detrow+3},72,MAXROWS,DRFONT # balance cfont 74,{detrow+3},84,MAXROWS,DRFONT # current cfont 86,{detrow+3},96,MAXROWS,DRFONT # 1-30 cfont 98,{detrow+3},108,MAXROWS,DRFONT # 31-60 cfont 110,{detrow+3},120,MAXROWS,DRFONT # 61-90 cfont 122,{detrow+3},132,MAXROWS,DRFONT # over 90 # vendor line font " @46,8,53,MAXROWS",-32,0,40,1,DBFONT,10 # class line font "Class@1,8,6,MAXROWS",0,0,5,1,IBFONT,10 font "Class@1,8,6,MAXROWS",6,0,MAXCOLS,1,DBFONT,10 # vendor tots erase "Vendor Total",0,-1,MAXCOLS,1 box "Vendor Total",-1,-.75,85,1.25,1,DSHADE box "Vendor Total",-48,.5,47,1 font "Vendor Total",0,0,12,1,IBFONT bold "Vendor Total",0,0,85,1 # class tots erase "Class Total",0,-1,MAXCOLS,1 box "Class Total",-2,-.75,85,1.25,1,ISHADE box "Class Total",-49,.5,47,1 font "Class Total",-1,0,12,1,IBLFONT bold "Class Total",0,0,85,1 # report tots erase "Report Total",0,-1,MAXCOLS,1 box "Report Total",-48,-1,MAXRCOLS,2,1,HSHADE font "Report Total",0,0,12,1,IBFONT bold "Report Total",0,0,86,1 # footer font "Document Count:",0,0,30,1,IBFONT,10,proper font "End of Report",0,0,13,1,IBRFONT,10,proper [APR730 AgedPaySum] detect 0,1,"^APR730" detect 0,2,"^aged payables" detect 0,2,"^summary" # set up document constants local MAXCOLS=132 # max cols to output local MAXRCOLS=131 # MAXCOLS-1 local LEFTCOL=1 # left vertical line local RIGHTCOL=132 # right vertical line local MAXROWS=62 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows local MAX_COPIES=1 copies MAX_COPIES landscape dpi 600 # see global constant above GSON # graphical shading title "A/P Summary Aging" # view in pdf properties prepage { merge "zMrg load row 1 variables" merge "zMrg load row 2 variables" # find detail header dethdr$="Vendor",dethdr_col=6 merge "zMrg find detail header" if detrow=0 then detrow=5 else detrow=detrow-1 } # leave first and last columns empty cmove 1,1,MAXCOLS,MAXROWS,2,1 # header merge "zMrg report header" # subheader cfont 2,3,MAXCOLS,{detrow-1},IFONT # rpt opts # detail line cerase 1,{detrow},MAXCOLS,{detrow} cerase 1,{detrow+2},MAXCOLS,{detrow+2} cbox LEFTCOL,{detrow},RIGHTCOL,{detrow+2},1,DSHADE cfont 1,{detrow+1},12,{detrow+1},IRFONT # vendor cfont 14,{detrow+1},46,{detrow+1},IFONT # name cfont 48,{detrow+1},59,{detrow+1},IFONT # total line header cfont 61,{detrow+1},71,{detrow+1},IRFONT,10 # bal cfont 73,{detrow+1},83,{detrow+1},IRFONT # current cfont 85,{detrow+1},95,{detrow+1},IRFONT # 1-60 cfont 97,{detrow+1},107,{detrow+1},IRFONT # 31-60 cfont 109,{detrow+1},119,{detrow+1},IRFONT # 61-90 cfont 121,{detrow+1},MAXRCOLS,{detrow+1},IRFONT # over 90 cfont 1,{detrow+3},12,MAXROWS,DRFONT # vendor cfont 14,{detrow+3},46,MAXROWS,DBFONT # name cfont 48,{detrow+3},59,MAXROWS,DBFONT,10 # total line header cfont 61,{detrow+3},71,MAXROWS,DBRFONT,10 # bal cfont 73,{detrow+3},83,MAXROWS,DRFONT # current cfont 85,{detrow+3},95,MAXROWS,DRFONT # 1-60 cfont 97,{detrow+3},107,MAXROWS,DRFONT # 31-60 cfont 109,{detrow+3},119,MAXROWS,DRFONT # 61-90 cfont 121,{detrow+3},MAXRCOLS,MAXROWS,DRFONT # over 90 # class line font "Class@1,8,6,MAXROWS",0,0,5,1,IBFONT,10 font "Class@1,8,6,MAXROWS",6,0,MAXCOLS,1,DBFONT,10 # class tots erase "Class Total",0,-1,MAXCOLS,1 box "Class Total",-2,-.75,85,1.25,1,ISHADE box "Class Total",-48,.5,46,1 font "Class Total",-1,0,12,1,IBLFONT bold "Class Total",0,0,85,1 # report tots erase "Report Total",0,-1,MAXCOLS,1 box "Report Total",-47,-1,MAXRCOLS,2,1,HSHADE font "Report Total",0,0,12,1,IBFONT bold "Report Total",0,0,86,1 # footer font "Vendor Count:",0,0,20,1,IBFONT,10,proper font "End of Report",0,0,13,1,IBRFONT,10,proper [AR] # top of AR rule sets [ARP110 Invoice] detect 0,2,"^~(invoice)|(credit memo)" detect 0,16,"^invoiced" detect 0,16,"!CONTRACT" # set up document constants local MAXCOLS=80 # max cols to output local MAXRCOLS=79 # MAXCOLS-1 local LEFTCOL=1 # left vertical line local RIGHTCOL=80 # 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 local CUSTOMER_COPY=1 local FILE_COPY=2 local INTERNAL_COPY=3 local MAX_COPIES=3 copies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "A/R Invoice" # view in pdf properties prejob { 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]="Accounting Copy" if MAX_COPIES>=3 then copy_title$[INTERNAL_COPY]="Internal Copy" } prepage { #get header info for better placement doc_title$=trim(get(40,2,10)) reprint$=trim(get(71,2,7)) xcol=20,xrow=3,xcols=40,tpos=2 merge "zMrg get company info" xrow=20,ipos=2 merge "zMrg get desc pos" # check for continued xrow1=22,xrow2=MAXROWS merge "zMrg CheckContinued" if last_page then : btmrow=60 x$="cbox 36,60,RIGHTCOL,64,1,crows=62::HSHADE,ccols=48 58 67" exec(x$) else btmrow=MAXROWS endif # watermark ztext$=doc_title$ if last_page then : zbrow=60 else zbrow=MAXROWS endif merge "zMrg watermark" } precopy { if copy=INTERNAL_COPY then cols$="100" if trim(get(84,3,3))<>"NO." and copy=INTERNAL_COPY then skip=1 if copy=INTERNAL_COPY and left(cont$,4)<>"Cont" and last_page then : x$="cbox 81,60,100,66,MBOXSIZE,crows=62::HSHADE 64,ccols=93" exec(x$) endif } merge "zMrg DisplayCpyTitle" # erase columns ! vline "!!",erase # erase rows - or = hline "==",erase hline "--",erase hline "^^" # erase cost section if not copy 3 if copy CUSTOMER_COPY,FILE_COPY cerase 81,1,100,MAXROWS end if # default line enhancement local BROW=22 local EROW=60 cfont {desc_pos-2},BROW,2,EROW,DBFONT,IJUST # item cfont {desc_pos},BROW,67,EROW,DFONT # desc cfont 69,BROW,MAXRCOLS,EROW,DBRFONT # price if copy INTERNAL_COPY cfont 82,22,92,60,DBRFONT # cost cfont 94,22,99,60,DBRFONT # gm end if # header section cerase 1,1,100,10 cbox LEFTCOL,1,RIGHTCOL,MAXROWS,MBOXSIZE,crows=10:MBOXSIZE if copy INTERNAL_COPY cbox 81,1,100,MAXROWS,MBOXSIZE end if merge "zMrg form header" # right header cbox 64,5.5,RIGHTCOL,10,1,ccols=72::ISHADE,crows=7 8.5 if copy INTERNAL_COPY cbox 81,1,100,4,1,ccols=90::ISHADE end if text 65,6.25,"Number",IFONT,9 text 65,7.75,"Date",IFONT,9 text 65,9.25,"Page",IFONT,9 if copy INTERNAL_COPY text 82,3,"Number",IFONT,9 end if text 73,6.25,{trim(get(72,3,6))},DBFONT text 73,7.75,{trim(get(71,7,8))},DBFONT text 73,9.25,{trim(get(77,5,3))},DBFONT if copy INTERNAL_COPY text 93.5,3,{trim(get(72,3,6))},DBFONT end if # bill to section cbox LEFTCOL,10,RIGHTCOL,15,MBOXSIZE,ccols=10::ISHADE 41 50::ISHADE text 2,11,"Bill to:",ICFONT,9,cols=8 text 2,12,{trim(get(20,10,20))},DBCFONT,cols=8 cmove 12,11,41,14,11,11 cfont 11,11,40,14,DBFONT # bill to addr # ship to section text 42,11,"Ship to:",ICFONT,9,cols=8 text 42,12,{trim(get(57,10,15))},DBCFONT,cols=8 cmove 49,11,MAXRCOLS,14,51,11 cfont 51,11,MAXCOLS,14,DBFONT # ship to addr # ribbon section cerase 17,16,17,18 cerase 26,16,26,18 cerase 32,16,32,18 cerase 48,16,48,18 cerase 57,16,57,18 cerase 62,16,62,18 cbox LEFTCOL,15,RIGHTCOL,19,MBOXSIZE,CROWS=17::ISHADE,ccols=17 26 32 48 57 62 cfont 2,16,16,16,ICFONT,9,proper # ref # cfont 18,16,25,16,ICFONT,9,proper # inv dt cfont 27,16,31,16,ICFONT,9,proper # slsp cfont 33,16,47,16,ICFONT,9,proper # terms cfont 49,16,56,16,ICFONT,9,proper # tax code cfont 58,16,61,16,ICFONT,9,proper # branch cfont 2,18,16,18,DBCFONT # ref # cfont 18,18,25,18,DBCFONT # inv dt cfont 27,18,31,18,DBCFONT # slsp cfont 33,18,47,18,DBCFONT # terms cfont 49,18,56,18,DBCFONT # tax code cfont 58,18,61,18,DBCFONT # branch # detail erase "!@desc_pos-1,20,desc_pos-1,60",0,0,1,1 erase "!@68,20,68,60",0,0,1,1 if copy INTERNAL_COPY erase "!@93,20,93,60",0,0,1,1 end if cbox LEFTCOL,19,RIGHTCOL,{btmrow},MBOXSIZE,crows=21::ISHADE,ccols=68 cbox {desc_pos-1},19,{desc_pos-1},{btmrow} if copy INTERNAL_COPY cbox 81,19,100,MAXROWS,MBOXSIZE,crows=21::DSHADE,ccols=93 end if cfont {desc_pos-2},20,2,20,IFONT,9,proper,IJUST # item code cfont {desc_pos},20,67,20,IFONT,9,proper # desc cfont 69,20,MAXRCOLS,20,IRFONT,9,proper # price if copy INTERNAL_COPY cfont 82,20,92,20,IRFONT,9,proper # cost cfont 94,20,99,20,IRFONT,9,proper # gm end if # footer cerase 36,61,36,64 cerase 48,61,48,63 cerase 58,61,58,63 cerase 67,61,67,63 cerase 93,61,93,63 cfont 37,61,47,61,IBRFONT,9,proper # amt cfont 49,61,57,61,IBRFONT,9,proper # tax cfont 59,61,66,61,IBRFONT,9,proper # frt cfont 68,61,MAXRCOLS,61,IBRFONT,10,proper # tot due if copy INTERNAL_COPY cfont 82,61,92,61,IBRFONT,10,proper # tot cost cfont 94,61,99,61,IRFONT,9,proper # gm end if cfont 37,63,47,63,DBRFONT # amt cfont 49,63,57,63,DBRFONT # tax cfont 59,63,66,63,DBRFONT # frt cfont 68,63,MAXRCOLS,63,DBRFONT,10 # tot due if copy INTERNAL_COPY cfont 82,63,92,63,DBRFONT,10 # tot cost cfont 94,63,99,63,DBRFONT # gm end if cfont 2,61,35,64,DFONT cfont 2,65,MAXRCOLS,65,DFONT [ARP410 DunningLetter] detect 0,3,"^past due notice" detect 0,5,"^page" # set up document constants local MAXCOLS=80 # max cols to output local MAXRCOLS=79 # MAXCOLS-1 local LEFTCOL=1 # left vertical line local RIGHTCOL=80 # 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 local CUSTOMER_COPY=1 local FILE_COPY=2 local MAX_COPIES=2 copies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "Dunning Letter" # view in pdf properties prejob { 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]="Accounting Copy" doc_title$="Past Due Notice" date$="" } prepage { xcol=20,xrow=5,xcols=40,tpos=2 merge "zMrg get company info" # locate start of notice of past due items for i=1 to 66 x=pos("NOTICE OF PAST DUE ITEMS"=text$[i]) if x then nrow=i,ncol=x;break next i to$="",cust_code$="",cust_info$="",srow=0,lrow=0 if nrow>14 then to$="To:";cust_code$=trim(cut(10,14,20,""));cust_info$=mcut(10,15,40,5,"","Y","Y");date$=trim(cut(64,19,8,""));srow=21,lrow=nrow-1 } merge "zMrg DisplayCpyTitle" # default line local BROW=1 local EROW=MAXROWS cfont 19,BROW,24,EROW,DCFONT # inv # cfont 31,BROW,38,EROW,DBCFONT # date cfont 41,BROW,49,EROW,DCFONT # days past cfont 51,BROW,62,EROW,DBRFONT # amount # header section cerase 1,1,MAXCOLS,8 merge "zMrg form header" text 1,4.1,{trim(get(70,5,10))},HRFONT,cols=MAXRCOLS text 1,6.1,{date$},HBRFONT,cols=MAXRCOLS # customer name & addr text 2,15,{to$},IRFONT,light,cols=6 text 10,14,{cust_code$},DBFONT text 10,15,{cust_info$},DBFONT # letter text cfont 7,{srow},MAXRCOLS,{lrow},IFONT # new headers cfont 1,{nrow},MAXCOLS,{nrow},IBCFONT font {ncol-13},{nrow+2},12,1,ICFONT font {ncol+4},{nrow+2},4,1,ICFONT font {ncol+12},{nrow+2},9,1,ICFONT font {ncol+28},{nrow+2},6,1,IRFONT # footer cfont 26,56,36,57,IBRFONT cfont 38,56,48,57,IBRFONT cfont 26,59,36,59,HBRFONT cfont 38,59,48,59,HBRFONT [ARP810 Statement] detect 0,2,"^statement" detect 0,16,"^pymt dte" # set up document constants local MAXCOLS=75 # max cols to output local MAXRCOLS=74 # MAXCOLS-1 local LEFTCOL=1 # left vertical line local RIGHTCOL=75 # 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 local CUSTOMER_COPY=1 local REMITTANCE_COPY=2 local FILE_COPY=3 local RECAP_COPY=4 local MAX_COPIES=4 pcopies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "A/R Statement" # view in pdf properties prejob { dim copy_title$[MAX_COPIES] if MAX_COPIES>=1 then copy_title$[CUSTOMER_COPY]="Customer Copy" if MAX_COPIES>=2 then copy_title$[REMITTANCE_COPY]="Remittance Copy" if MAX_COPIES>=3 then copy_title$[FILE_COPY]="Accounting Copy" if MAX_COPIES>=4 then copy_title$[RECAP_COPY]="Recap Copy" } prepage { doc_title$="STATEMENT" xcol=20,xrow=4,xcols=38,tpos=2 merge "zMrg get company info" cust_code$=trim(get(5,10,25)) msg_row=61 # look for remark lines for i=18 to 61 if mid(text$[i],1,3)="!==" or mid(text$[i],1,3)="!--" then msg_row=i;exitto end_look next i end_look: # check for continued xrow1=18,xrow2=MAXROWS merge "zMrg CheckContinued" if last_page then : btmrow=msg_row text$[65]=text$[64],text$[64]="" text$[64]=text$[63],text$[63]="" text$[63]=text$[62];text$[62]="" x$="cbox LEFTCOL,62,RIGHTCOL,MAXROWS,MBOXSIZE,crows=64::HSHADE,ccols=14 26 38 50 62 exec(x$) if msg_row<61 then : x$="cbox LEFTCOL,"+str(msg_row)+",RIGHTCOL,62" exec(x$) endif else x$=mset(1,62,MAXCOLS,5,"") btmrow=MAXROWS endif # watermark ztext$=doc_title$ zbrow=btmrow merge "zMrg watermark" } precopy { if copy=RECAP_COPY and cust_code$<>"RECAP" then skip=1 if copy<>RECAP_COPY and cust_code$="RECAP" then skip=1 doc_title$="STATEMENT" if copy=RECAP_COPY then doc_title$="STATEMENT RECAP" doc_title$="STATEMENT" } merge "zMrg DisplayCpyTitle" # erase columns ! vline "!!",erase # erase rows - or = hline "==",erase hline "--",erase hline "^^" # erase tearoff section cerase 76,1,98,MAXROWS # header section cerase 1,1,MAXCOLS,10 cbox LEFTCOL,1,RIGHTCOL,MAXROWS,MBOXSIZE,crows=10:MBOXSIZE merge "zMrg form header" # right header cbox 62,7,RIGHTCOL,10,crows=8.5,ccols=68::ISHADE text 63,7.75,"Date",IFONT,cols=5 text 63,9.25,"Page",IFONT,cols=5 text 69,7.75,{trim(get(65,7,8))},DBFONT,cols=7 text 69,9.25,{trim(get(71,5,3))},DBFONT,cols=7 # to section if copy CUSTOMER_COPY,REMITTANCE_COPY,FILE_COPY cbox LEFTCOL,10,RIGHTCOL,15,MBOXSIZE,ccols=11::ISHADE text 2,11,"To:",ICFONT,cols=9 text 2,12,{cust_code$},DBCFONT,cols=9 cfont 12,11,51,14,DBFONT # to addr endif # detail erase "!@1,16,MAXCOLS,16",0,0,1,1 if copy REMITTANCE_COPY cbox 28,15,28,{btmrow} text 24,15.5,"Mark for",ICFONT,cols=4 text 24,16.5,"Payment",ICFONT,cols=4 endif if copy CUSTOMER_COPY,REMITTANCE_COPY,FILE_COPY cbox LEFTCOL,15,MAXCOLS,{btmrow},MBOXSIZE,crows=17::DSHADE,ccols=10 18 23 39 48 60 63 75 cfont 2,16,9,16,ICFONT,proper # dt cfont 11,16,17,16,ICFONT,proper # inv # cfont 19,16,26,16,IFONT,proper # due dt cfont 28,16,38,16,IRFONT,proper # amt cfont 40,16,47,16,ICFONT,proper # pymt dt cfont 49,16,59,16,IRFONT,proper # pymt amt cfont 61,16,62,16,ICFONT,proper # type cfont 64,16,74,16,IBRFONT,proper # bal # default detail line cfont 2,18,9,60,DBCFONT # dt cfont 11,18,17,60,DCFONT # inv # cfont 19,18,26,60,DFONT # duedt cfont 28,18,38,60,DBRFONT # amt cfont 40,18,47,60,DCFONT # dt cfont 49,18,59,60,DBRFONT # amt cfont 61,18,62,60,DCFONT # type cfont 64,18,74,60,DBRFONT # bal # handle ship-to header font "Ship-to@3,18,9,60",-1,0,8,1,DBCFONT font "Ship-to@3,18,9,60",9,0,40,1,DBFONT # handle ship-to totals erase "SHIP-TO TOTAL@50,18,62,60",13,-1,13,1 box "SHIP-TO TOTAL@50,18,62,60",-2,-.75,27,1.5,1,DSHADE font "SHIP-TO TOTAL@50,18,62,60",-1,0,14,1,DBFONT font "SHIP-TO TOTAL@50,18,62,60",13,0,12,1,DBRFONT,10 end if if copy RECAP_COPY cerase 1,9,MAXCOLS,60 text 1,58,"TOTAL DUE RECAP",HBCFONT,14,cols=MAXCOLS text 1,60,{proper(trim(get(12,11,30)))},HBCFONT,12,cols=MAXCOLS end if # message area if copy CUSTOMER_COPY,REMITTANCE_COPY,FILE_COPY cfont 2,{msg_row},62,61,IFONT,black end if # footer erase "!@1,62,MAXCOLS,62",0,0,1,1 erase "!@1,64,MAXCOLS,64",0,0,1,1 cfont 3,63,13,63,IBRFONT,proper cfont 15,63,25,63,IBRFONT,proper cfont 27,63,37,63,IBRFONT,proper cfont 39,63,49,63,IBRFONT,proper cfont 51,63,61,63,IBRFONT,proper cfont 63,63,74,63,IBRFONT,11,proper cfont 3,65,13,65,DBRFONT cfont 15,65,25,65,DBRFONT cfont 27,65,37,65,DBRFONT cfont 39,65,49,65,DBRFONT cfont 51,65,61,65,DBRFONT cfont 63,65,74,65,DBRFONT,12 [ARR715 TrialBalDtl] detect 0,1,"^ARR715" detect 0,2,"^aged trial balance - detail " # 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 MAX_COPIES=1 copies MAX_COPIES landscape dpi 600 # see global constant above GSON # graphical shading title "A/R Detail Aging" # view in pdf properties prepage { merge "zMrg load row 1 variables" merge "zMrg load row 2 variables" # find detail header dethdr$="Customer",dethdr_col=3 merge "zMrg find detail header" if detrow=0 then detrow=5 else detrow=detrow-1 # tag memos for row=detrow+3 to MAXROWS if left(text$[row],10)<>" " then continue if mid(text$[row],12,5)=" " then continue x$=set(1,row,2,"mL") next row } # leave first and last columns empty cmove 1,1,MAXCOLS,MAXROWS,2,1 # header merge "zMrg report header" # subheader cfont 2,3,MAXCOLS,{detrow-1},IFONT # rpt opts # detail section cerase 1,{detrow+2},MAXCOLS,{detrow+2} cbox LEFTCOL,{detrow-.5},RIGHTCOL,{detrow+1.5},1,ISHADE cfont 1,{detrow},11,{detrow+1},IRFONT # customer cfont 13,{detrow},20,{detrow+1},IFONT # name cfont 37,{detrow},44,{detrow+1},ICFONT # lst Pymt dt cfont 46,{detrow},46,{detrow+1},ICFONT cfont 48,{detrow},53,{detrow+1},IRFONT # doc # cfont 55,{detrow},55,{detrow+1},ICFONT # type cfont 57,{detrow},58,{detrow+1},ICFONT # type cfont 60,{detrow},67,{detrow+1},ICFONT # entry dt cfont 69,{detrow},73,{detrow+1},ICFONT # due dt cfont 75,{detrow},86,{detrow+1},IRFONT,proper # current cfont 88,{detrow},98,{detrow+1},IRFONT # 1-60 cfont 100,{detrow},110,{detrow+1},IRFONT # 31-60 cfont 112,{detrow},122,{detrow+1},IRFONT # 61-90 cfont 124,{detrow},MAXRCOLS,{detrow+1},IRFONT,proper cfont 1,{detrow+3},11,MAXROWS,DRFONT # customer cfont 13,{detrow+3},35,MAXROWS,DBFONT # name cfont 37,{detrow+3},44,MAXROWS,DCFONT # lst Pymt dt cfont 46,{detrow+3},46,MAXROWS,DCFONT cfont 48,{detrow+3},53,MAXROWS,DRFONT # doc # cfont 55,{detrow+3},55,MAXROWS,DCFONT # type cfont 57,{detrow+3},58,MAXROWS,DCFONT # type cfont 60,{detrow+3},67,MAXROWS,DCFONT # entry dt cfont 69,{detrow+3},73,MAXROWS,DCFONT # due dt cfont 75,{detrow+3},86,MAXROWS,DRFONT # current cfont 88,{detrow+3},98,MAXROWS,DRFONT # 1-60 cfont 100,{detrow+3},110,MAXROWS,DRFONT # 31-60 cfont 112,{detrow+3},122,MAXROWS,DRFONT # 61-90 cfont 124,{detrow+3},MAXRCOLS,MAXROWS,DRFONT # over 90 # special memos font "mL@1,5,3,MAXROWS",11,0,MAXCOLS,1,IFONT erase "mL@1,5,3,MAXROWS",0,0,2,1 # customer tots erase "Cust Total",0,-1,MAXCOLS,1 font "Cust Total",0,0,11,1,IBFONT,proper bold "Cust Total",0,0,84,1 font "Cust Total",12,0,12,1,DBRFONT,10 # bal # class line font "Class@1,5,6,MAXROWS",0,0,5,1,IBFONT,10 font "Class@1,5,6,MAXROWS",6,0,MAXCOLS,1,DBFONT,10 # class tots erase "Class Total",0,-1,MAXCOLS,1 box "Class Total",-5,-.75,88.5,1.25,1,ISHADE box "Class Total",-50,.5,49,1 font "Class Total",-4,0,15,1,IBLFONT,proper bold "Class Total",0,0,104,1 font "Class Total",12,0,12,1,DBRFONT # slsp/terr line font "Slsp/Terr@1,5,9,MAXROWS",0,0,9,1,IBFONT,10 font "Slsp/Terr@1,5,9,MAXROWS",10,0,MAXCOLS,1,DBFONT,10 # slsp/terr tots erase "Slsp/Terr Total",0,-1,MAXCOLS,1 box "Slsp/Terr Total",-1,-.75,88.5,1.25,1,ISHADE box "Slsp/Terr Total",-50,.5,49,1 font "Slsp/Terr Total",0,0,15,1,IBLFONT,proper bold "Slsp/Terr Total",0,0,104,1 font "Slsp/Terr Total",17,0,11,1,DBRFONT # report tots erase "Report Total",0,-1,MAXCOLS,1 box "Report Total",-49,-1,MAXRCOLS,2,1,HSHADE font "Report Total",-3,0,15,1,IBLFONT,proper bold "Report Total",0,0,88,1 font "Report Total",14,0,11,1,DBRFONT,10 # bal # footer font "Customer Count:",0,0,110,2,IBFONT,10,proper font "End of Report",0,0,13,1,IBRFONT,10,proper [ARR715 TrialBalSum] detect 0,1,"^ARR715" detect 0,2,"^aged trial balance - summary" # 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 MAX_COPIES=1 copies MAX_COPIES landscape dpi 600 # see global constant above GSON # graphical shading title "A/R Summary Aging" # view in pdf properties prepage { merge "zMrg load row 1 variables" merge "zMrg load row 2 variables" # find detail header dethdr$="Customer",dethdr_col=3 merge "zMrg find detail header" if detrow=0 then detrow=5 else detrow=detrow-1 # tag memos for row=detrow+3 to MAXROWS if left(text$[row],10)<>" " then continue if mid(text$[row],12,5)=" " then continue x$=set(1,row,2,"mL") next row } # leave first and last columns empty cmove 1,1,MAXCOLS,MAXROWS,2,1 # header merge "zMrg report header" # subheader cfont 2,3,MAXCOLS,{detrow-1},IFONT # rpt opts # detail section cerase 1,{detrow+2},MAXCOLS,{detrow+2} cbox LEFTCOL,{detrow-.5},RIGHTCOL,{detrow+2},1,ISHADE cfont 1,{detrow},11,{detrow+1},IRFONT # customer cfont 13,{detrow},42,{detrow+1},IFONT # name cfont 44,{detrow},51,{detrow+1},ICFONT # lst pymt dt cfont 53,{detrow},60,{detrow+1},ICFONT # lst sale dt cfont 62,{detrow},73,{detrow+1},IRFONT # bal cfont 75,{detrow},85,{detrow+1},IRFONT,proper # current cfont 87,{detrow},97,{detrow+1},IRFONT # 1-60 cfont 99,{detrow},109,{detrow+1},IRFONT # 31-60 cfont 111,{detrow},121,{detrow+1},IRFONT # 61-90 cfont 123,{detrow},MAXRCOLS,{detrow+1},IRFONT,proper cfont 1,{detrow+3},11,MAXROWS,DRFONT # customer cfont 13,{detrow+3},42,MAXROWS,DBFONT # name cfont 44,{detrow+3},51,MAXROWS,DCFONT # lst pymt dt cfont 53,{detrow+3},60,MAXROWS,DCFONT # lst sale dt cfont 62,{detrow+3},73,MAXROWS,DBRFONT # bal cfont 75,{detrow+3},85,MAXROWS,DRFONT # current cfont 87,{detrow+3},97,MAXROWS,DRFONT # 1-60 cfont 99,{detrow+3},109,MAXROWS,DRFONT # 31-60 cfont 111,{detrow+3},121,MAXROWS,DRFONT # 61-90 cfont 123,{detrow+3},MAXRCOLS,MAXROWS,DRFONT # over 90 # special memos font "mL@1,5,3,MAXROWS",11,0,MAXCOLS,1,IFONT erase "mL@1,5,3,MAXROWS",0,0,2,1 # class line font "Class@1,5,6,MAXROWS",0,0,5,1,IBFONT,10 font "Class@1,5,6,MAXROWS",6,0,MAXCOLS,1,DBFONT,10 # class tots erase "Class Total",0,-1,MAXCOLS,1 box "Class Total",-6,-.75,90,1.25,1,ISHADE box "Class Total",-49,.5,43,1 font "Class Total",-5,0,16,1,IBLFONT,proper bold "Class Total",0,0,104,1 # slsp/terr line font "Slsp/Terr@1,5,9,MAXROWS",0,0,9,1,IBFONT,10 font "Slsp/Terr@1,5,9,MAXROWS",10,0,MAXCOLS,1,DBFONT,10 # slsp/terr tots erase "Slsp/Terr Total",0,-1,MAXCOLS,1 box "Slsp/Terr Total",-2,-.75,90,1.25,1,ISHADE box "Slsp/Terr Total",-45,.5,43,1 font "Slsp/Terr Total",-1,0,16,1,IBLFONT,proper bold "Slsp/Terr Total",0,0,104,1 # report totals erase "Report Total",0,-1,MAXCOLS,1 box "Report Total",-48,-1,MAXRCOLS,2,1,HSHADE font "Report Total",-4,0,16,1,IBLFONT,proper bold "Report Total",0,0,85,1 font "Report Total",14,0,11,1,DBRFONT,10 # bal # footer font "Customer Count:",0,0,30,1,IBFONT,10,proper font "End of Report",0,0,13,1,IBRFONT,10,proper [ARR715 TrialBalTrs] detect 0,1,"^ARR715" detect 0,2,"^aged trial balance-detail/trx" # 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 MAX_COPIES=1 copies MAX_COPIES landscape dpi 600 # see global constant above GSON # graphical shading title "A/R Detail Aging-Trx" # view in pdf properties prepage { merge "zMrg load row 1 variables" merge "zMrg load row 2 variables" # find detail header dethdr$="D S Doc# TY",dethdr_col=1 merge "zMrg find detail header" if detrow=0 then detrow=5 else detrow=detrow-1 # tag memos for row=detrow+3 to MAXROWS if trim(text$[row])="" then continue if left(text$[row],6)<>" " then continue if mid(text$[row],43,8)<>" " then continue if mid(text$[row],60,8)<>" " then continue x$=set(1,row,2,"mL") next row } # leave first and last columns empty cmove 1,1,MAXCOLS,MAXROWS,2,1 # header merge "zMrg report header" # subheader cfont 2,3,MAXCOLS,{detrow-1},IFONT # rpt opts # detail section cerase 1,{detrow+2},MAXCOLS,{detrow+2} cerase 46,{detrow},70,{detrow} cbox LEFTCOL,{detrow-.5},RIGHTCOL,{detrow+2},1,ISHADE cfont 2,{detrow},2,{detrow+1},ICFONT # doc # cfont 4,{detrow},4,{detrow+1},ICFONT cfont 6,{detrow},11,{detrow+1},ICFONT # type cfont 13,{detrow},14,{detrow+1},ICFONT # type cfont 16,{detrow},23,{detrow+1},ICFONT # entry dt cfont 25,{detrow},32,{detrow+1},ICFONT # due dt cfont 34,{detrow},44,{detrow+1},IRFONT # orig amt cfont 46,{detrow},53,{detrow+1},ICFONT # trs dt cfont 55,{detrow},58,{detrow+1},ICFONT # trs type cfont 60,{detrow},70,{detrow+1},IRFONT # trs amt cfont 72,{detrow},85,{detrow+1},IRFONT,proper # current cfont 87,{detrow},97,{detrow+1},IRFONT # 1-60 cfont 99,{detrow},109,{detrow+1},IRFONT # 31-60 cfont 111,{detrow},121,{detrow+1},IRFONT # 61-90 cfont 123,{detrow},MAXRCOLS,{detrow+1},IRFONT,proper cfont 2,{detrow+3},2,MAXROWS,DCFONT cfont 4,{detrow+3},4,MAXROWS,DCFONT # doc # cfont 6,{detrow+3},11,MAXROWS,DCFONT # type cfont 13,{detrow+3},14,MAXROWS,DCFONT # type cfont 16,{detrow+3},23,MAXROWS,DCFONT # entry dt cfont 25,{detrow+3},32,MAXROWS,DCFONT # due dt cfont 34,{detrow+3},44,MAXROWS,DRFONT # orig amt cfont 46,{detrow+3},53,MAXROWS,DCFONT # trs dt cfont 55,{detrow+3},58,MAXROWS,DCFONT # trs type cfont 60,{detrow+3},73,MAXROWS,DRFONT # trs amt cfont 75,{detrow+3},85,MAXROWS,DRFONT # current cfont 87,{detrow+3},97,MAXROWS,DRFONT # 1-60 cfont 99,{detrow+3},109,MAXROWS,DRFONT # 31-60 cfont 111,{detrow+3},121,MAXROWS,DRFONT # 61-90 cfont 123,{detrow+3},MAXRCOLS,MAXROWS,DRFONT # over 90 # special memos font "mL@1,5,3,MAXROWS",6,0,MAXCOLS,1,IFONT erase "mL@1,5,3,MAXROWS",0,0,2,1 # Customer line font "Customer:",0,0,10,1,DFONT font "Customer:",10,0,10,1,DRFONT font "Customer:",21,0,30,1,DBFONT font "Customer:",21,1,30,1,DFONT font "Customer:",53,1,18,1,DFONT bold "Customer:",73,0,61,1 # class line font "Class@1,5,6,MAXROWS",0,0,5,1,IBFONT,10 font "Class@1,5,6,MAXROWS",6,0,MAXCOLS,1,DBFONT,10 # class tots erase "Class Total",0,-1,MAXCOLS,1 box "Class Total",-6,-.75,78,1.25,1,ISHADE box "Class Total",-61,.5,59,1 font "Class Total",-5,0,16,1,IBLFONT,proper bold "Class Total",0,0,104,1 # slsp/terr line font "Slsp/Terr@1,5,10,MAXROWS",0,0,9,1,IFONT,10 font "Slsp/Terr@1,5,10,MAXROWS",10,0,MAXCOLS,1,DBFONT,10 # slsp/terr tots erase "Slsp/Terr Total",0,-1,MAXCOLS,1 box "Slsp/Terr Total",-2,-.75,78,1.25,1,ISHADE box "Slsp/Terr Total",-57,.5,55,1 font "Slsp/Terr Total",-1,0,16,1,IBLFONT,proper bold "Slsp/Terr Total",0,0,104,1 # report totals erase "Report Total",0,-1,MAXCOLS,1 box "Report Total",-60,-1,MAXRCOLS,2,1,HSHADE font "Report Total",-4,0,16,1,IBLFONT,proper bold "Report Total",0,0,85,1 # footer font "Customer Count:",0,0,110,2,IBFONT,10,proper font "End of Report",0,0,13,1,IBRFONT,10,proper [GL] # top of GL rule sets [GLR710 TrialBalDtl] detect 0,1,"^GLR710" detect 0,2,"^Detail Ledger" # 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 MAX_COPIES=1 copies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "G/L Detail Ledger" # view in pdf properties prepage { # fix blank lines at top while trim(text$[1])="" for row=2 to MAXROWS text$[row-1]=text$[row] text$[row]="" next row wend merge "zMrg load row 1 variables" merge "zMrg load row 2 variables" # set dtlbgn if pagenum=1 then dtlbgn=7 else dtlbgn=5 } # leave first and last columns empty cmove 1,1,MAXCOLS,MAXROWS,2,1 # header cerase 1,1,MAXCOLS,2 merge "zMrg report header" # subheader font "G/L@1,4,4,4",0,0,MAXCOLS,2,ILFONT,10 # opts # dtl hdr cbox LEFTCOL,{dtlbgn-.5},RIGHTCOL,{dtlbgn+1.5},5,DSHADE cerase 1,{dtlbgn+2},MAXCOLS,{dtlbgn+2} # dtl hdr cfont 2,{dtlbgn},15,{dtlbgn+1},ILFONT,10 cfont 17,{dtlbgn},27,{dtlbgn+1},ILFONT,10 cfont 29,{dtlbgn},36,{dtlbgn+1},ICFONT,10 cfont 38,{dtlbgn},41,{dtlbgn+1},ILFONT,10 cfont 43,{dtlbgn},45,{dtlbgn+1},ILFONT,10 cfont 47,{dtlbgn},76,{dtlbgn+1},ILFONT,10 cfont 79,{dtlbgn},90,{dtlbgn+1},ICFONT,10 cfont 93,{dtlbgn},105,{dtlbgn+1},ICFONT,10 cfont 108,{dtlbgn},119,{dtlbgn+1},ICFONT,10 cfont 122,{dtlbgn},MAXRCOLS,{dtlbgn+1},ICFONT,10 # dtl data cfont 29,{dtlbgn+2},36,MAXROWS,DBCFONT cfont 38,{dtlbgn+2},41,MAXROWS,DLFONT cfont 43,{dtlbgn+2},45,MAXROWS,DLFONT cfont 47,{dtlbgn+2},76,MAXROWS,DLFONT cfont 78,{dtlbgn+2},90,MAXROWS,DBPFONT # special hdrs font "!~ [0-9G ]@1,8,3,MAXROWS",-3,0,60,1,IBFONT,10 # account hdr lines font "~ [0-9]@1,8,3,MAXROWS",1,0,14,1,DBLFONT font "~ [0-9]@1,8,3,MAXROWS",16,0,60,1,DLFONT font "~ [0-9]@1,8,3,MAXROWS",91,0,14,1,DBPFONT font "~ [0-9]@1,8,3,MAXROWS",106,0,13,1,DBPFONT font "~ [0-9]@1,8,3,MAXROWS",120,0,13,1,DBPFONT # special (Cont...) font "(Cont...)",0,0,9,1,IFONT,10 # totals erase "Total@114,6,119,MAXROWS",0,-1,MAXCOLS,1 box "Total@114,6,119,MAXROWS",7,-1,13,1 font "Total@114,6,119,MAXROWS",-30,0,36,1,IBRFONT,10,proper font "Total@114,6,119,MAXROWS",6,0,13,1,DBRFONT,10 # footer font "GL Number Count",0,0,40,1,IBLFONT,10,proper font "End of Report",0,0,13,1,IBRFONT,10,proper [GLR710 TrialBalSum] detect 0,1,"^GLR710" detect 0,2,"^Trial Balance" # set up document constants local MAXCOLS=83 # max cols to output local MAXRCOLS=82 # MAXCOLS-1 local LEFTCOL=1 # left vertical line local RIGHTCOL=83 # right vertical line local MAXROWS=66 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows local DESC_COPY=1 local DESCNO_COPY=2 local MAX_COPIES=2 copies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "G/L Trial Balance" # view in pdf properties prepage { # fix blank lines at top while trim(text$[1])="" for row=2 to MAXROWS text$[row-1]=text$[row] text$[row]="" next row wend merge "zMrg load row 1 variables" merge "zMrg load row 2 variables" # with or without description if pagenum=1 then descpos=pos("Description"=text$[8]) # set dtlbgn if pagenum=1 then dtlbgn=7 else dtlbgn=5 } precopy { if copy=DESC_COPY and descpos=0 then skip=1 if copy=DESCNO_COPY and descpos>0 then skip=1 } # leave first and last columns empty cmove 1,1,MAXCOLS,MAXROWS,2,1 # header cerase 1,1,MAXCOLS,2 merge "zMrg report header" # subheader font "G/L@1,4,4,4",0,0,MAXCOLS,2,ILFONT,10 # opts # dtl hdr cbox LEFTCOL,{dtlbgn-.5},RIGHTCOL,{dtlbgn+1.5},5,DSHADE cerase 1,{dtlbgn+2},MAXCOLS,{dtlbgn+2} if copy DESC_COPY # dtl hdr cfont 2,{dtlbgn},15,{dtlbgn+1},ILFONT,10 cfont 17,{dtlbgn},39,{dtlbgn+1},ILFONT,10 cfont 43,{dtlbgn},53,{dtlbgn+1},ICFONT,10 cfont 57,{dtlbgn},67,{dtlbgn+1},ICFONT,10 cfont 70,{dtlbgn},MAXRCOLS,{dtlbgn+1},ICFONT,10 # dtl data cfont 2,{dtlbgn+2},15,MAXROWS,DBLFONT,10 cfont 17,{dtlbgn+2},39,MAXROWS,DLFONT,10 cfont 41,{dtlbgn+2},53,MAXROWS,DBPFONT,10 cfont 55,{dtlbgn+2},67,MAXROWS,DBPFONT,10 cfont 69,{dtlbgn+2},MAXRCOLS,MAXROWS,DBPFONT,10 endif if copy DESCNO_COPY # dtl hdr cfont 2,{dtlbgn},15,{dtlbgn+1},ILFONT,10 cfont 19,{dtlbgn},29,{dtlbgn+1},ICFONT,10 cfont 33,{dtlbgn},43,{dtlbgn+1},ICFONT,10 cfont 46,{dtlbgn},57,{dtlbgn+1},ICFONT,10 # dtl data cfont 2,{dtlbgn+2},15,MAXROWS,DBLFONT,10 cfont 17,{dtlbgn+2},29,MAXROWS,DBPFONT,10 cfont 31,{dtlbgn+2},43,MAXROWS,DBPFONT,10 cfont 45,{dtlbgn+2},57,MAXROWS,DBPFONT,10 endif # special hdrs font "!~ [0-9G ]@1,6,3,MAXROWS",-3,0,60,1,IBFONT,10 # special (Cont...) font "(Cont...)",0,0,9,1,IFONT,10 # totals erase "Total@38,6,67,MAXROWS",0,-1,MAXCOLS,1 box "Total@38,6,67,MAXROWS",7,-1,13,1 font "Total@38,6,67,MAXROWS",-30,0,36,1,IBRFONT,10,proper # footer font "GL Number Count",0,0,40,1,IBLFONT,10,proper font "End of Report",0,0,13,1,IBRFONT,10,proper [GLR750 ChartofAcnts] detect 0,1,"^GLR750" # 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 local MAX_COPIES=1 copies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "G/L Chart of Accounts" # view in pdf properties prepage { merge "zMrg load row 1 variables" merge "zMrg load row 2 variables" # load sub-title subtitle$="" if pagenum=1 then subtitle$=trim(cut(1,4,MAXCOLS,"")) # Facts 7.5 & 7.6 different detail layout if pagenum=1 then : descpos=pos("DESCRIPTION"=text$[6])+1 atpos=pos("TYPE"=text$[6])+1 mtpos=pos("MGMT TYPE"=text$[6])+1 if mtpos=1 then mtpos=MAXRCOLS endif } # leave first and last columns empty cmove 1,1,MAXCOLS,MAXROWS,2,1 hline "==" # header cerase 1,1,MAXCOLS,2 merge "zMrg report header" text 2,4,{PROPER(subtitle$)},IFONT,11 # detail heading cfont 2,5,{descpos-2},6,IFONT,10,proper cfont {descpos},5,{atpos-2},6,IFONT,10,proper cfont {atpos},4,{mtpos-2},6,IFONT,10,proper cfont {mtpos},4,MAXRCOLS,6,IFONT,10,proper # detail line enhancements cfont 2,7,{descpos-2},MAXROWS,10,DBFONT cfont {descpos},7,{atpos-2},MAXROWS,10,DFONT cfont {atpos},7,{mtpos-2},MAXROWS,DBFONT,10,proper cfont {mtpos},7,MAXRCOLS,MAXROWS,DBFONT,10,proper # footer font "ACCOUNTS:",0,0,20,1,IBLFONT,10,proper font "End of Report",0,0,13,1,IBRFONT,10,proper [GLR820 P&L] detect 0,1,"^~(GLR820)|(GLR828)" # set up document constants local MAXCOLS=135 # max cols to output local MAXRCOLS=134 # MAXCOLS-1 local LEFTCOL=1 # left vertical line local RIGHTCOL=135 # right vertical line local MAXROWS=60 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows local MAX_COPIES=1 copies MAX_COPIES landscape dpi 600 # see global constant above GSON # graphical shading title "G/L Profit & Loss" # view in pdf properties merge "zMrg g/l 0 init" # must come after zMrg g/l 0 init local FLDHDR=2 # of detail lines merge "zMrg g/l 1 header" # detail heading cfont 3,{hdrbtm-FLDHDR},19,{hdrbtm},IRFONT,proper # period end cfont 21,{hdrbtm-FLDHDR},28,{hdrbtm},IRFONT,proper # % cfont 30,{hdrbtm-FLDHDR},44,{hdrbtm},IRFONT,proper # period end cfont 46,{hdrbtm-FLDHDR},52,{hdrbtm},IRFONT,proper # % cfont 54,{hdrbtm-FLDHDR},84,{hdrbtm},IBFONT,proper # desc cfont 86,{hdrbtm-FLDHDR},100,{hdrbtm},IRFONT,proper # ytd cfont 102,{hdrbtm-FLDHDR},110,{hdrbtm},IRFONT,proper # % cfont 112,{hdrbtm-FLDHDR},126,{hdrbtm},IRFONT,proper # ytd cfont 128,{hdrbtm-FLDHDR},MAXRCOLS,{hdrbtm},IRFONT,proper # % # default detail line cfont 3,{hdrbtm+1},17,MAXROWS,DRFONT # period end cfont 21,{hdrbtm+1},27,MAXROWS,DRFONT # % cfont 29,{hdrbtm+1},42,MAXROWS,DRFONT # period end cfont 46,{hdrbtm+1},52,MAXROWS,DRFONT # % cfont 54,{hdrbtm+1},83,MAXROWS,DBFONT # desc cfont 86,{hdrbtm+1},99,MAXROWS,DRFONT # ytd cfont 103,{hdrbtm+1},109,MAXROWS,DRFONT # % cfont 111,{hdrbtm+1},124,MAXROWS,DRFONT # ytd cfont 128,{hdrbtm+1},MAXRCOLS,MAXROWS,DRFONT # % # must come after zMrg g/l 1 header merge "zMrg g/l 3 tag lines" # must come after zMrg g/l 3 tag lines local LNBGN=4 # start col for detail line local LNEND=134 # end col for detail line merge "zMrg g/l 4 acnt hdrs" merge "zMrg g/l 9 total boxes" # handle total rows (tL) font "tL@1,1,3,MAXROWS",3,0,14,1,DBRFONT # period end font "tL@1,1,3,MAXROWS",20,0,7,1,DBRFONT # % font "tL@1,1,3,MAXROWS",28,0,14,1,DBRFONT # period end font "tL@1,1,3,MAXROWS",45,0,7,1,DBRFONT # % font "tL@1,1,3,MAXROWS",53,0,30,1,DBFONT # desc font "tL@1,1,3,MAXROWS",85,0,14,1,DBRFONT # ytd font "tL@1,1,3,MAXROWS",102,0,7,1,DBRFONT # % font "tL@1,1,3,MAXROWS",110,0,14,1,DBRFONT # ytd font "tL@1,1,3,MAXROWS",127,0,7,1,DBRFONT [GLR822 P&L] detect 0,1,"^~(GLR822)|(GLR824)|(GLR826)|(GLR834)|(GLR836)|(GLR842)" # set up document constants local MAXCOLS=108 # max cols to output local MAXRCOLS=107 # MAXCOLS-1 local LEFTCOL=1 # left vertical line local RIGHTCOL=108 # right vertical line local MAXROWS=60 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows local MAX_COPIES=1 copies MAX_COPIES landscape dpi 600 # see global constant above GSON # graphical shading title "G/L Profit & Loss" # view in pdf properties merge "zMrg g/l 0 init" # must come after zMrg g/l 0 init local FLDHDR=2 # of detail lines merge "zMrg g/l 1 header" # detail heading cfont 3,{hdrbtm-FLDHDR},32,{hdrbtm},IBFONT,proper # desc cfont 34,{hdrbtm-FLDHDR},47,{hdrbtm},IRFONT,proper # period end cfont 50,{hdrbtm-FLDHDR},57,{hdrbtm},IRFONT,proper # % cfont 59,{hdrbtm-FLDHDR},72,{hdrbtm},IRFONT,proper # period end last yr cfont 75,{hdrbtm-FLDHDR},82,{hdrbtm},IRFONT,proper # % cfont 84,{hdrbtm-1},97,{hdrbtm},IRFONT,proper # var amt cfont 100,{hdrbtm-1},107,{hdrbtm},IRFONT,proper # var pct cfont 84,{hdrbtm-FLDHDR},107,{hdrbtm-FLDHDR},ICFONT,proper # var amt/pct # default detail line cfont 3,{hdrbtm+1},32,MAXROWS,DBFONT # desc cfont 34,{hdrbtm+1},47,MAXROWS,DRFONT # period end cfont 51,{hdrbtm+1},57,MAXROWS,DRFONT # % cfont 59,{hdrbtm+1},72,MAXROWS,DRFONT # period end last yr cfont 76,{hdrbtm+1},82,MAXROWS,DRFONT # % cfont 84,{hdrbtm+1},97,MAXROWS,DRFONT # var amt cfont 100,{hdrbtm+1},107,MAXROWS,DRFONT # var pct # must come after zMrg g/l 1 header merge "zMrg g/l 3 tag lines" # must come after zMrg g/l 3 tag lines local LNBGN=3 # start col for detail line local LNEND=107 # end col for detail line merge "zMrg g/l 4 acnt hdrs" merge "zMrg g/l 9 total boxes" # handle total rows (tL) #font "tL@1,1,3,MAXROWS",2,0,30,1,DBFONT,proper #font "tL@1,1,3,MAXROWS",33,0,14,1,DBRFONT font "tL@1,1,3,MAXROWS",2,0,30,1,DBFONT,proper # desc font "tL@1,1,3,MAXROWS",33,0,14,1,DBRFONT # period end font "tL@1,1,3,MAXROWS",50,0,7,1,DBRFONT # % font "tL@1,1,3,MAXROWS",58,0,14,1,DBRFONT # period end last yr font "tL@1,1,3,MAXROWS",75,0,7,1,DBRFONT # % font "tL@1,1,3,MAXROWS",83,0,14,DBRFONT # var amt font "tL@1,1,3,MAXROWS",99,0,7,1,DBRFONT # var pct [GLR824 P&L] # uses GLR822 rule set [GLR826 P&L] # uses GLR822 rule set [GLR828 P&L] # uses GLR820 rule set [GLR830 P&L] detect 0,1,"^GLR830" # set up document constants local MAXCOLS=135 # max cols to output local MAXRCOLS=134 # MAXCOLS-1 local LEFTCOL=1 # left vertical line local RIGHTCOL=135 # right vertical line local MAXROWS=60 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows local MAX_COPIES=1 copies MAX_COPIES landscape dpi 600 # see global constant above GSON # graphical shading title "G/L Profit & Loss" # view in pdf properties merge "zMrg g/l 0 init" # must come after zMrg g/l 0 init local FLDHDR=2 # of detail lines merge "zMrg g/l 1 header" # detail heading cfont 3,{hdrbtm-FLDHDR},14,{hdrbtm},IRFONT,proper # period end cfont 18,{hdrbtm-FLDHDR},28,{hdrbtm},IRFONT,proper # budget cfont 32,{hdrbtm-1},42,{hdrbtm},IRFONT,proper # var amt cfont 46,{hdrbtm-1},52,{hdrbtm},IRFONT,proper # var % cfont 38,{hdrbtm-FLDHDR},52,{hdrbtm-FLDHDR},ICFONT,proper # var amt/% cfont 54,{hdrbtm-FLDHDR},83,{hdrbtm},IBFONT,proper # desc cfont 86,{hdrbtm-FLDHDR},96,{hdrbtm},IRFONT,proper # ytd cfont 100,{hdrbtm-FLDHDR},110,{hdrbtm},IRFONT,proper # budget ytd cfont 114,{hdrbtm-1},125,{hdrbtm},IRFONT,proper # var amt cfont 128,{hdrbtm-1},MAXRCOLS,{hdrbtm},IRFONT,proper # var % cfont 119,{hdrbtm-FLDHDR},MAXRCOLS,{hdrbtm-FLDHDR},ICFONT,proper # var amt/% # default detail line cfont 4,{hdrbtm+1},14,MAXROWS,DRFONT # period end cfont 18,{hdrbtm+1},28,MAXROWS,DRFONT # budget cfont 32,{hdrbtm+1},42,MAXROWS,DRFONT # var amt cfont 45,{hdrbtm+1},52,MAXROWS,DRFONT # var % cfont 54,{hdrbtm+1},83,MAXROWS,DBFONT # desc cfont 86,{hdrbtm+1},96,MAXROWS,DRFONT # ytd cfont 100,{hdrbtm+1},110,MAXROWS,DRFONT # budget ytd cfont 114,{hdrbtm+1},124,MAXROWS,DRFONT # var amt cfont 127,{hdrbtm+1},MAXRCOLS,MAXROWS,DRFONT # var % # must come after zMrg g/l 1 header merge "zMrg g/l 3 tag lines" # must come after zMrg g/l 3 tag lines local LNBGN=3 # start col for detail line local LNEND=134 # end col for detail line merge "zMrg g/l 4 acnt hdrs" merge "zMrg g/l 9 total boxes" # handle total rows (tL) font "tL@1,1,3,MAXROWS",3,0,11,1,DBRFONT # period end font "tL@1,1,3,MAXROWS",17,0,11,1,DBRFONT # budget font "tL@1,1,3,MAXROWS",31,0,11,1,DBRFONT # var amt font "tL@1,1,3,MAXROWS",43,0,7,1,DBRFONT # var % font "tL@1,1,3,MAXROWS",53,0,30,1,DBFONT # desc font "tL@1,1,3,MAXROWS",85,0,11,1,DBRFONT # ytd font "tL@1,1,3,MAXROWS",99,0,11,1,DBRFONT # budget ytd font "tL@1,1,3,MAXROWS",113,0,11,1,DBRFONT # var amt font "tL@1,1,3,MAXROWS",126,0,8,1,DBRFONT [GLR832 P&L] detect 0,1,"^GLR832" # set up document constants local MAXCOLS=102 # max cols to output local MAXRCOLS=101 # MAXCOLS-1 local LEFTCOL=1 # left vertical line local RIGHTCOL=102 # right vertical line local MAXROWS=60 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows local MAX_COPIES=1 copies MAX_COPIES landscape dpi 600 # see global constant above GSON # graphical shading title "G/L Profit & Loss" # view in pdf properties merge "zMrg g/l 0 init" # must come after zMrg g/l 0 init local FLDHDR=2 # of detail lines merge "zMrg g/l 1 header" # detail heading cfont 4,{hdrbtm-FLDHDR},17,{hdrbtm},IRFONT,proper # period end cfont 21,{hdrbtm-FLDHDR},34,{hdrbtm},IRFONT,proper # prev period end cfont 38,{hdrbtm-FLDHDR},67,{hdrbtm},IBFONT,proper # desc cfont 71,{hdrbtm-FLDHDR},84,{hdrbtm},IRFONT,proper # ytd cfont 88,{hdrbtm-FLDHDR},MAXRCOLS,{hdrbtm},IRFONT,proper # prev ytd # default detail line cfont 4,{hdrbtm+1},17,MAXROWS,DRFONT # period end cfont 21,{hdrbtm+1},34,MAXROWS,DRFONT # prev period end cfont 38,{hdrbtm+1},67,MAXROWS,DBFONT # desc cfont 71,{hdrbtm+1},84,MAXROWS,DRFONT # ytd cfont 88,{hdrbtm+1},MAXRCOLS,MAXROWS,DRFONT # prev ytd # must come after zMrg g/l 1 header merge "zMrg g/l 3 tag lines" # must come after zMrg g/l 3 tag lines local LNBGN=3 # start col for detail line local LNEND=101 # end col for detail line merge "zMrg g/l 4 acnt hdrs" merge "zMrg g/l 9 total boxes" # handle total rows (tL) font "tL@1,1,3,MAXROWS",3,0,14,1,DBRFONT # period end font "tL@1,1,3,MAXROWS",20,0,14,1,DBRFONT # prev period end font "tL@1,1,3,MAXROWS",37,0,30,1,DBFONT # desc font "tL@1,1,3,MAXROWS",70,0,14,1,DBRFONT # ytd font "tL@1,1,3,MAXROWS",87,0,14,1,DBRFONT # prev ytd [GLR834 P&L] # uses GLR822 rule set [GLR836 P&L] # uses GLR822 rule set [GLR838 P&L] detect 0,1,"^GLR838" # set up document constants local MAXCOLS=89 # max cols to output local MAXRCOLS=88 # MAXCOLS-1 local LEFTCOL=1 # left vertical line local RIGHTCOL=89 # right vertical line local MAXROWS=60 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows local MAX_COPIES=1 copies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "G/L Profit & Loss" # view in pdf properties merge "zMrg g/l 0 init" # must come after zMrg g/l 0 init local FLDHDR=2 # of detail lines merge "zMrg g/l 1 header" # detail heading cfont 4,{hdrbtm-FLDHDR},17,{hdrbtm},IRFONT,proper # period end cfont 22,{hdrbtm-FLDHDR},28,{hdrbtm},IRFONT,proper # % cfont 64,{hdrbtm-FLDHDR},77,{hdrbtm},IRFONT,proper # ytd cfont 82,{hdrbtm-FLDHDR},MAXRCOLS,{hdrbtm},IRFONT,proper # % # default detail line cfont 4,{hdrbtm+1},17,MAXROWS,DRFONT # period end cfont 22,{hdrbtm+1},28,MAXROWS,DRFONT # % cfont 31,{hdrbtm+1},60,MAXROWS,DBFONT # desc cfont 64,{hdrbtm+1},77,MAXROWS,DRFONT # ytd cfont 82,{hdrbtm+1},MAXRCOLS,MAXROWS,DRFONT # % # must come after zMrg g/l 1 header merge "zMrg g/l 3 tag lines" # must come after zMrg g/l 3 tag lines local LNBGN=4 # start col for detail line local LNEND=88 # end col for detail line merge "zMrg g/l 4 acnt hdrs" merge "zMrg g/l 9 total boxes" # handle total rows (tL) font "tL@1,1,3,MAXROWS",3,0,14,1,DBRFONT # period end font "tL@1,1,3,MAXROWS",21,0,7,1,DBRFONT # % font "tL@1,1,3,MAXROWS",30,0,30,1,DBFONT # desc font "tL@1,1,3,MAXROWS",63,0,14,1,DBRFONT # ytd font "tL@1,1,3,MAXROWS",81,0,7,1,DBRFONT # % [GLR840 P&L] detect 0,1,"^~(GLR840)|(GLR848)" # 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=60 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows local MAX_COPIES=1 copies MAX_COPIES landscape dpi 600 # see global constant above GSON # graphical shading title "G/L Profit & Loss" # view in pdf properties merge "zMrg g/l 0 init" # must come after zMrg g/l 0 init local FLDHDR=1 # # of detail lines merge "zMrg g/l 1 header" # detail heading cfont 3,{hdrbtm-FLDHDR},12,{hdrbtm},IRFONT,proper # 1st period cfont 14,{hdrbtm-FLDHDR},23,{hdrbtm},IRFONT,proper # 2nd period cfont 25,{hdrbtm-FLDHDR},34,{hdrbtm},IRFONT,proper # 3rd period cfont 36,{hdrbtm-FLDHDR},45,{hdrbtm},IRFONT,proper # 4th period cfont 47,{hdrbtm-FLDHDR},56,{hdrbtm},IRFONT,proper # 5th period cfont 58,{hdrbtm-FLDHDR},67,{hdrbtm},IRFONT,proper # 6th period cfont 69,{hdrbtm-FLDHDR},78,{hdrbtm},IRFONT,proper # 7th period cfont 80,{hdrbtm-FLDHDR},89,{hdrbtm},IRFONT,proper # 8th period cfont 91,{hdrbtm-FLDHDR},100,{hdrbtm},IRFONT,proper # 9th period cfont 102,{hdrbtm-FLDHDR},111,{hdrbtm},IRFONT,proper # 10th period cfont 113,{hdrbtm-FLDHDR},122,{hdrbtm},IRFONT,proper # 11th period cfont 124,{hdrbtm-FLDHDR},MAXRCOLS,{hdrbtm},IRFONT,proper # 12th period # default detail line cfont 4,{hdrbtm+1},12,MAXROWS,DRFONT # 1st period cfont 15,{hdrbtm+1},23,MAXROWS,DRFONT # 2nd period cfont 26,{hdrbtm+1},34,MAXROWS,DRFONT # 3rd period cfont 37,{hdrbtm+1},45,MAXROWS,DRFONT # 4th period cfont 48,{hdrbtm+1},56,MAXROWS,DRFONT # 5th period cfont 59,{hdrbtm+1},67,MAXROWS,DRFONT # 6th period cfont 70,{hdrbtm+1},78,MAXROWS,DRFONT # 7th period cfont 81,{hdrbtm+1},89,MAXROWS,DRFONT # 8th period cfont 92,{hdrbtm+1},100,MAXROWS,DRFONT # 9th period cfont 103,{hdrbtm+1},111,MAXROWS,DRFONT # 10th period cfont 114,{hdrbtm+1},122,MAXROWS,DRFONT # 11th period cfont 125,{hdrbtm+1},MAXRCOLS,MAXROWS,DRFONT # 12th period # must come after zMrg g/l 1 header merge "zMrg g/l 3 tag lines" # must come after zMrg g/l 3 tag lines font "aD@1,1,3,MAXROWS",2,0,30,1,DBFONT local LNBGN=3 # start col for detail line local LNEND=133 # end col for detail line merge "zMrg g/l 4 acnt hdrs" merge "zMrg g/l 9 total boxes" # handle total rows (tL) font "tH@1,1,3,MAXROWS",2,0,MAXCOLS,1,DBFONT,proper font "tL@1,1,3,MAXROWS",3,0,9,1,DBRFONT # 1st period font "tL@1,1,3,MAXROWS",14,0,9,1,DBRFONT # 2nd period font "tL@1,1,3,MAXROWS",25,0,9,1,DBRFONT # 3rd period font "tL@1,1,3,MAXROWS",36,0,9,1,DBRFONT # 4th period font "tL@1,1,3,MAXROWS",47,0,9,1,DBRFONT # 5th period font "tL@1,1,3,MAXROWS",58,0,9,1,DBRFONT # 6th period font "tL@1,1,3,MAXROWS",69,0,9,1,DBRFONT # 7th period font "tL@1,1,3,MAXROWS",80,0,9,1,DBRFONT # 8th period font "tL@1,1,3,MAXROWS",91,0,9,1,DBRFONT # 9th period font "tL@1,1,3,MAXROWS",102,0,9,1,DBRFONT # 10th period font "tL@1,1,3,MAXROWS",113,0,9,1,DBRFONT # 11th period font "tL@1,1,3,MAXROWS",124,0,9,1,DBRFONT [GLR842 P&L] # uses GLR822 rule set [GLR844 P&L] detect 0,1,"^GLR844" # set up document constants local MAXCOLS=135 # max cols to output local MAXRCOLS=134 # MAXCOLS-1 local LEFTCOL=1 # left vertical line local RIGHTCOL=135 # right vertical line local MAXROWS=60 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows local MAX_COPIES=1 copies MAX_COPIES landscape dpi 600 # see global constant above GSON # graphical shading title "G/L Profit & Loss" # view in pdf properties merge "zMrg g/l 0 init" # must come after zMrg g/l 0 init local FLDHDR=1 # of detail lines merge "zMrg g/l 1 header" # detail heading cfont 3,{hdrbtm-FLDHDR},19,{hdrbtm},IBFONT,proper # desc cfont 21,{hdrbtm-FLDHDR},29,{hdrbtm},IRFONT,proper # 1st period cfont 32,{hdrbtm-FLDHDR},38,{hdrbtm},IRFONT,proper # % cfont 40,{hdrbtm-FLDHDR},48,{hdrbtm},IRFONT,proper # 2nd period cfont 52,{hdrbtm-FLDHDR},58,{hdrbtm},IRFONT,proper # % cfont 60,{hdrbtm-FLDHDR},68,{hdrbtm},IRFONT,proper # 3rd period cfont 71,{hdrbtm-FLDHDR},77,{hdrbtm},IRFONT,proper # % cfont 79,{hdrbtm-FLDHDR},87,{hdrbtm},IRFONT,proper # 4th period cfont 90,{hdrbtm-FLDHDR},96,{hdrbtm},IRFONT,proper # % cfont 98,{hdrbtm-FLDHDR},106,{hdrbtm},IRFONT,proper # 5th period cfont 109,{hdrbtm-FLDHDR},115,{hdrbtm},IRFONT,proper # % cfont 117,{hdrbtm-FLDHDR},125,{hdrbtm},IRFONT,proper # 6th period cfont 128,{hdrbtm-FLDHDR},MAXRCOLS,{hdrbtm},IRFONT,proper # % # default detail line cfont 3,{hdrbtm+1},19,MAXROWS,DBFONT # desc cfont 21,{hdrbtm+1},29,MAXROWS,DRFONT # 1st period cfont 32,{hdrbtm+1},38,MAXROWS,DRFONT # % cfont 40,{hdrbtm+1},48,MAXROWS,DRFONT # 2nd period cfont 52,{hdrbtm+1},58,MAXROWS,DRFONT # % cfont 60,{hdrbtm+1},68,MAXROWS,DRFONT # 3rd period cfont 71,{hdrbtm+1},77,MAXROWS,DRFONT # % cfont 79,{hdrbtm+1},87,MAXROWS,DRFONT # 4th period cfont 90,{hdrbtm+1},96,MAXROWS,DRFONT # % cfont 98,{hdrbtm+1},106,MAXROWS,DRFONT # 5th period cfont 109,{hdrbtm+1},115,MAXROWS,DRFONT # % cfont 117,{hdrbtm+1},125,MAXROWS,DRFONT # 6th period cfont 128,{hdrbtm+1},MAXRCOLS,MAXROWS,DRFONT # % # must come after zMrg g/l 1 header merge "zMrg g/l 3 tag lines" # must come after zMrg g/l 3 tag lines local LNBGN=3 # start col for detail line local LNEND=134 # end col for detail line merge "zMrg g/l 4 acnt hdrs" merge "zMrg g/l 9 total boxes" # handle total rows (tL) font "tL@1,1,3,MAXROWS",2,0,17,1,DBFONT # desc font "tL@1,1,3,MAXROWS",20,0,9,1,DBRFONT # 1st period font "tL@1,1,3,MAXROWS",31,0,7,1,DBRFONT # % font "tL@1,1,3,MAXROWS",39,0,9,1,DBRFONT # 2nd period font "tL@1,1,3,MAXROWS",51,0,7,1,DBRFONT # % font "tL@1,1,3,MAXROWS",59,0,9,1,DBRFONT # 3rd period font "tL@1,1,3,MAXROWS",70,0,7,1,DBRFONT # % font "tL@1,1,3,MAXROWS",78,0,9,1,DBRFONT # 4th period font "tL@1,1,3,MAXROWS",89,0,7,1,DBRFONT # % font "tL@1,1,3,MAXROWS",97,0,9,1,DBRFONT # 5th period font "tL@1,1,3,MAXROWS",108,0,7,1,DBRFONT # % font "tL@1,1,3,MAXROWS",116,0,9,1,DBRFONT # 6th period font "tL@1,1,3,MAXROWS",127,0,7,1,DBRFONT # % [GLR848 P&L] # uses GLR840 rule set [GLR850 BalSheet] detect 0,1,"^GLR850" # document options local MAXCOLS=82 local MAXRCOLS=81 local MAXROWS=66 local LEFTCOL=1 local RIGHTCOL=82 cols MAXCOLS rows MAXROWS local MAX_COPIES=1 copies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "G/L Balance Sheet" # view in pdf properties merge "zMrg g/l 0 init" # must come after zMrg g/l 0 init local FLDHDR=0 # # of detail hdr rows merge "zMrg g/l 1 header" # handle default detail rows cfont 23,{hdrbtm+1},52,MAXROWS,DFONT,10,proper cfont 54,{hdrbtm+1},67,MAXROWS,DBRFONT,10 # must come after zMrg g/l 1 header merge "zMrg g/l 3 tag lines" # must come after zMrg g/l 3 tag lines local LNBGN=23 # start col for detail line local LNEND=67 # end col for detail line merge "zMrg g/l 4 acnt hdrs" merge "zMrg g/l 9 total boxes" # handle total rows (tL) - boxes handled by gl total boxes font "tH@1,1,3,MAXROWS",22,0,30,1,DBFONT,11,proper font "tL@1,1,3,MAXROWS",22,0,30,1,DBFONT,11,proper font "tL@1,1,3,MAXROWS",53,0,14,1,DBRFONT,11 [GLR852 BalSheet] detect 0,1,"^GLR852" # 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 local MAX_COPIES=1 copies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "G/L Balance Sheet" # view in pdf properties merge "zMrg g/l 0 init" # must come after zMrg g/l 0 init local FLDHDR=1 # # of detail rows merge "zMrg g/l 1 header" # handle detail header cfont 46,{hdrbtm-FLDHDR},60,{hdrbtm},IRFONT,11 cfont 63,{hdrbtm-FLDHDR},78,{hdrbtm},IRFONT,11 # handle default detail rows cfont 15,{hdrbtm+1},44,MAXROWS,DFONT,10,proper cfont 46,{hdrbtm+1},59,MAXROWS,DBRFONT,10,proper cfont 63,{hdrbtm+1},77,MAXROWS,DBRFONT,10,proper # must come after zMrg g/l 1 header merge "zMrg g/l 3 tag lines" # must come after zMrg g/l 3 tag lines local LNBGN=15 # start col for detail line local LNEND=78 # end col for detail line merge "zMrg g/l 4 acnt hdrs" merge "zMrg g/l 9 total boxes" # handle total rows (tL) font "tL@1,1,3,MAXROWS",14,0,30,1,DBFONT,11,proper font "tL@1,1,3,MAXROWS",45,0,15,1,DBRFONT,11 font "tL@1,1,3,MAXROWS",62,0,15,1,DBRFONT,11 [GLR854 BalSheet] detect 0,1,"^GLR854" # 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 MAX_COPIES=1 copies MAX_COPIES landscape dpi 600 # see global constant above GSON # graphical shading title "G/L Balance Sheet" # view in pdf properties merge "zMrg g/l 0 init" # must come after zMrg g/l 0 init local FLDHDR=1 # of detail lines merge "zMrg g/l 1 header" # handle detail header cfont 15,{hdrbtm-FLDHDR},23,{hdrbtm},IRFONT,9,proper # 1st period cfont 25,{hdrbtm-FLDHDR},33,{hdrbtm},IRFONT,9,proper # 2nd period cfont 35,{hdrbtm-FLDHDR},43,{hdrbtm},IRFONT,9,proper # 3rd period cfont 45,{hdrbtm-FLDHDR},53,{hdrbtm},IRFONT,9,proper # 4th period cfont 55,{hdrbtm-FLDHDR},63,{hdrbtm},IRFONT,9,proper # 5th period cfont 65,{hdrbtm-FLDHDR},73,{hdrbtm},IRFONT,9,proper # 6th period cfont 75,{hdrbtm-FLDHDR},83,{hdrbtm},IRFONT,9,proper # 7th period cfont 85,{hdrbtm-FLDHDR},93,{hdrbtm},IRFONT,9,proper # 8th period cfont 95,{hdrbtm-FLDHDR},103,{hdrbtm},IRFONT,9,proper # 9th period cfont 105,{hdrbtm-FLDHDR},113,{hdrbtm},IRFONT,9,proper # 10th period cfont 115,{hdrbtm-FLDHDR},123,{hdrbtm},IRFONT,9,proper # 11th period cfont 125,{hdrbtm-FLDHDR},133,{hdrbtm},IRFONT,9,proper # handle default detail rows cfont 15,{hdrbtm+1},23,MAXROWS,DRFONT # 1st period cfont 25,{hdrbtm+1},33,MAXROWS,DRFONT # 2nd period cfont 35,{hdrbtm+1},43,MAXROWS,DRFONT # 3rd period cfont 45,{hdrbtm+1},53,MAXROWS,DRFONT # 4th period cfont 55,{hdrbtm+1},63,MAXROWS,DRFONT # 5th period cfont 65,{hdrbtm+1},73,MAXROWS,DRFONT # 6th period cfont 75,{hdrbtm+1},83,MAXROWS,DRFONT # 7th period cfont 85,{hdrbtm+1},93,MAXROWS,DRFONT # 8th period cfont 95,{hdrbtm+1},103,MAXROWS,DRFONT # 9th period cfont 105,{hdrbtm+1},113,MAXROWS,DRFONT # 10th period cfont 115,{hdrbtm+1},123,MAXROWS,DRFONT # 11th period cfont 125,{hdrbtm+1},133,MAXROWS,DRFONT # must come after zMrg g/l 1 header merge "zMrg g/l 3 tag lines" # must come after zMrg g/l 3 tag lines font "aD@1,1,3,MAXROWS",2,0,30,1,DBFONT local LNBGN=3 # start col for detail line local LNEND=133 # end col for detail line merge "zMrg g/l 4 acnt hdrs" merge "zMrg g/l 9 total boxes" # handle total rows (tL) font "tL@1,1,3,MAXROWS",14,0,9,1,DBRFONT # 1st period font "tL@1,1,3,MAXROWS",24,0,9,1,DBRFONT # 2nd period font "tL@1,1,3,MAXROWS",34,0,9,1,DBRFONT # 3rd period font "tL@1,1,3,MAXROWS",44,0,9,1,DBRFONT # 4th period font "tL@1,1,3,MAXROWS",54,0,9,1,DBRFONT # 5th period font "tL@1,1,3,MAXROWS",64,0,9,1,DBRFONT # 6th period font "tL@1,1,3,MAXROWS",74,0,9,1,DBRFONT # 7th period font "tL@1,1,3,MAXROWS",84,0,9,1,DBRFONT # 8th period font "tL@1,1,3,MAXROWS",94,0,9,1,DBRFONT # 9th period font "tL@1,1,3,MAXROWS",104,0,9,1,DBRFONT # 10th period font "tL@1,1,3,MAXROWS",114,0,9,1,DBRFONT # 11th period font "tL@1,1,3,MAXROWS",124,0,9,1,DBRFONT font "tD@1,1,3,MAXROWS",2,1,MAXCOLS,1,DBFONT [GLR856 BalSheet] detect 0,1,"^GLR856" # 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 MAX_COPIES=1 copies MAX_COPIES landscape dpi 600 # see global constant above GSON # graphical shading title "G/L Balance Sheet" # view in pdf properties merge "zMrg g/l 0 init" # must come after zMrg g/l 0 init local FLDHDR=1 # of detail lines merge "zMrg g/l 1 header" # handle detail header cfont 34,{hdrbtm-FLDHDR},47,{hdrbtm},IRFONT,9,proper # 1nd period cfont 51,{hdrbtm-FLDHDR},64,{hdrbtm},IRFONT,9,proper # 2rd period cfont 68,{hdrbtm-FLDHDR},81,{hdrbtm},IRFONT,9,proper # 3th period cfont 85,{hdrbtm-FLDHDR},98,{hdrbtm},IRFONT,9,proper # 4th period cfont 102,{hdrbtm-FLDHDR},115,{hdrbtm},IRFONT,9,proper # 5th period cfont 119,{hdrbtm-FLDHDR},132,{hdrbtm},IRFONT,9,proper # 6th period # handle default detail rows cfont 3,{hdrbtm+1},32,MAXROWS,DFONT cfont 34,{hdrbtm+1},47,MAXROWS,DRFONT # 1nd period cfont 51,{hdrbtm+1},64,MAXROWS,DRFONT # 2rd period cfont 68,{hdrbtm+1},81,MAXROWS,DRFONT # 3th period cfont 85,{hdrbtm+1},98,MAXROWS,DRFONT # 4th period cfont 102,{hdrbtm+1},115,MAXROWS,DRFONT # 5th period cfont 119,{hdrbtm+1},132,MAXROWS,DRFONT # 6th period # must come after zMrg g/l 1 header merge "zMrg g/l 3 tag lines" # must come after zMrg g/l 3 tag lines local LNBGN=3 # start col for detail line local LNEND=132 # end col for detail line merge "zMrg g/l 4 acnt hdrs" merge "zMrg g/l 9 total boxes" # handle total rows (tL) font "tL@1,1,3,MAXROWS",2,0,30,1,DBFONT,proper font "tL@1,1,3,MAXROWS",33,0,14,1,DBRFONT # 1nd period font "tL@1,1,3,MAXROWS",50,0,14,1,DBRFONT # 2rd period font "tL@1,1,3,MAXROWS",67,0,14,1,DBRFONT # 3th period font "tL@1,1,3,MAXROWS",84,0,14,1,DBRFONT # 4th period font "tL@1,1,3,MAXROWS",101,0,14,1,DBRFONT # 5th period font "tL@1,1,3,MAXROWS",118,0,14,1,DBRFONT # 6th period [GLR880 BalSheet] detect 0,1,"^GLR880" # set up document constants local MAXCOLS=83 # max cols to output local MAXRCOLS=82 # MAXCOLS-1 local LEFTCOL=1 # left vertical line local RIGHTCOL=83 # right vertical line local MAXROWS=66 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows local MAX_COPIES=1 copies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "G/L Balance Sheet" # view in pdf properties merge "zMrg g/l 0 init" # must come after zMrg g/l 0 init local FLDHDR=1 # of detail lines merge "zMrg g/l 1 header" # handle detail header prepage { if hdrbtm then : adcol=pos("ACCOUNT DESCRIPTION"=text$[hdrbtm-1]) endif } cfont 3,{hdrbtm-FLDHDR},6,{hdrbtm},ICFONT,10,proper # line # cfont 8,{hdrbtm-FLDHDR},8,{hdrbtm},ICFONT,10,proper # T cfont 10,{hdrbtm-FLDHDR},39,{hdrbtm},IFONT,10,proper # desc cfont 41,{hdrbtm-FLDHDR},{adcol-2},{hdrbtm},ICFONT,10 # g/l # cfont {adcol},{hdrbtm-FLDHDR},MAXRCOLS,{hdrbtm},10,IFONT,proper # acnt desc # handle default detail rows cfont 3,{hdrbtm+1},6,MAXROWS,DCFONT,10 # line # cfont 8,{hdrbtm+1},8,MAXROWS,DCFONT,10 # T cfont 10,{hdrbtm+1},39,MAXROWS,DFONT,10 # desc cfont 41,{hdrbtm+1},{adcol-2},MAXROWS,DCFONT,10 # g/l # cfont {adcol},{hdrbtm+1},MAXRCOLS,MAXROWS,10,DFONT # acnt desc # special handling hline "---",erase font " C @7,14,9,MAXROWS",3,0,80,1,DFONT font "Grp:",0,0,MAXCOLS,1,DFONT font "GRP:",0,0,MAXCOLS,1,DFONT font "Unused",0,0,36,1,DFONT,proper font "UNUSED",0,0,36,1,DFONT,10,proper # footer font "Total Unused",0,0,32,1,DFONT,10,proper # unused tot title font "Total Unused",39,0,3,1,DBFONT,10 # unused font "TOTAL UNUSED",0,0,32,1,DFONT,10,proper # unused tot title font "TOTAL UNUSED",39,0,3,1,DBFONT,10 # unused [IC] # top of IC rule sets [ICP310 XferTicket] detect 0,2,"^TRANSFER TICKET PRINT" # set up document constants local MAXCOLS=85 local MAXRCOLS=84 local LEFTCOL=1 # left vertical line local RIGHTCOL=85 # 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 local WAREHOUSE_COPY=1 local FILE_COPY=2 local MAX_COPIES=2 copies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "I/C Transfer Ticket" # view in pdf properties prejob { dim copy_title$[MAX_COPIES] if MAX_COPIES>=1 then copy_title$[WAREHOUSE_COPY]="Warehouse Copy" if MAX_COPIES>=2 then copy_title$[FILE_COPY]="Accounting Copy" } prepage { reprint$=trim(get(77,2,7)) doc_title$=trim(get(33,2,15)) xcol=20,xrow=3,xcols=46,tpos=2 merge "zMrg get company info" xrow=20 merge "zMrg get desc pos" xrow=22,yrow=62,ipos=2 merge "zMrg find memos" # check for continued xrow1=60,xrow2=MAXROWS merge "zMrg CheckContinued" if last_page then : btmrow=64 text$[65]=text$[63],text$[63]="" x$="cbox LEFTCOL,64,RIGHTCOL,MAXROWS,MBOXSIZE exec(x$) else x$=mset(1,62,MAXCOLS,5,"") btmrow=MAXROWS endif # watermark ztext$=doc_title$ zbrow=btmrow merge "zMrg watermark" } merge "zMrg DisplayCpyTitle" # erase columns ! vline "!!",erase # erase rows - or = hline "==",erase hline "--",erase hline "^^" # default line enhancement local BROW=22 local EROW=61 cfont 2,BROW,{desc_pos-2},EROW,DBFONT,IJUST # item cfont {desc_pos},BROW,42,EROW,DFONT # desc cfont 44,BROW,52,EROW,DBRFONT # ordered cfont 54,BROW,59,EROW,DBRFONT # ship cfont 61,BROW,65,EROW,DBRFONT # back cfont 67,BROW,68,EROW,DBCFONT # uom cfont 70,BROW,77,EROW,DBRFONT # wt cfont 79,BROW,MAXRCOLS,EROW,DBRFONT # loc # header section cerase 1,1,MAXCOLS,10 cbox LEFTCOL,1,RIGHTCOL,MAXROWS,MBOXSIZE,crows=10:MBOXSIZE merge "zMrg form header" # right header cbox 67,5.5,RIGHTCOL,10,1,ccols=75::ISHADE,crows=7 8.5 text 68,6.25,"Number",IFONT,cols=7 text 68,7.75,"Date",IFONT,cols=7 text 68,9.25,"Page",IFONT,cols=7 text 76,6.25,{trim(get(78,3,6))},DBFONT,cols=6 text 76,7.75,{trim(get(76,7,8))},DBFONT,cols=8 text 76,9.25,{trim(get(82,5,3))},DBFONT,cols=3 # to whse section cbox LEFTCOL,10,RIGHTCOL,15,MBOXSIZE,ccols=6::ISHADE 48 53::ISHADE text 2,11,"To",ICFONT,cols=4 text 2,12,"Whse:",ICFONT,cols=4 text 2,13,{trim(get(16,10,15))},DBCFONT,cols=4 text 7,11,{mcut(7,11,35,4,"","Y","Y")},DBFONT,cols=35 # ship to section text 49,11,"From",ICFONT,cols=4 text 49,12,"Whse:",ICFONT,cols=4 text 49,13,{trim(get(65,10,15))},DBCFONT,cols=4 text 54,11,{mcut(54,11,31,4,"","Y","Y")},DBFONT,cols=31 # ribbon 1 section cerase 17,16,17,18 cerase 26,16,26,18 cerase 36,16,36,18 cerase 69,16,69,18 cbox LEFTCOL,15,RIGHTCOL,19,MBOXSIZE,crows=17::ISHADE,ccols=17 26 36 69 cfont 2,16,16,16,ICFONT,proper # ref # cfont 18,16,25,16,ICFONT,proper # ordered dt cfont 27,16,35,16,ICFONT,proper # requested dt cfont 70,16,MAXRCOLS,16,ICFONT,proper # ship via cfont 2,18,16,18,DBCFONT # ref # cfont 18,18,25,18,DBCFONT # ordered dt cfont 27,18,35,18,DBCFONT # requested dt cfont 70,18,MAXRCOLS,18,DBCFONT # ship via # detail heading cerase {desc_pos-1},20,{desc_pos-1},61 erase "!@43,20,43,61",0,0,1,1 erase "!@53,20,53,61",0,0,1,1 erase "!@60,20,60,61",0,0,1,1 erase "!@66,20,66,61",0,0,1,1 erase "!@69,20,69,61",0,0,1,1 erase "!@78,20,78,61",0,0,1,1 cbox LEFTCOL,19,RIGHTCOL,{btmrow},MBOXSIZE,crows=21::DSHADE,ccols=53 60 66 69 78 cbox {desc_pos-1},19,{desc_pos-1},{btmrow} cfont 2,20,{desc_pos-2},20,IFONT,IJUST,proper # item cfont {desc_pos},20,42,20,IFONT,proper # desc cfont 44,20,52,20,IRFONT,proper # ordered cfont 54,20,59,20,IRFONT,proper # ship cfont 61,20,65,20,IRFONT,proper # back cfont 67,20,68,20,ICFONT # uom cfont 70,20,77,20,IRFONT,proper # wt cfont 79,20,MAXRCOLS,20,IRFONT,proper # loc # handle memo lines font "mL@2,22,25,61",3,0,80,1,DFONT # memo lns erase "mL@2,22,40,61",0,0,2,1 # spc chars # handle alternate location lines font "Alt Loc: ",0,0,8,1,DFONT # title font "Alt Loc: ",9,0,60,1,DBFONT # alt locs # footer box "TOTAL WEIGHT",-2,-1,25,2,1,icols=16::HSHADE font "TOTAL WEIGHT",0,0,14,1,IBRFONT,10,PROPER # title font "TOTAL WEIGHT",15,0,8,1,DBRFONT,10 # tot wt [ICR350 PoFill] detect 0,1,"ICR350" detect 0,2,"^PURCHASE ORDERS" # 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 MAX_COPIES=1 copies MAX_COPIES landscape dpi 600 # see global constant above GSON # graphical shading title "P/O Fill Report" # view in pdf properties prepage { merge "zMrg load row 1 variables" merge "zMrg load row 2 variables" if trim(get(20,7,20))="DESCRIPTION" then erow=7 if trim(get(20,5,20))="DESCRIPTION" then erow=5 } cmove 1,1,MAXCOLS,MAXROWS,2,1 # default enhancement line cfont 2,1,21,MAXROWS,DBRFONT # item # cfont 23,1,53,MAXROWS,DFONT # desc cfont 55,1,62,MAXROWS,DBRFONT # rcvd cfont 64,1,65,MAXROWS,DBCFONT # um cfont 67,1,72,MAXROWS,DBRFONT # order # cfont 74,1,76,MAXROWS,DBFONT # ln # cfont 78,1,79,MAXROWS,DBCFONT # p cfont 81,1,86,MAXROWS,DBCFONT # bin loc cfont 88,1,95,MAXROWS,DBCFONT # req date cfont 97,1,119,MAXROWS,DFONT # customer cfont 120,1,130,MAXROWS,DBRFONT # B/O + comm cfont 132,1,133,MAXROWS,DBCFONT # um # header merge "zMrg report header" # subheader cfont "~^[A-Z]@2,4,2,5",0,0,MAXRCOLS,1,IFONT # detail heading cfont 2,{erow-1},21,{erow},IRFONT,7,proper # item # cfont 23,{erow-1},53,{erow},IFONT,7,proper # desc cfont 55,{erow-1},62,{erow},IRFONT,7,proper # rcvd cfont 64,{erow-1},65,{erow},ICFONT,7,proper # um cfont 67,{erow-1},72,{erow},IRFONT,7,proper # order # cfont 74,{erow-1},76,{erow},IFONT,7,proper # ln # cfont 78,{erow-1},79,{erow},ICFONT,7,proper # p cfont 81,{erow-1},86,{erow},IFONT,7,proper # bin loc cfont 88,{erow-1},95,{erow},ICFONT,7,proper # req date cfont 97,{erow-1},119,{erow},IFONT,7,proper # customer cfont 120,{erow-1},130,{erow},IRFONT,7,black,proper # B/O + comm cfont 132,{erow-1},133,{erow},ICFONT,7,proper # um hline "==",extend # PO# line font "PO#:@1,1,MAXCOLS,MAXROWS",0,0,4,1,DFONT # po title font "PO#:@1,1,MAXCOLS,MAXROWS",5,0,7,1,DBFONT # po # font "Vendor:@1,1,MAXCOLS,MAXROWS",0,0,7,1,DRFONT # vndr title font "Vendor:@1,1,MAXCOLS,MAXROWS",8,0,45,1,DBFONT # vndr font "Whse:@1,1,MAXCOLS=1 then copy_title$[CUSTOMER_COPY]="Customer Copy" if MAX_COPIES>=2 then copy_title$[FILE_COPY]="Accounting Copy" if MAX_COPIES>=3 then copy_title$[INTERNAL_COPY]="Internal Copy" } prepage { #get header info for better placement doc_title$=trim(get(34,2,8)) reprint$=trim(get(72,2,7)) xcol=20,xrow=3,xcols=40,tpos=2 merge "zMrg get company info" # check for continued xrow1=62,xrow2=MAXROWS merge "zMrg CheckContinued" if last_page then : btmrow=64 x$ ="cbox LEFTCOL,64,RIGHTCOL,MAXROWS,MBOXSIZE" x$+=",ccols=13 20::HSHADE 32 38::HSHADE 47 51::HSHADE 62 68::HSHADE" exec(x$) x$="cbox 81,64,100,MAXROWS,MBOXSIZE,ccols=93" exec(x$) else x$=mset(1,64,MAXCOLS,3,"") btmrow=MAXROWS endif # watermark ztext$=doc_title$ zbrow=btmrow merge "zMrg watermark" } precopy { if copy=INTERNAL_COPY then cols$="100" if trim(get(83,3,8))<>"ESTIMATE" and copy=INTERNAL_COPY then skip=1 } merge "zMrg DisplayCpyTitle" # erase columns ! vline "!!",erase # erase rows - or = hline "==",erase hline "--",erase hline "^^" # erase cost section if not copy 3 if copy CUSTOMER_COPY,FILE_COPY cerase 81,1,100,MAXROWS end if # default line local BROW=26 local EROW=63 cfont 2,BROW,5,EROW,DBCFONT # code cfont 7,BROW,44,EROW,DFONT # desc cfont 46,BROW,54,EROW,DBRFONT # units cfont 56,BROW,57,EROW,DBCFONT # uom cfont 59,BROW,67,EROW,DBRFONT # price cfont 69,BROW,MAXRCOLS,EROW,DBRFONT # extension if copy INTERNAL_COPY cfont 82,BROW,92,EROW,DBRFONT # cost cfont 94,BROW,99,EROW,DBRFONT # gm end if # header section cerase 1,1,100,10 cbox LEFTCOL,1,RIGHTCOL,MAXROWS,MBOXSIZE,crows=10:MBOXSIZE if copy INTERNAL_COPY cbox 81,1,100,MAXROWS,MBOXSIZE end if merge "zMrg form header" text 1,9.5,{"Job: "+trim(get(8,8,40))},HCFONT,12,cols=MAXRCOLS # right header cbox 64,5.5,RIGHTCOL,10,1,ccols=72::ISHADE,crows=7 8.5 text 65,6.25,"Number",IFONT,cols=7 text 65,7.75,"Date",IFONT,cols=7 text 65,9.25,"Page",IFONT,cols=7 text 73,6.25,{trim(get(70,3,8))},DBFONT,cols=7 text 73,7.75,{trim(get(70,7,8))},DBFONT,cols=7 text 73,9.25,{trim(get(77,5,3))},DBFONT,cols=7 if copy INTERNAL_COPY cbox 81,1,100,6,1,ccols=90::ISHADE,crows=4 text 82,3,"Number",IFONT,cols=8 text 82,5,"Customer",IFONT,cols=8 text 92,3,{trim(get(70,3,8))},DBFONT,cols=7 text 92,5,{trim(get(58,10,20))},DBFONT,cols=7 end if # ship to section cbox LEFTCOL,10,RIGHTCOL,15,MBOXSIZE,ccols=10::ISHADE 41 50::ISHADE text 2,11,"Ship To:",ICFONT,cols=8 cmove 7,11,41,14,11,11 text 2,12,{trim(get(15,10,15))},DBCFONT,cols=8 cfont 11,11,41,14,DBFONT # ship to addr # bill to section text 42,11,"Bill To:",ICFONT,cols=8 cmove 49,11,MAXRCOLS,14,51,11 text 42,12,{trim(get(58,10,20))},DBCFONT,cols=8 cfont 51,11,MAXRCOLS,14,DBFONT # bill to addr # ribbon 1 section cerase 17,16,17,18 cerase 26,16,26,18 cerase 36,16,36,18 cerase 52,16,52,18 cerase 55,16,55,18 cerase 63,16,63,18 cbox LEFTCOL,15,RIGHTCOL,23,MBOXSIZE cbox LEFTCOL,15,RIGHTCOL,19,1,crows=17::ISHADE,ccols=17 26 36 52 55 63 cfont 2,16,16,16,ICFONT,proper # ref no cfont 18,16,25,16,ICFONT,proper # expires cfont 27,16,35,16,ICFONT,proper # estimator cfont 37,16,51,16,ICFONT,proper # terms cfont 53,16,54,16,ICFONT,proper # whs cfont 56,16,62,16,ICFONT,proper # frt cfont 64,16,MAXRCOLS,16,ICFONT,proper # ship via cfont 2,18,16,18,DBCFONT # ref # cfont 18,18,25,18,DBCFONT # expires cfont 27,18,35,18,DBCFONT # estimator cfont 37,18,51,18,DBCFONT # terms cfont 53,18,54,18,DBCFONT # whs cfont 56,18,62,18,DBCFONT # frt cfont 64,18,MAXRCOLS,18,DBCFONT # ship via # ribbon 2 section cerase 33,20,33,22 cerase 42,20,42,22 cerase 51,20,51,22 cbox LEFTCOL,19,RIGHTCOL,23,1,crows=21::ISHADE,ccols=33 42 51 cfont 2,20,32,20,ICFONT,proper # billing cfont 34,20,41,20,ICFONT,proper # start cfont 43,20,50,20,ICFONT,proper # finish cfont 52,20,MAXRCOLS,20,ICFONT,proper # units cfont 2,22,32,22,DBCFONT # billing cfont 34,22,41,22,DBCFONT # start cfont 43,22,50,22,DBCFONT # finish cfont 52,22,MAXRCOLS,22,DBCFONT # units # detail cerase 6,24,6,63 cerase 45,24,45,63 cerase 55,24,55,63 cerase 58,24,58,63 cerase 68,24,68,63 cerase 83,24,83,63 cerase 93,24,93,63 cbox LEFTCOL,23,RIGHTCOL,{btmrow},MBOXSIZE,crows=25::DSHADE,ccols=6 45 55 58 68 cfont 2,24,5,24,ICFONT,proper # code cfont 7,24,44,24,IFONT,proper # desc cfont 46,24,54,24,IRFONT,proper # units cfont 56,24,57,24,ICFONT # uom cfont 59,24,67,24,IRFONT,proper # price cfont 69,24,MAXRCOLS,24,IRFONT,proper # extension if copy INTERNAL_COPY cbox 81,23,100,{btmrow},MBOXSIZE,crows=25::DSHADE,ccols=93 cfont 82,24,92,24,IRFONT,proper # cost cfont 94,24,99,24,IRFONT,proper # gm end if # footer cerase LEFTCOL,64,100,64 cerase 9,64,9,MAXROWS cerase 30,64,30,MAXROWS cerase 47,64,47,MAXROWS cerase 61,64,61,MAXROWS cerase 93,64,93,MAXROWS cfont 10,65,19,65,IBRFONT,proper # subtot cfont 31,65,37,65,IBRFONT,proper # frt cfont 48,65,50,65,IBRFONT,proper # tax cfont 62,65,67,65,IBRFONT,10,proper # tot cfont 21,65,29,65,DBLFONT # subtot cfont 39,65,46,65,DBLFONT # frt cfont 52,65,60,65,DBLFONT # tax cfont 69,65,MAXRCOLS,65,DBRFONT,10 if copy INTERNAL_COPY cfont 82,65,92,65,DBRFONT,9 # tot cost cfont 94,63,99,65,DBRFONT # gm end if [JCP410 Invoice] detect 0,2,"^INVOICE" detect 0,16,"^JOB#" # set up document constants local MAXCOLS=80 # max cols to output local MAXRCOLS=79 # MAXCOLS-1 local LEFTCOL=1 # left vertical line local RIGHTCOL=80 # 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 local CUSTOMER_COPY=1 local FILE_COPY=2 local INTERNAL_COPY=3 local MAX_COPIES=3 copies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "J/C Invoice" # view in pdf properties prejob { 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]="Accounting Copy" if MAX_COPIES>=3 then copy_title$[INTERNAL_COPY]="Internal Copy" } prepage { doc_title$=trim(get(40,2,7)) reprint$=trim(get(70,2,7)) xcol=20,xrow=3,xcols=40,tpos=2 merge "zMrg get company info" # check for continued xrow1=61,xrow2=MAXROWS merge "zMrg CheckContinued" if last_page then : btmrow=60 x$ ="cbox 36,60,RIGHTCOL,64,1" x$+=",crows=62::ISHADE,ccols=48 57 67" exec(x$) else x$=mset(1,60,MAXCOLS,7,"") btmrow=MAXROWS endif # watermark ztext$=doc_title$ zbrow=btmrow merge "zMrg watermark" } precopy { if copy=INTERNAL_COPY then cols$="100" if trim(get(83,3,7))<>"INVOICE" and copy=INTERNAL_COPY then skip=1 if last_page and copy=INTERNAL_COPY then : x$="cbox 81,60,100,64,1,crows=62::HSHADE,ccols=93" exec(x$) endif } merge "zMrg DisplayCpyTitle" # erase columns ! vline "!!",erase # erase rows - or = hline "==",erase hline "--",erase hline "^^" # erase cost section if not copy 3 if copy CUSTOMER_COPY,FILE_COPY cerase 81,1,100,MAXROWS end if # default line local BROW=26 local EROW=60 cfont 2,BROW,67,EROW,DFONT # desc cfont 69,BROW,MAXRCOLS,EROW,DBRFONT # amt if copy INTERNAL_COPY cfont 82,26,92,63,DBRFONT # cost cfont 94,26,99,63,DBRFONT # gm end if # header section cerase 1,1,100,10 cbox LEFTCOL,1,RIGHTCOL,MAXROWS,MBOXSIZE,crows=10:MBOXSIZE if copy INTERNAL_COPY cbox 81,1,100,MAXROWS,MBOXSIZE end if merge "zMrg form header" # right header cbox 64,5.5,RIGHTCOL,10,1,crows=7 8.5,ccols=72::ISHADE text 65,6.25,"Number",IFONT,cols=7 text 65,7.75,"Date",IFONT,cols=7 text 65,9.25,"Page",IFONT,cols=7 text 73,6.25,{trim(get(70,3,8))},DBFONT,cols=8 text 73,7.75,{trim(get(71,7,8))},DBFONT,cols=8 text 73,9.25,{trim(get(70,5,3))},DBFONT,cols=3 if copy INTERNAL_COPY cbox 81,1,100,8,1,crows=4 6,ccols=90::ISHADE text 82,3,"Invoice #",IFONT,cols=8 text 82,5,"Job #",IFONT,cols=8 text 82,7,"Customer",IFONT,cols=8 text 92,3,{trim(get(70,3,8))},DBFONT,cols=8 text 92,5,{trim(get(91,5,8))},DBFONT,cols=8 text 92,7,{trim(get(16,10,25))},DBFONT,cols=25 end if # bill to section cbox LEFTCOL,10,RIGHTCOL,15,MBOXSIZE,ccols=10::ISHADE 41 50::ISHADE text 2,11,"Bill To:",ICFONT,cols=8 text 2,12,{trim(get(16,10,25))},DBCFONT,cols=8 cmove 7,11,41,14,11,11 cfont 11,11,40,14,DBFONT # bill to addr # ship to section text 42,11,"Ship To:",ICFONT,cols=8 text 42,12,{trim(get(57,10,15))},DBCFONT,cols=8 cmove 49,11,MAXRCOLS,14,51,11 cfont 51,11,MAXRCOLS,14,DBFONT # ship to addr # ribbon 1 section cerase 10,15,10,19 cerase 41,15,41,19 cerase 52,15,52,19 cbox LEFTCOL,15,RIGHTCOL,23,MBOXSIZE cbox LEFTCOL,15,RIGHTCOL,19,crows=17::ISHADE,ccols=10 41 52 cfont 2,16,9,16,ICFONT,proper # job # cfont 11,16,40,16,ICFONT,proper # name cfont 42,16,51,16,ICFONT,proper # contract # cfont 53,16,MAXRCOLS,16,ICFONT,proper # manager cfont 2,18,9,18,DBCFONT # job # cfont 11,18,40,18,DBCFONT # name cfont 42,18,51,18,DBCFONT # contract # cfont 53,18,MAXRCOLS,18,DBCFONT # manager # ribbon 2 section cerase 17,20,17,22 cerase 23,20,23,22 cerase 39,20,39,22 cerase 48,20,48,22 cerase 51,20,51,22 cbox LEFTCOL,19,RIGHTCOL,23,crows=21::ISHADE,ccols=17 23 39 48 51 cfont 2,20,16,20,ICFONT,proper # ref # cfont 18,20,22,20,ICFONT,proper # salesperson cfont 24,20,38,20,ICFONT,proper # terms cfont 40,20,47,20,ICFONT,proper # tax code cfont 49,20,50,20,ICFONT,proper # whs cfont 52,20,MAXRCOLS,20,ICFONT,proper # billing cfont 2,22,16,22,DBCFONT # ref # cfont 18,22,22,22,DBCFONT # salesperson cfont 24,22,38,22,DBCFONT # terms cfont 40,22,47,22,DBCFONT # tax code cfont 49,22,50,22,DBCFONT # whs cfont 52,22,MAXRCOLS,22,DBCFONT # billing # detail cerase 68,24,68,60 cerase 83,24,83,60 cerase 93,24,93,60 cbox LEFTCOL,23,RIGHTCOL,{btmrow},MBOXSIZE,crows=25::DSHADE,ccols=68 cfont 2,24,67,24,IFONT,proper # desc cfont 69,24,MAXRCOLS,24,IRFONT,proper # amt if copy INTERNAL_COPY cbox 81,23,100,{btmrow},MBOXSIZE,crows=25::DSHADE,ccols=93 cfont 82,24,92,24,IRFONT,proper # cost cfont 94,24,99,24,IRFONT,proper # gm end if # footer cerase 36,62,100,62 cerase 36,64,100,64 cerase 36,61,36,64 cerase 48,61,48,63 cerase 57,61,57,63 cerase 67,61,67,63 cerase 93,61,93,63 cfont 37,61,47,61,IBRFONT,proper # amt cfont 50,61,56,61,IBRFONT,proper # frt cfont 58,61,66,61,IBRFONT,proper # tax cfont 68,61,MAXRCOLS,61,IBRFONT,10,proper # tot due cfont 37,63,47,63,DBRFONT # amt cfont 50,63,56,63,DBRFONT # frt cfont 58,63,66,63,DBRFONT # tax cfont 68,63,MAXRCOLS,63,DBRFONT,10 if copy INTERNAL_COPY cfont 82,61,92,61,IBRFONT,9,proper # tot cost cfont 94,61,99,61,IBRFONT,proper # gm cfont 82,63,92,63,DBRFONT,9 # tot cost cfont 94,63,99,63,DBRFONT # gm end if cfont 2,61,35,64,DFONT cfont 2,65,MAXRCOLS,65,DFONT [MC] # top of MC rule sets [MCP110 ProdTicket] detect 0,3,"^PRODUCTION TICKET" # set up document constants local MAXCOLS=80 # max cols to output local MAXRCOLS=79 # MAXCOLS-1 local LEFTCOL=1 # left vertical line local RIGHTCOL=80 # 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 local WHSE_COPY=1 local FILE_COPY=2 local MAX_COPIES=2 copies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "M/C Production Ticket" # view in pdf properties prejob { dim copy_title$[MAX_COPIES] if MAX_COPIES>=1 then copy_title$[WHSE_COPY]="Warehouse Copy" if MAX_COPIES>=2 then copy_title$[FILE_COPY]="Accounting Copy" } prepage { #get header info for better placement doc_title$=trim(get(20,3,40)) xrow=10 merge "zMrg get desc pos" xrow=12,yrow=62,ipos=6 merge "zMrg find memos" # check for continued docid$=get(70,2,8,1) docdate$=get(70,3,8,1) docwhse$=get(70,4,8,1) next_docid$=get(70,2,8,1,pagenum+1) next_docdate$=get(70,3,8,1,pagenum+1) next_docwhse$=get(70,4,8,1,pagenum+1) cont$="Continued on next page ..." if docid$<>next_docid$ or docdate$<>next_docdate$ or docwhse$<>next_docwhse$ then : cont$="... Last Page" endif # display continued or last page cnt$ ="text 1,"+str(MAXROWS+.5)+","+$22$+cont$+$22$ cnt$+=",HBRFONT,10,cols="+str(MAXCOLS-1) exec(cnt$) # watermark ztext$=doc_title$ zbrow=61 merge "zMrg watermark" } merge "zMrg DisplayCpyTitle" # erase columns ! vline "!!",erase # erase rows - or = hline "==",erase hline "--",erase hline "^^" # default detail line local BROW=12 local EROW=61 cfont 2,BROW,4,EROW,DCFONT # line # cfont 6,BROW,{desc_pos-2},EROW,DBFONT,IJUST # item cfont {desc_pos},BROW,42,EROW,DFONT # desc cfont 44,BROW,52,EROW,DBRFONT # units cfont 54,BROW,55,EROW,DBCFONT # um cfont 57,BROW,MAXRCOLS,EROW,DFONT # memo # header section cerase 1,1,MAXCOLS,5 cbox LEFTCOL,1,RIGHTCOL,MAXROWS,MBOXSIZE,crows=9:MBOXSIZE text 1,2,{doc_title$},HBCFONT,16,cols=MAXRCOLS text 1,4,{trim(get(20,2,40))},HBCFONT,14,cols=MAXRCOLS cfont 2,6,MAXRCOLS,6,IBFONT cfont 2,8,MAXRCOLS,8,IBFONT # right header cbox 65,3.5,RIGHTCOL,8,crows=5 6.5,ccols=73::ISHADE text 66,4.25,"Number",IFONT,cols=7 text 66,5.75,"Date",IFONT,cols=7 text 66,7.25,"Whse",IFONT,cols=7 text 74,4.25,{trim(get(70,2,6))},DBFONT,cols=6 text 74,5.75,{trim(get(70,3,8))},DBFONT,cols=8 text 74,7.25,{trim(get(70,4,2))},DBFONT,cols=2 # detail heading cbox LEFTCOL,9,RIGHTCOL,61,MBOXSIZE,crows=11::DSHADE,ccols=5 53 56 cbox {desc_pos-1},9,{desc_pos-1},61 text 2,10,"Ln#",ICFONT,cols=3 cfont 6,10,{desc_pos-2},10,IFONT,IJUST,proper # item cfont {desc_pos},10,42,10,IFONT,proper # desc cfont 44,10,52,10,IRFONT,proper # units cfont 54,10,55,10,ICFONT # um cfont 57,10,MAXRCOLS,10,IFONT,proper # memo # detail exceptions font "mL@1,12,27,61",3,0,60,1,DFONT,black # memo lines erase "mL@1,12,27,61",0,0,2,1 # spec chars # footer cbox LEFTCOL,61,RIGHTCOL,MAXROWS,MBOXSIZE cfont 1,64,MAXRCOLS,64,DRFONT cerase 1,63,MAXCOLS,MAXROWS text 3,64,"Date:",DBFONT cbox 7,64.5,36,64.5,MBOXSIZE text 40,64,"Initials:",DBFONT cbox 45,64.5,76,64.5,MBOXSIZE [MCP210 FormProdTicket] detect 0,3,"^FORMULATION PRODUCTION TICKET" # set up document constants local MAXCOLS=80 # max cols to output local MAXRCOLS=79 # MAXCOLS-1 local LEFTCOL=1 # left vertical line local RIGHTCOL=80 # 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 local WHSE_COPY=1 local FILE_COPY=2 local MAX_COPIES=2 copies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "M/C Formulation Production Ticket" # view in pdf properties prejob { dim copy_title$[MAX_COPIES] if MAX_COPIES>=1 then copy_title$[WHSE_COPY]="Warehouse Copy" if MAX_COPIES>=2 then copy_title$[FILE_COPY]="Accounting Copy" } prepage { #get header info for better placement doc_title$=trim(get(20,3,40)) xrow=10 merge "zMrg get desc pos" xrow=12,yrow=62,ipos=6 merge "zMrg find memos" # check for continued docid$=get(70,2,8,1) docdate$=get(70,3,8,1) docwhse$=get(70,4,8,1) next_docid$=get(70,2,8,1,pagenum+1) next_docdate$=get(70,3,8,1,pagenum+1) next_docwhse$=get(70,4,8,1,pagenum+1) cont$="Continued on next page ..." if docid$<>next_docid$ or docdate$<>next_docdate$ or docwhse$<>next_docwhse$ then : cont$="... Last Page" endif # display continued or last page cnt$ ="text 1,"+str(MAXROWS+.5)+","+$22$+cont$+$22$ cnt$+=",HBRFONT,10,cols="+str(MAXCOLS-1) exec(cnt$) # watermark ztext$=doc_title$ zbrow=61 merge "zMrg watermark" } merge "zMrg DisplayCpyTitle" # erase columns ! vline "!!",erase # erase rows - or = hline "==",erase hline "--",erase hline "^^" # default detail line local BROW=12 local EROW=61 cfont 2,BROW,4,EROW,DCFONT # line # cfont 6,BROW,{desc_pos-2},EROW,DBFONT,IJUST # item cfont {desc_pos},BROW,42,EROW,DFONT # desc cfont 44,BROW,52,EROW,DBRFONT # units cfont 54,BROW,55,EROW,DBCFONT # um cfont 57,BROW,MAXRCOLS,EROW,DFONT # memo # header section cerase 1,1,MAXCOLS,5 cbox LEFTCOL,1,RIGHTCOL,MAXROWS,MBOXSIZE,crows=9:MBOXSIZE text 1,2,{doc_title$},HBCFONT,16,cols=MAXRCOLS text 1,4,{trim(get(20,2,40))},HBCFONT,14,cols=MAXRCOLS cfont 2,6,MAXRCOLS,6,IBFONT cfont 2,8,MAXRCOLS,8,IBFONT # right header cbox 68,3.5,RIGHTCOL,8,crows=5 6.5,ccols=73::ISHADE text 69,4.25,"Number",IFONT,cols=7 text 69,5.75,"Date",IFONT,cols=7 text 69,7.25,"Whse",IFONT,cols=7 text 74,4.25,{trim(get(70,2,6))},DBFONT,cols=6 text 74,5.75,{trim(get(70,3,8))},DBFONT,cols=8 text 74,7.25,{trim(get(70,4,2))},DBFONT,cols=2 # detail heading cbox LEFTCOL,9,RIGHTCOL,61,MBOXSIZE,crows=11::DSHADE,ccols=5 53 56 cbox {desc_pos-1},9,{desc_pos-1},61 text 2,10,"Ln#",ICFONT,cols=3 cfont 6,10,{desc_pos-2},10,IFONT,IJUST,proper # item cfont {desc_pos},10,42,10,IFONT,proper # desc cfont 44,10,52,10,IRFONT,proper # units cfont 54,10,55,10,ICFONT # um cfont 57,10,MAXRCOLS,10,IFONT,proper # memo # detail exceptions font "mL@1,12,27,61",3,0,60,1,DLFONT,8 # memo lines erase "mL@1,12,27,61",0,0,2,1 # spec chars # finished item section font "Finished Item:",0,0,14,1,DBFONT font "Finished Item:",15,0,60,1,DLFONT font "Produce:",0,0,8,1,DBFONT font "Produce:",9,0,12,1,DLFONT font "Formula Required:",0,0,17,1,DBFONT font "Formula Required:",18,0,12,1,DLFONT font "Memo:",0,0,5,1,DBFONT font "Memo:",6,0,60,1,DLFONT # footer cbox LEFTCOL,61,RIGHTCOL,MAXROWS,MBOXSIZE cfont 1,64,MAXRCOLS,64,DRFONT cerase 1,63,MAXCOLS,MAXROWS text 3,64,"Date:",DBFONT cbox 7,64.5,36,64.5,MBOXSIZE text 40,64,"Initials:",DBFONT cbox 45,64.5,76,64.5,MBOXSIZE [PO] # top of PO rule sets [POP110 PurchaseOrder] detect 0,2,"^PURCHASE ORDER" detect 0,7,"~DATEMASK" # set up document constants local MAXCOLS=100 local MAXRCOLS=99 local LEFTCOL=1 # left vertical line local RIGHTCOL=100 # 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 local VENDOR_COPY=1 local FILE_COPY=2 local MAX_COPIES=2 copies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "P/O Purchase Order" # view in pdf properties prejob { 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]="Accounting Copy" } prepage { reprint$=trim(get(91,2,7)) doc_title$=trim(get(35,2,40)) xcol=35,xrow=3,xcols=40,tpos=2 merge "zMrg get company info" xrow=20 merge "zMrg get desc pos" icol1=2,icol2=desc_pos-2 vcol1=2,vcol2=desc_pos-2 # check for vendor item & item x=pos("!"=text$[20],1,0) # x=9 means both if x=9 then x=pos("!"=text$[20],1,2),icol1=x+1,vcol2=x-1 xrow=22,yrow=60,ipos=2 merge "zMrg find memos" cust_code$="" shipto_code$=trim(get(69,10,20)) x=pos(" "=shipto_code$) if x then : cust_code$=shipto_code$(x+1) shipto_code$=shipto_code$(1,x-1) endif # check for continued xrow1=61,xrow2=MAXROWS merge "zMrg CheckContinued" if last_page then : btmrow=60 x$ ="cbox 56,60,RIGHTCOL,64,1" x$+=",crows=62::ISHADE,ccols=68 78 87" exec(x$) else x$=mset(1,61,MAXCOLS,6,"") btmrow=MAXROWS endif # watermark ztext$=doc_title$ zbrow=btmrow merge "zMrg watermark" } merge "zMrg DisplayCpyTitle" # erase columns ! vline "!!",erase # erase rows - or = hline "==",erase hline "--",erase hline "^^" # default line enhancement local BROW=22 local EROW=59 cfont {vcol1},BROW,{vcol2},EROW,DBFONT,IJUST,8 # vndr-item cfont {icol1},BROW,{icol2},EROW,DBFONT,IJUST,8 # item cfont {desc_pos},BROW,63,EROW,DFONT,8 # desc cfont 64,BROW,72,EROW,DBRFONT # units cfont 74,BROW,75,EROW,DBCFONT # uom cfont 77,BROW,85,EROW,DBRFONT # cost cfont 87,BROW,88,EROW,DBCFONT # uom cfont 90,BROW,MAXRCOLS,EROW,DBRFONT # extension # header section cerase 1,1,MAXCOLS,10 cbox LEFTCOL,1,RIGHTCOL,MAXROWS,MBOXSIZE,crows=10:MBOXSIZE merge "zMrg form header" # handle Reprint cfont 91,2,99,2,DBRFONT,11 # right header cbox 80,5.25,RIGHTCOL,8.75,1,crows=6.25 7.5,ccols=90::ISHADE text 81,5.75,"Number",IFONT,cols=9 text 81,7,"Date",IFONT,cols=9 text 81,8.25,"Page",IFONT,cols=9 text 91,5.75,{trim(get(92,3,6))},DBFONT,cols=6 text 91,7,{trim(get(89,7,10))},DBFONT,cols=8 text 91,8.25,{trim(get(97,5,3))},DBFONT,cols=3 text 81,9.25,{trim(cut(81,8,19,""))},DBRFONT,cols=19 # confirm text 81,10.25,{trim(cut(81,9,19,""))},DBRFONT,cols=19 # acknowledgement # vendor section cbox LEFTCOL,10,RIGHTCOL,15,MBOXSIZE,1,ccols=12::ISHADE 51 62::ISHADE text 2,11,"Vendor:",ICFONT,cols=10 text 2,12,{trim(get(19,10,25))},DBCFONT,cols=9,fit text 13,11,{mcut(12,11,30,4,"","Y","Y")},DBFONT,cols=30 # ship to section text 52,11,"Ship To:",ICFONT,cols=10 text 52,12,{shipto_code$},DBCFONT,cols=10,fit text 52,13,{cust_code$},DBCFONT,cols=10,fit text 63,11,{mcut(61,11,30,4,"","Y","Y")},DBFONT,cols=30 # ribbon section cerase 7,16,7,18 cerase 23,16,23,18 cerase 39,16,39,18 cerase 55,16,55,18 cerase 63,16,63,18 cerase 79,16,79,18 cerase 88,16,88,18 cbox LEFTCOL,15,RIGHTCOL,19,MBOXSIZE,1,crows=17::ISHADE,ccols=7 23 39 55 63 79 88 cfont 2,16,6,16,ICFONT,proper # buyer cfont 8,16,22,16,ICFONT,proper # terms cfont 24,16,38,16,ICFONT,proper # ship via cfont 40,16,54,16,ICFONT # fob cfont 56,16,62,16,ICFONT,proper # frt cfont 64,16,78,16,ICFONT,proper # ref # cfont 80,16,87,16,ICFONT,proper # expected dt cfont 89,16,MAXRCOLS,16,ICFONT,proper # customer text 2,18,{cut(2,18,5,"")},DBCFONT,cols=5 # buyer text 8,18,{cut(8,18,15,"")},DBCFONT,cols=15 # terms text 24,18,{cut(24,18,15,"")},DBCFONT,cols=15 # ship via text 40,18,{cut(40,18,15,"")},DBCFONT,cols=15 # fob text 56,18,{cut(56,18,7,"")},DBCFONT,cols=7 # frt text 64,18,{cut(64,18,15,"")},DBCFONT,cols=15 # ref # text 80,18,{cut(80,18,8,"")},DBCFONT,cols=8 # expected dt text 89,18,{cut(89,18,11,"")},DBCFONT,cols=11 # customer # detail erase "!@vcol2+1,20,vcol2+1,60",0,0,1,1 erase "!@desc_pos-1,20,desc_pos-1,60",0,0,1,1 erase "!@63,20,63,60",0,0,1,1 erase "!@73,20,73,60",0,0,1,1 erase "!@76,20,76,60",0,0,1,1 erase "!@86,20,86,60",0,0,1,1 erase "!@89,20,69,80",0,0,1,1 cbox LEFTCOL,19,RIGHTCOL,{btmrow},MBOXSIZE,crows=21::DSHADE,ccols=73 76 86 89 cbox {vcol2+1},19,{desc_pos-1},{btmrow} # detail headers cfont {vcol1},20,{vcol2},20,IFONT,IJUST,proper # vndr-item cfont {icol1},20,{icol2},20,IFONT,IJUST,proper # item cfont {desc_pos},20,63,20,IFONT,proper # desc cfont 64,20,72,20,IRFONT,proper # units cfont 74,20,75,20,ICFONT # uom cfont 77,20,85,20,IRFONT,proper # cost cfont 87,20,88,20,ICFONT # uom cfont 90,20,MAXRCOLS,20,IRFONT,proper # extension # handle line remarks font "mL@1,22,63,59",3,0,80,1,DFONT,8 # memo lines erase "mL@1,22,63,59",0,0,2,1 # spec chars # footer cerase 56,62,MAXCOLS,62 cerase 56,64,MAXCOLS,64 cerase 56,60,56,64 cerase 68,60,68,64 cerase 78,60,78,64 cerase 87,60,87,64 cfont 57,61,67,61,IBRFONT,proper # amt cfont 69,61,77,61,IBRFONT,proper # tax cfont 79,61,86,61,IBRFONT,proper # frt cfont 88,61,MAXRCOLS,61,IBRFONT,9,proper # tot cfont 57,63,67,63,DBRFONT # amt cfont 69,63,77,63,DBRFONT # tax cfont 79,63,86,63,DBRFONT # frt cfont 88,63,MAXRCOLS,63,DBRFONT,9 # tot cfont 2,61,55,65,IFONT # comments cfont 57,65,MAXRCOLS,65,ILFONT # resale license [PR] # top of PR rule sets [PRP210 CheckLongStub] detect 51,2,"~ [0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][0-9][0-9]" detect 66,49,"~ DATEMASK.." # set up document constants local MAXCOLS=83 # max cols to output local MAXRCOLS=82 # MAXCOLS-1 local LEFTCOL=1 # left vertical line local RIGHTCOL=83 # right vertical line local MAXROWS=66 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows page 63 # max input rows local MAX_COPIES=1 copies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "P/R Check" # view in pdf properties prepage { chk_date$=trim(get(67,49,8)) # if stub date is missing, place check date there if trim(get(65,2,8))="" then x$=set(65,2,8,chk_date$) } # stub # header text 2,1,"COMP_NAME",HBFONT,14 text 35,1,"COMP_ADDR1",HBFONT,12 text 55,1,"COMP_ADDR2",HBFONT,12 # ribbon move 1,1,84,41,1,2 # dn 1 row cbox LEFTCOL,1.5,RIGHTCOL,3.5,MBOXSIZE,crows=2.5::ISHADE,ccols=16 50 64 74 text 2,2,"Dept",ICFONT,cols=13 text 17,2,"Employee name",ICFONT,cols=33 text 51,2,"Social Security #",ICFONT,cols=13 text 65,2,"Date",ICFONT,cols=9 text 75,2,"Check #",ICFONT,cols=8 cfont 2,3,14,3,DBCFONT # Department cfont 17,3,49,3,DBCFONT # Empl name cfont 51,3,63,3,DBCFONT # SSN cfont 65,3,73,3,DBCFONT # dt cfont 75,3,82,3,DBCFONT # check # # detail cbox LEFTCOL,3.5,RIGHTCOL,40.5,MBOXSIZE,crows=4.5::DSHADE,ccols=19 26 37 48:3 62 73 text 2,4,"Description",IFONT text 20,4,"Hours",IRFONT,cols=6 text 27,4,"Gross",IRFONT,cols=10 text 38,4,"YTD Gross",IRFONT,cols=10 text 49,4,"Deductions",IFONT text 63,4,"Deduct",IRFONT,cols=10 text 74,4,"Gross ded",IRFONT,cols=9 cfont 2,5,18,40,IFONT # desc cfont 20,5,25,40,DBRFONT # hours cfont 27,5,36,40,DBRFONT # gross cfont 38,5,47,40,DBRFONT # ytd gross cfont 49,5,61,40,IFONT # deductions cfont 63,5,72,40,DBRFONT # deduct cfont 74,5,82,40,DBRFONT # gross ded # footer cbox LEFTCOL,40.5,48,42.5,MBOXSIZE,ccols=26::100 37 cbox 62,40.5,RIGHTCOL,42.5,MBOXSIZE,ccols=73 text 2,41,"Gross totals",IBFONT,shade 0 text 2,42,"Net totals",IBFONT,shade 0 cfont 27,41,35,42,DBRFONT # gross cfont 37,41,47,42,DBRFONT # ytd gross cfont 63,41,72,42,DBRFONT # deduct cfont 74,41,82,42,DBRFONT # gross ded # check # header cbox 1,46,83,64.5,MBOXSIZE # check LOGO_IMAGE 1,46.5,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 70,49.35,"PR_ROUTING",DFONT,cols=10 # rtg# text 49,48.25,"PR_BANK_NAME",DBFONT,cols=30 text 49,49.05,"PR_BANK_ADDR1",DFONT,cols=30 text 49,49.85,"PR_BANK_ADDR2",DFONT,cols=30 # ribbon cerase 1,47,84,51 cbox 48,50.5,81,52.5,1,crows=51.5::100,ccols=57 69 text 49,51,"Check #",ICFONT,shade 0,cols=8 text 58,51,"Date",ICFONT,shade 0,cols=11 text 70,51,"Amount",IRFONT,shade 0,cols=11 text 49,52,{trim(get(65,47,15))},DBCFONT,cols=8 text 58,52,{chk_date$},DBCFONT,cols=11 text 70,52,{trim(get(67,51,11))},DBRFONT,cols=11 # check amt in words cerase 2,51,MAXCOLS,51 # amt in words text 2,56,"Pay",HFONT,14 text 7,56,{trim(get(8,51,58))},IBFONT # pay to cmove 13,55,47,58,9,60 # payee and addr text 2,60,"Pay\nto the\nOrder\nof",HFONT cfont 9,60,MAXRCOLS,63,DBFONT # payee and addr # Bottom text 48,59.5,"Check Void After 180 Days",ICFONT,cols=30 SIGNATURE_IMAGE 50,61,0,0,"SIGNATURE" box 47,62.0,30,1,3 # signature line text 47,62.75,"Authorized Signature",ICFONT,cols=30 PR_MICR 15,65.5,"PR_MICR_ACCOUNTNO",{trim(get(65,47,15))} [PRP210 CheckShortStub] detect 51,2,"~ [0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][0-9][0-9]" detect 66,28,"~ DATEMASK.." # set up document constants local MAXCOLS=83 # max cols to output local MAXRCOLS=82 # MAXCOLS-1 local LEFTCOL=1 # left vertical line local RIGHTCOL=83 # right vertical line local MAXROWS=66 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows page 42 # max input rows local ONE_STUB_COPY=1 local TWO_STUB_COPY=2 local MAX_COPIES=2 copies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "P/R Check" # view in pdf properties prepage { chk_date$=trim(get(67,28,8)) # if stub date is missing, place check date there if trim(get(65,2,8))="" then x$=set(65,2,8,chk_date$) # the following moves will leave a space between the # top two stubs # move check to bottom for i=23 to 42 text$[i+24]=text$[i] text$[i]="" # clear line next i # copy stub from top to middle for i=1 to 22 text$[i+24]=text$[i] next i } precopy { if copy=ONE_STUB_COPY and copy<>PR_NO_STUBS then skip=1 if copy=ONE_STUB_COPY then for i=1 to 21; text$[i]=""; next i if copy=TWO_STUB_COPY and copy<>PR_NO_STUBS then skip=1 } #employer stub if copy TWO_STUB_COPY # header text 2,2,"COMP_NAME",HBFONT,14 text 35,2,"COMP_ADDR1",HBFONT,12 text 55,2,"COMP_ADDR2",HBFONT,12 # ribbon move 1,1,83,23,1,3 # dn 2 lns cbox 1,2.5,RIGHTCOL,4.5,MBOXSIZE,crows=3.5::ISHADE,ccols=16 50 64 74 text 2,3,"Dept",ICFONT,cols=13 text 17,3,"Employee name",ICFONT,cols=33 text 51,3,"Social Security #",ICFONT,cols=13 text 65,3,"Date",ICFONT,cols=9 text 75,3,"Check #",ICFONT,cols=8 cfont 2,4,14,4,DBCFONT # department cfont 17,4,49,4,DBCFONT # empl name cfont 51,4,63,4,DBCFONT # ssn cfont 65,4,73,4,DBCFONT # dt cfont 75,4,82,4,DBCFONT # check # # detail cbox 1,4.5,RIGHTCOL,20.5,MBOXSIZE,crows=5.5::DSHADE,ccols=18 27 36 48:3 63 73 text 2,5,"Description",IFONT text 19,5,"Hours",IRFONT,cols=8 text 28,5,"Gross",IRFONT,cols=8 text 37,5,"YTD Gross",IRFONT,cols=11 text 49,5,"Deductions",IFONT text 64,5,"Deduct",IRFONT,cols=9 text 74,5,"Gross ded",IRFONT,cols=9 cfont 2,5,17,20,IFONT # desc cfont 19,5,26,20,DBRFONT # hours cfont 28,5,35,20,DBRFONT # gross cfont 37,5,47,20,DBRFONT # ytd gross cfont 49,5,62,20,IFONT # deductions cfont 64,5,72,20,DBRFONT # deduct cfont 74,5,82,20,DBRFONT # gross ded # footer cbox 1,20.5,48,22.5,MBOXSIZE,ccols=27::100 36 cbox 63,20.5,RIGHTCOL,22.5,MBOXSIZE,ccols=73 text 2,21,"Gross totals",IBFONT,shade 0 text 2,22,"Net totals",IBFONT,shade 0 cfont 28,21,35,22,DBRFONT # gross cfont 37,21,47,22,DBRFONT # ytd gross cfont 64,21,72,22,DBRFONT # deduct cfont 74,21,82,22,DBRFONT # gross ded endif # employee stub # header text 2,24,"COMP_NAME",HBFONT,14 text 35,24,"COMP_ADDR1",HBFONT,12 text 55,24,"COMP_ADDR2",HBFONT,12 # ribbon cbox 1,24.5,RIGHTCOL,26.5,MBOXSIZE,crows=25.5::ISHADE,ccols=16 50 64 74 text 2,25,"Dept",ICFONT,cols=13 text 17,25,"Employee name",ICFONT,cols=33 text 51,25,"Social Security #",ICFONT,cols=13 text 65,25,"Date",ICFONT,cols=9 text 75,25,"Check #",ICFONT,cols=8 cfont 2,26,14,26,DBCFONT # Department cfont 17,26,49,26,DBCFONT # Employee name cfont 51,26,63,26,DBCFONT # SS# cfont 65,26,73,26,DBCFONT # dt cfont 75,26,82,26,DBCFONT # check # # detail cbox 1,26.5,RIGHTCOL,42.5,MBOXSIZE,crows=27.5::DSHADE,ccols=18 27 36 48:3 63 73 text 2,27,"Description",IFONT text 19,27,"Hours",IRFONT,cols=8 text 28,27,"Gross",IRFONT,cols=8 text 37,27,"YTD Gross",IRFONT,cols=11 text 49,27,"Deductions",IFONT text 64,27,"Deduct",IRFONT,cols=9 text 74,27,"Gross ded",IRFONT,cols=9 cfont 2,27,17,45,IFONT # desc cfont 19,27,26,45,DBRFONT # hours cfont 28,27,35,45,DBRFONT # gross cfont 37,27,47,45,DBRFONT # ytd gross cfont 49,27,62,45,IFONT # deductions cfont 64,27,72,45,DBRFONT # deduct cfont 74,27,82,45,DBRFONT # gross ded # footer cbox 1,42.5,48,44.5,MBOXSIZE,ccols=27::100 36 cbox 63,42.5,RIGHTCOL,44.5,MBOXSIZE,ccols=73 text 2,43,"Gross totals",IBFONT,shade 0 text 2,44,"Net totals",IBFONT,shade 0 cfont 28,27,35,45,DBRFONT # gross cfont 37,27,47,45,DBRFONT # ytd gross cfont 64,27,72,45,DBRFONT # deduct cfont 74,27,82,45,DBRFONT # gross ded # check # header cbox 1,46,83,64.5,MBOXSIZE # check 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 70,49.35,"PR_ROUTING",DFONT # rtg# text 49,48.25,"PR_BANK_NAME",DBFONT text 49,49.05,"PR_BANK_ADDR1",DFONT text 49,49.85,"PR_BANK_ADDR2",DFONT # ribbon move 65,50,15,1,49,52 # check # move 67,52,15,1,58,52 # dt up move 67,54,15,1,70,52 # numeric $ amt cbox 48,50.5,81,52.5,1,crows=51.5::100,ccols=57 69 text 49,51,"Check #",ICFONT,shade 0,cols=8 text 58,51,"Date",ICFONT,shade 0,cols=11 text 70,51,"Amount",IRFONT,shade 0,cols=11 cfont 49,51,56,52,DBCFONT # check # cfont 58,51,68,52,DBCFONT # dt cfont 70,51,80,52,DBRFONT # amt # check amt in words cerase 2,54,MAXCOLS,57 # amt in words text 2,56,"Pay",HFONT,14 text 7,56,{trim(get(8,54,58))},IBFONT,cols=70 # pay to cmove 13,58,47,61,9,60 # payee and addr text 2,60,"Pay",HFONT text 2,61,"to the",HFONT text 2,62,"Order",HFONT text 2,63,"of",HFONT cfont 9,60,MAXRCOLS,63,DBFONT # payee and addr # Bottom text 48,59.5,"Check Void After 180 Days",ICFONT,cols=30 SIGNATURE_IMAGE 50,61,0,0,"SIGNATURE" box 47,62.0,30,1,3 # signature line text 47,62.75,"Authorized Signature",ICFONT,cols=30 PR_MICR 15,65.5,"PR_MICR_ACCOUNTNO",{trim(get(65,50,15))} [SO] # top of SO rule sets [SOP110 Quote] detect 0,2,"^QUOTE" detect 0,16,"^EXPIRES" # set up document constants local MAXCOLS=80 local MAXRCOLS=79 local LEFTCOL=1 # left vertical line local RIGHTCOL=80 # 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 local CUSTOMER_COPY=1 local FILE_COPY=2 local MAX_COPIES=2 copies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "S/O Quote" # view in pdf properties prejob { 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]="Accounting Copy" } prepage { # skip if extra page is created by extra lines if trim(get(72,3,8))="" then skip=1 reprint$=trim(get(72,2,7)) doc_title$=trim(get(35,2,5)) xcol=20,xrow=3,xcols=46,tpos=2 merge "zMrg get company info" xrow=22 merge "zMrg get desc pos" xrow=22,yrow=60,ipos=2 merge "zMrg find memos" # check for continued xrow1=60,xrow2=MAXROWS merge "zMrg CheckContinued" if last_page then : btmrow=60 x$="cbox LEFTCOL,60,RIGHTCOL,MAXROWS,MBOXSIZE" exec(x$) x$="cbox 24,60,RIGHTCOL,64,1,crows=62::HSHADE,ccols=36 48 58 67" exec(x$) else btmrow=MAXROWS x$=mset(1,60,MAXCOLS,7,"") endif # watermark ztext$=doc_title$ zbrow=btmrow merge "zMrg watermark" } merge "zMrg DisplayCpyTitle" # erase columns ! vline "!!",erase # erase rows - or = hline "==",erase hline "--",erase hline "^^" # default line enhancement local BROW=24 local EROW=60 cfont 2,BROW,{desc_pos-2},EROW,DBFONT,IJUST # item cfont {desc_pos},BROW,42,EROW,DFONT # desc cfont 44,BROW,52,EROW,DBRFONT # ordered cfont 54,BROW,55,EROW,DBCFONT # uom cfont 57,BROW,65,EROW,DBRFONT # price cfont 67,BROW,68,EROW,DBCFONT # uom cfont 70,BROW,MAXRCOLS,EROW,DBRFONT # extension # header section cerase 1,1,MAXCOLS,10 cbox LEFTCOL,1,RIGHTCOL,MAXROWS,MBOXSIZE,crows=10:MBOXSIZE merge "zMrg form header" # right header cbox 65,5.5,RIGHTCOL,10,1,ccols=72::ISHADE,crows=7 8.5 text 66,6.25,"Number",IFONT,cols=9 text 66,7.75,"Date",IFONT,cols=9 text 66,9.25,"Page",IFONT,cols=9 text 73,6.25,{trim(get(72,3,8))},DBFONT,cols=8 text 73,7.75,{trim(get(71,7,8))},DBFONT,cols=8 text 73,9.25,{trim(get(77,5,3))},DBFONT,cols=3 # ship to section cbox LEFTCOL,10,RIGHTCOL,15,MBOXSIZE,ccols=10::ISHADE 41 50::ISHADE text 2,11,"Ship To:",ICFONT,cols=8 text 2,12,{trim(get(15,10,15))},DBCFONT,cols=8 text 11,11,{mcut(7,11,35,4,"","Y","Y")},DBFONT,cols=35 # bill to section text 42,11,"Bill To:",ICFONT,cols=8 text 42,12,{trim(get(57,10,23))},DBCFONT,cols=8 text 51,11,{mcut(49,11,31,4,"","Y","Y")},DBFONT,cols=30 # ribbon 1 section cerase 17,15,17,19 cerase 27,15,27,19 cerase 32,15,32,19 cerase 48,15,48,19 cerase 52,15,52,19 cerase 60,15,60,19 cbox LEFTCOL,15,RIGHTCOL,21,MBOXSIZE cbox LEFTCOL,15,RIGHTCOL,19,1,crows=17::ISHADE,ccols=17 27 32 48 52 60 cfont 2,16,16,16,ICFONT,proper # ref # cfont 18,16,26,16,ICFONT,proper # expires cfont 28,16,31,16,ICFONT,proper # salesperson cfont 33,16,47,16,ICFONT,proper # terms cfont 49,16,51,16,ICFONT,proper # whs cfont 53,16,59,16,ICFONT,proper # frt cfont 61,16,MAXRCOLS,16,ICFONT,proper # ship via cfont 2,18,16,18,DBCFONT # ref # cfont 18,18,26,18,DBCFONT # expires cfont 28,18,31,18,DBCFONT # salesperson cfont 33,18,47,18,DBCFONT # terms cfont 49,18,51,18,DBCFONT # whs cfont 53,18,59,18,DBCFONT # frt cfont 61,18,MAXRCOLS,18,DBCFONT # ship via # ribbon 2 section cbox LEFTCOL,19,RIGHTCOL,21,1,ccols=12::ISHADE 17 27::ISHADE cfont 2,20,11,20,IRFONT,proper cfont 13,20,16,20,DBFONT # quoted by cmove 18,20,27,20,17,20 cfont 17,20,26,20,IRFONT,proper # quoted to cfont 28,20,MAXRCOLS,20,DBFONT # detail heading cerase {desc_pos-1},21,{desc_pos-1},60 erase "!@43,22,43,60",0,0,1,1 erase "!@53,22,53,60",0,0,1,1 erase "!@56,22,56,60",0,0,1,1 erase "!@66,22,66,60",0,0,1,1 erase "!@69,22,69,60",0,0,1,1 cbox LEFTCOL,21,RIGHTCOL,{btmrow},MBOXSIZE,crows=23::DSHADE,ccols=53 56 66 69 cbox {desc_pos-1},21,{desc_pos-1},{btmrow} cfont 2,22,{desc_pos-2},22,IFONT,IJUST,proper # item cfont {desc_pos},22,42,22,IFONT,proper # desc cfont 44,22,52,22,IRFONT,proper # ordered cfont 54,22,55,22,ICFONT # uom cfont 57,22,65,22,IRFONT,proper # price cfont 67,22,68,22,ICFONT # uom cfont 70,22,MAXRCOLS,22,IRFONT,proper # extension # handle memo lines font "mL@2,24,25,62",3,0,80,1,DFONT # memo lines erase "mL@2,24,40,62",0,0,2,1 # spec chars # footer cerase 24,60,24,64 cerase 36,60,36,64 cerase 48,60,48,64 cerase 58,60,58,64 cerase 67,60,67,64 cfont 25,61,35,61,IBRFONT,proper # merch cfont 37,61,47,61,IBRFONT,proper # misc cfont 49,61,57,61,IBRFONT,proper # tax cfont 59,61,66,61,IBRFONT,proper # frt cfont 68,61,MAXRCOLS,61,IBRFONT,10,proper # tot cfont 25,63,35,63,DBRFONT # merchandise cfont 37,63,47,63,DBRFONT # misc cfont 49,63,57,63,DBRFONT # tax cfont 59,63,66,63,DBRFONT # frt cfont 68,63,MAXRCOLS,63,DBRFONT,10 # tot cfont 2,65,60,65,DFONT [SOP210 PickTicket] detect 0,2,"^PICK TICKET" detect 0,16,"^SLSP" # set up document constants local MAXCOLS=85 # max cols to output local MAXRCOLS=84 # MAXCOLS-1 local LEFTCOL=1 # left vertical line local RIGHTCOL=85 # 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 local CUSTOMER_COPY=1 local FILE_COPY=2 local MAX_COPIES=2 copies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "S/O Pick Ticket" # view in pdf properties prejob { 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]="Accounting Copy" } prepage { # set serial # indicator off on 1st page of document pgno$=trim(get(82,5,3)) if pgno$="1" then serial_on=0 reprint$=trim(get(77,2,7)) doc_title$=trim(get(35,2,11)) if mid(doc_title$,1,6)="RETURN" then doc_title$="RETURN GOODS" xcol=19,xrow=3,xcols=46,tpos=2 merge "zMrg get company info" xrow=20 merge "zMrg get desc pos" xrow=22,yrow=62,ipos=2 merge "zMrg find memos" # check for continued xrow1=62,xrow2=MAXROWS merge "zMrg CheckContinued" if last_page then : btmrow=62 x$="cbox LEFTCOL,62,RIGHTCOL,MAXROWS,MBOXSIZE" exec(x$) x$="cbox 53,62,78,64,1,ccols=69::HSHADE" exec(x$) else btmrow=MAXROWS x$=mset(1,63,MAXCOLS,4,"") endif # watermark ztext$=doc_title$ zbrow=btmrow merge "zMrg watermark" } merge "zMrg DisplayCpyTitle" # erase vertical & horizontal lines vline "!!",erase hline "--",erase hline "==",erase # default line enhancements local BROW=22 local EROW=62 cfont {desc_pos-2},BROW,2,EROW,DBFONT,IJUST # item cfont {desc_pos},BROW,42,EROW,DFONT # desc cfont 44,BROW,52,EROW,DBRFONT # ordered cfont 54,BROW,59,EROW,DBRFONT # shipped cfont 60,BROW,65,EROW,DBRFONT,black # backordered cfont 67,BROW,68,EROW,DBCFONT # uom cfont 70,BROW,77,EROW,DBRFONT # wt cfont 79,BROW,MAXRCOLS,EROW,DBCFONT # location # header section cerase 1,1,MAXCOLS,10 cbox LEFTCOL,1,RIGHTCOL,MAXROWS,MBOXSIZE,crows=10:MBOXSIZE merge "zMrg form header" # right header cbox 68,5.5,RIGHTCOL,10,1,ccols=77::ISHADE,crows=7 8.5 text 69,6.25,"Number",IFONT,cols=9 text 69,7.75,"Date",IFONT,cols=9 text 69,9.25,"Page",IFONT,cols=9 text 78,6.25,{trim(get(78,3,6))},DBFONT,cols=6 text 78,7.75,{trim(get(76,7,8))},DBFONT,cols=8 text 78,9.25,{trim(get(82,5,3))},DBFONT,cols=6 # ship to section cbox LEFTCOL,10,RIGHTCOL,15,MBOXSIZE,ccols=11::ISHADE 42 52::ISHADE text 2,11,"Ship To:",ICFONT,cols=9 text 2,12,{trim(get(15,10,15))},DBCFONT,cols=9 text 12,11,{mcut(7,11,35,4,"","Y","Y")},DBFONT,cols=35 # bill to section text 43,11,"Bill To:",ICFONT,cols=9 text 43,12,{trim(get(62,10,20))},DBCFONT,cols=9 cfont 53,11,MAXRCOLS,14,DBFONT # bill to addr # ribbon 1 section cerase 17,15,17,19 cerase 26,15,26,19 cerase 36,15,36,19 cerase 41,15,41,19 cerase 57,15,57,19 cerase 61,15,61,19 cerase 69,15,69,19 cbox LEFTCOL,15,RIGHTCOL,19,MBOXSIZE,1,crows=17::ISHADE,ccols=17 26 36 41 57 61 69 cfont 2,16,16,16,ICFONT,proper # ref # cfont 18,16,25,16,ICFONT,proper # ordered cfont 27,16,35,16,ICFONT,proper # requested cfont 37,16,40,16,ICFONT,proper # salesperson cfont 42,16,56,16,ICFONT,proper # terms cfont 58,16,60,16,ICFONT,proper # whs cfont 62,16,68,16,ICFONT,proper # frt cfont 70,16,MAXRCOLS,16,ICFONT,proper # ship via cfont 2,18,16,18,DBCFONT # ref # cfont 18,18,25,18,DBCFONT # ordered cfont 27,18,35,18,DBCFONT # requested cfont 37,18,40,18,DBCFONT # salesperson cfont 42,18,56,18,DBCFONT # terms cfont 58,18,60,18,DBCFONT # whs cfont 62,18,68,18,DBCFONT # frt cfont 70,18,MAXRCOLS,18,DBCFONT # ship via # detail heading erase "!@6,20,22,20",0,0,1,1 erase "!@43,19,43,62",0,0,1,1 erase "!@53,19,53,62",0,0,1,1 erase "!@60,19,60,62",0,0,1,1 erase "!@66,19,66,62",0,0,1,1 erase "!@69,19,69,62",0,0,1,1 erase "!@78,19,78,62",0,0,1,1 cbox LEFTCOL,19,RIGHTCOL,{btmrow},MBOXSIZE,crows=21::DSHADE,ccols=53 60 66 69 78 cbox {desc_pos-1},19,{desc_pos-1},{btmrow} cfont 2,20,{desc_pos-2},20,IFONT,IJUST,proper # item cfont {desc_pos},20,43,20,IFONT,proper # desc cfont 44,20,52,20,IRFONT,proper # committed cfont 54,20,59,20,IRFONT,proper # shipped cfont 61,20,65,20,IRFONT,proper,black # backordered cfont 67,20,68,20,ICFONT # uom cfont 70,20,77,20,IRFONT,proper # wt cfont 79,20,MAXRCOLS,20,ICFONT,proper # location # handle backordered font "BACKORDERED",0,0,15,1,DRFONT,proper # handle order initiated lines font "Order @5,22,10,62",-3,0,35,1,DLFONT # handle ordered by lines font "Ordered By @2,22,25,62",0,0,10,1,IRFONT font "Ordered By @2,22,25,62",11,0,40,1,DBLFONT # handle memo lines font "mL@2,22,40,62",3,0,80,1,DFONT,black # memo lines erase "mL@2,22,40,62",0,0,2,1 # spec chars # enhance serial # lines, mje 082206 from pick-ticket font "sL@2,22,25,62",3,0,4,1,IFONT # serial lines font "sL@2,22,25,62",8,0,{43-desc_pos},1,DBLFONT # serial lines erase "sL@2,22,25,62",0,0,2,1 # spec chars # handle alternate location lines font "Alt Loc: ",0,0,8,1,IFONT # title font "Alt Loc: ",8,0,50,1,DBLFONT # alt locs # handle price lines font "Price: ",0,0,6,1,IFONT # title font "Price: ",7,0,9,1,DBRFONT # price font "Price: ",17,0,5,1,DBFONT # uom # handle disc lines font "Disc: ",0,0,6,1,IFONT # title font "Disc: ",7,0,9,1,DBRFONT # price font "Disc: ",17,0,5,1,DBFONT # uom # handle ext lines font "Ext: ",0,0,4,1,IFONT # title font "Ext: ",5,0,11,1,DBRFONT # ext price # handle * memo lines font " * @2,22,4,62",0,0,60,1,DLFONT # footer cfont 54,63,67,63,IBRFONT,10,proper # wt cfont 69,63,77,63,DBRFONT,10 # wt font "CONTINUED@75,63,83,63",0,0,10,1,IRFONT,proper cfont 2,63,52,63,IFONT font "EXTENSION TOT: ",0,0,14,1,IFONT,proper # title font "~\.[0-9][0-9]@1,63,50,63",-9,0,12,1,DBFONT,10 # ext total font "~\.[0-9][0-9]@1,63,50,63",5,0,16,1,IFONT,proper cfont 2,64,MAXRCOLS,64,IFONT [SOP210 SRWorkTicket] detect 0,2,"^WORK TICKET PRINT" # set up document constants local MAXCOLS=85 # max cols to output local MAXRCOLS=84 # MAXCOLS-1 local LEFTCOL=1 # left vertical line local RIGHTCOL=85 # 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 local CUSTOMER_COPY=1 local FILE_COPY=2 local SERVICE_COPY=3 local MAX_COPIES=3 copies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "S/R Work Ticket" # view in pdf properties prejob { 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]="Accounting Copy" if MAX_COPIES>=3 then copy_title$[SERVICE_COPY]="Service Copy" } prepage { #get header info for better placement doc_title$=trim(get(35,2,11)) xcol=20,xrow=3,xcols=40,tpos=2 merge "zMrg get company info" problem_top=0 parts_top=0 work_top=0 tech_top=0 problem_bottom=0 parts_bottom=0 work_bottom=0 tech_bottom=0 for row=20 to 61 # find top of each section if get(6,row,19)="Problem Description" then problem_top=row if get(6,row,12)="Repair Parts" then parts_top=row if get(6,row,20)="Work To Be Performed" then work_top=row if get(6,row,6)="Tech #" then tech_top=row # find bottom of each section for row2=row+1 to 62 if problem_bottom=0 and get(6,row,19)="Problem Description" and get(6,row2,3)="---" then problem_bottom=row2;continue if parts_bottom=0 and get(6,row,12)="Repair Parts" and get(6,row2,3)="---" then parts_bottom=row2;continue if work_bottom=0 and get(6,row,20)="Work To Be Performed" and get(6,row2,3)="---" then work_bottom=row2;continue if tech_bottom=0 and get(6,row,6)="Tech #" and get(6,row2,3)="===" then tech_bottom=row2;continue next row2 next row if problem_top>0 and problem_bottom=0 then problem_bottom=61;continue if parts_top>0 and parts_bottom=0 then parts_bottom=61;continue if work_top>0 and work_bottom=0 then work_bottom=61;continue if tech_top>0 and tech_bottom=0 then tech_bottom=61;continue # check for continued xrow1=61,xrow2=MAXROWS merge "zMrg CheckContinued" if last_page then : btmrow=62 else x$=mset(1,62,MAXCOLS,6,"") btmrow=MAXROWS endif # watermark ztext$=doc_title$ zbrow=btmrow merge "zMrg watermark" } merge "zMrg DisplayCpyTitle" # erase columns ! vline "!!",erase # erase rows - or = hline "==",erase hline "--",erase hline "^^" # header section cerase 1,1,MAXCOLS,10 cbox LEFTCOL,1,RIGHTCOL,MAXROWS,MBOXSIZE,crows=10:MBOXSIZE merge "zMrg form header" # right header cbox 64,5.5,RIGHTCOL,10 cbox 64,5.5,72,10,1,ISHADE cbox 64,7,RIGHTCOL,7 cbox 64,8.5,RIGHTCOL,8.5 text 65,6.25,"Number",IFONT,cols=7 text 65,7.75,"Date",IFONT,cols=7 text 65,9.25,"Page",IFONT,cols=7 text 73,6.25,{trim(get(78,3,7))},DBFONT,cols=7 text 73,7.75,{trim(get(76,7,8))},DBFONT,cols=8 text 73,9.25,{trim(get(82,5,3))},DBFONT,cols=3 # bill to section cbox LEFTCOL,10,RIGHTCOL,15,MBOXSIZE,ccols=10::ISHADE 41 50::ISHADE text 2,11,"Bill To:",ICFONT,cols=8 text 2,12,{trim(get(17,10,23))},DBCFONT,cols=8 cmove 7,11,41,14,11,11 cfont 11,11,40,14,DBFONT # ship to addr # location section text 42,11,"Location:",ICFONT,cols=8 text 42,12,{trim(get(64,10,15))},DBCFONT,cols=8 cmove 49,11,MAXRCOLS,14,51,11 cfont 51,11,MAXRCOLS,14,DBLFONT # bill to addr # ribbon 1 section cerase 17,15,17,19 cerase 26,15,26,19 cerase 36,15,36,19 cerase 41,15,41,19 cerase 57,15,57,19 cerase 61,15,61,19 cerase 69,15,69,19 cbox LEFTCOL,15,RIGHTCOL,19,MBOXSIZE,crows=17::ISHADE,ccols=17 26 36 41 57 61 69 cfont 2,16,16,16,ICFONT,proper # ref # cfont 18,16,25,16,ICFONT,proper # order date cfont 27,16,35,16,ICFONT,proper # requested cfont 37,16,40,16,ICFONT,proper # slsp cfont 42,16,56,16,ICFONT,proper # terms cfont 58,16,60,16,ICFONT,proper # whs cfont 62,16,68,16,ICFONT,proper # freight cfont 70,16,MAXRCOLS,16,ICFONT,proper # ship via cfont 2,18,16,18,DBCFONT # ref # cfont 18,18,25,18,DBCFONT # order date cfont 27,18,35,18,DBCFONT # requested cfont 37,18,40,18,DBCFONT # slsp cfont 42,18,56,18,DBCFONT # terms cfont 58,18,60,18,DBCFONT # whs cfont 62,18,68,18,DBCFONT # freight cfont 70,18,MAXRCOLS,18,DBCFONT # ship via # detail cbox LEFTCOL,19,RIGHTCOL,{btmrow},MBOXSIZE font "Equipment:",-4,0,3,1,DBFONT font "Equipment:",0,0,10,1,IRFONT font "Equipment:",11,0,30,1,DBLFONT font "Item/Model:",0,0,11,1,IRFONT font "Item/Model:",12,0,30,1,DBLFONT font "Serial #:",0,0,9,1,IRFONT font "Serial #:",10,0,30,2,DBLFONT font "Contact:",0,0,8,1,IRFONT font "Contact:",9,0,30,1,DBLFONT font "Phone #:",0,0,8,1,IRFONT font "Phone #:",9,0,30,1,DBLFONT font "Priority:",0,0,9,1,IRFONT font "Priority:",10,0,20,1,DBLFONT font "Status:",0,0,7,1,IRFONT font "Status:",8,0,20,1,DBLFONT font "Technician:",0,0,11,1,IRFONT font "Technician:",12,0,20,1,DBLFONT font "Symptom:",0,0,8,1,IRFONT font "Symptom:",9,0,20,1,DBLFONT font "Scheduled:",0,0,10,1,IRFONT font "Scheduled:",11,0,20,1,DBLFONT font "Estimated:",0,0,10,1,IRFONT font "Estimated:",11,0,20,1,DBLFONT cfont 6,{problem_top},25,{problem_top},IFONT cfont 27,{problem_top},MAXRCOLS,{problem_bottom},DFONT cfont 6,{parts_top},20,{parts_top},IFONT # repair parts cfont 22,{parts_top},46,{parts_top},IFONT # description cfont 48,{parts_top},54,{parts_top},ICFONT # ordered cfont 59,{parts_top},64,{parts_top},ICFONT # issued cfont 66,{parts_top},74,{parts_top},ICFONT # bko'd cfont 76,{parts_top},77,{parts_top},ICFONT # um cfont 82,{parts_top},84,{parts_top},IFONT # loc cfont 6,{parts_top+1},20,{parts_bottom},DFONT # repair parts cfont 22,{parts_top+1},46,{parts_bottom},DFONT # description cfont 48,{parts_top+1},54,{parts_bottom},DCFONT # ordered cfont 59,{parts_top+1},64,{parts_bottom},DCFONT # issued cfont 66,{parts_top+1},74,{parts_bottom},DCFONT # bko'd cfont 76,{parts_top+1},77,{parts_bottom},DCFONT # um cfont 82,{parts_top+1},84,{parts_bottom},DFONT # loc cfont 6,{work_top},MAXRCOLS,{work_top},IFONT cfont 12,{work_top+1},15,{work_bottom},DFONT cfont 17,{work_top+1},MAXRCOLS,{work_bottom},DBFONT cfont 6,{tech_top},13,{tech_top},IFONT # tech # cfont 15,{tech_top},37,{tech_top},IFONT # name cfont 39,{tech_top},54,{tech_top},ICFONT # date cfont 56,{tech_top},63,{tech_top},IRFONT # begin cfont 65,{tech_top},72,{tech_top},IRFONT # end cfont 74,{tech_top},83,{tech_top},IRFONT # hours cfont 6,{tech_top+1},13,{tech_bottom},DFONT # tech # cfont 15,{tech_top+1},37,{tech_bottom},DFONT # name cfont 39,{tech_top+1},54,{tech_bottom},DCFONT # date cfont 56,{tech_top+1},63,{tech_bottom},DRFONT # begin cfont 65,{tech_top+1},72,{tech_bottom},DRFONT # end cfont 74,{tech_top+1},83,{tech_bottom},DRFONT # hours # footer cfont 2,63,MAXRCOLS,65,DFONT [SOP310 CredMemoLong] # uses SOP310 InvoiceLong rule set [SOP310 CredMemoShort] # uses SOP310 InvoiceShort rule set [SOP310 InvoiceGmShort] # uses SOP310 InvoiceShort rule set [SOP310 InvoiceLong] detect 0,2,"^~(INVOICE)|(CREDIT MEMO)|(RETURN GOODS)" detect 0,16,"^SALESPERSON" detect 56,18,"!V" # set up document constants local MAXCOLS=100 # max cols to output local MAXRCOLS=99 # MAXCOLS-1 local LEFTCOL=1 # left vertical line local RIGHTCOL=100 # 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 local CUSTOMER_COPY=1 local FILE_COPY=2 local MAX_COPIES=2 copies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "S/O Invoice" # view in pdf properties prejob { 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]="Accounting Copy" } prepage { # set serial # indicator off on 1st page of document pgno$=trim(get(97,5,3)) if pgno$="1" then serial_on=0 # patch to handle RGA discrepancy x=pos("Ship-to:"=text$[10]) if x>62 then : for i=10 to 14 text$[i](62)=text$[i](69,30) next i endif reprint$=trim(get(92,2,7)) doc_title$=trim(get(25,2,40)) if mid(doc_title$,1,6)="RETURN" then : doc_title$="RETURN GOODS" if reprint$="" then : reprint$="ACKNOWLEDGEMENT" else reprint$="ACKNOWLEDGEMENT "+reprint$ endif endif xcol=27,xrow=3,xcols=46,tpos=2 merge "zMrg get company info" xrow=20 merge "zMrg get desc pos" xrow=22,yrow=60,xcols=MAXCOLS-2 merge "zMrg find detail bottom" xrow=22,yrow=detail_bottom,ipos=2 merge "zMrg find memos" xrow=detail_bottom+1,yrow=59 merge "zMrg find prepayment" # sometimes invoice date is missing so copy in ship date if trim(get(91,7,8))="" then : x$=trim(get(18,18,8)); x1$=set(91,7,8,x$) endif xrow=14;xcols=40 merge "zMrg get zip" # check for continued xrow1=62,xrow2=MAXROWS merge "zMrg CheckContinued" if last_page then : btmrow=detail_bottom x$="cbox LEFTCOL,60,RIGHTCOL,MAXROWS,MBOXSIZE" exec(x$) x$="cbox 31,60,RIGHTCOL,64,1,crows=62::HSHADE,ccols=44 56 68 78 87" exec(x$) else btmrow=MAXROWS x$=mset(1,60,MAXCOLS,7,"") endif # watermark ztext$=doc_title$ zbrow=btmrow if zbrow<40 then zbrow=60 merge "zMrg watermark" } merge "zMrg DisplayCpyTitle" # erase columns ! vline "!!",erase # erase rows - or = hline "==",erase hline "--",erase hline "^^" # default line enhancement local BROW=1 local EROW=60 cfont {desc_pos-2},BROW,2,EROW,DBFONT,IJUST,8 # item cfont {desc_pos},BROW,43,EROW,DFONT,8 # desc cfont 44,BROW,52,EROW,DBRFONT # ordered cfont 54,BROW,62,EROW,DBRFONT # shipped cfont 64,BROW,72,EROW,DBRFONT # backordered cfont 74,BROW,75,EROW,DBCFONT # uom cfont 77,BROW,85,EROW,DBRFONT # price cfont 87,BROW,88,EROW,DBCFONT # uom cfont 90,BROW,MAXRCOLS,EROW,DBRFONT # extension # header section cerase 1,1,MAXCOLS,10 cbox LEFTCOL,1,RIGHTCOL,MAXROWS,MBOXSIZE,crows=9:MBOXSIZE merge "zMrg form header" # right header cbox 80,6,RIGHTCOL,9,1,ccols=90::ISHADE,crows=7 8 text 81,6.5,"Number",IFONT,cols=9 text 81,7.5,"Date",IFONT,cols=9 text 81,8.5,"Page",IFONT,cols=9 text 92,6.5,{trim(get(93,3,6))},DBFONT,cols=9 text 92,7.5,{trim(get(91,7,8))},DBFONT,cols=9 text 92,8.5,{trim(get(96,5,3))},DBFONT,cols=9 # bill to section cbox LEFTCOL,9,RIGHTCOL,15,MBOXSIZE,ccols=13::ISHADE 51 63::ISHADE text 2,10,"Bill To:",ICFONT,cols=11 text 2,11,{trim(get(16,10,25))},DBCFONT,cols=11 text 14,10,{mcut(7,11,35,4,"","Y","Y")},DBFONT,cols=35 barcode 14,13.25,{shipzip$},900,12.0,2 # ship to section text 52,10,"Ship To:",ICFONT,cols=11 text 52,11,{trim(get(70,10,15))},DBCFONT,cols=11 text 64,10,{mcut(62,11,35,4,"","Y","Y")},DBFONT,cols=35 # ribbon section cerase 17,15,17,19 cerase 26,15,26,19 cerase 41,15,41,19 cerase 57,15,57,19 cerase 66,15,66,19 cerase 73,15,73,19 cerase 76,15,76,19 cerase 84,15,84,19 cbox LEFTCOL,15,RIGHTCOL,19,MBOXSIZE,crows=17::ISHADE,ccols=17 26 41 57 66 73 76 84 cfont 2,16,16,16,ICFONT,proper # ref # cfont 18,16,25,16,ICFONT,proper # shipped dt cfont 27,16,40,16,ICFONT,proper # salesperson cfont 42,16,56,16,ICFONT,proper # terms cfont 58,16,65,16,ICFONT,proper,fit # tax code cfont 67,16,72,16,ICFONT,proper # doc # cfont 74,16,75,16,ICFONT,proper # whs cfont 77,16,83,16,ICFONT,proper,fit # frt cfont 85,16,MAXRCOLS,16,ICFONT,proper,fit # ship via text 2,18,{cut(2,18,15,"")},DBCFONT,cols=15 # ref # text 18,18,{cut(18,18,8,"")},DBCFONT,cols=8 # shipped dt text 27,18,{cut(27,18,14,"")},DBCFONT,cols=14 # salesperson text 42,18,{cut(42,18,15,"")},DBCFONT,cols=15 # terms text 58,18,{cut(58,18,8,"")},DBCFONT,cols=8 # tax code text 67,18,{cut(67,18,6,"")},DBCFONT,cols=6 # doc # text 74,18,{cut(74,18,2,"")},DBCFONT,cols=2 # whs text 77,18,{cut(77,18,7,"")},DBCFONT,cols=7 # frt text 85,18,{cut(85,18,15,"")},DBCFONT,cols=15 # ship via # detail erase "!@desc_pos-1,20,desc_pos-1,60",0,0,1,1 erase "!@43,20,43,60",0,0,1,1 erase "!@53,20,53,60",0,0,1,1 erase "!@63,20,63,60",0,0,1,1 erase "!@73,20,73,60",0,0,1,1 erase "!@76,20,76,60",0,0,1,1 erase "!@86,20,86,60",0,0,1,1 erase "!@89,20,89,60"0,0,1,1 cbox LEFTCOL,19,RIGHTCOL,{btmrow},MBOXSIZE,crows=21::DSHADE,ccols=43 53 63 73 76 86 89 cbox {desc_pos-1},19,{desc_pos-1},{btmrow} cbox 43,19,43,{btmrow} # detail headings cfont {desc_pos-2},20,2,20,IFONT,proper,IJUST # item code cfont {desc_pos},20,43,20,IFONT,proper # desc cfont 44,20,52,20,IRFONT,proper # ordered cfont 54,20,62,20,IRFONT,proper # shipped cfont 64,20,72,20,IRFONT,proper # backordered cfont 74,20,75,20,ICFONT # uom cfont 77,20,85,20,IRFONT,proper # price cfont 87,20,88,20,ICFONT # uom cfont 90,20,MAXRCOLS,20,IRFONT,proper # extension # handle backordered font "BACKORDERED",0,0,11,1,DRFONT # handle ordered by lines font "Ordered By @2,22,25,59",0,0,10,1,IRFONT font "Ordered By @2,22,25,59",11,0,40,1,DBLFONT # handle memo lines font "mL@2,22,25,59",3,0,80,1,DFONT # memo lines erase "mL@2,22,40,59",0,0,2,1 # spec chars # enhance serial # lines font "sL@2,22,25,59",3,0,4,1,IFONT # serial lines font "sL@2,22,25,59",8,0,{43-desc_pos},1,DBLFONT # serial lines erase "sL@2,22,40,59",0,0,2,1 # spec chars # handle payment info font "pL@2,22,40,59",2,0,15,1,ILFONT # pymt desc font "pL@2,22,40,59",17,0,13,1,DBRFONT # pymt amts font "pL@2,22,40,59",30,0,35,1,DFONT # pymt comment erase "pL@2,22,40,59",0,0,2,1 # spec chars # handle ship from warehouse lines font "*Whse:@2,22,7",0,0,6,1,IFONT font "*Whse:@2,22,7",8,0,30,1,DFONT font "*Ship Via:@43,22,52",0,0,10,1,IRFONT font "*Ship Via:@43,22,52",12,0,15,1,DBFONT font "*Freight:@70,22,78",0,0,9,1,IRFONT font "*Freight:@70,22,78",11,0,8,1,DBRFONT # footer cerase 32,62,100,62 cerase 32,64,100,64 cerase 32,61,32,63 cerase 44,61,44,63 cerase 56,61,56,63 cerase 68,61,68,63 cerase 78,61,78,63 cerase 87,61,87,63 cfont 32,61,43,61,IBRFONT,proper # merchandise cfont 45,61,55,61,IBRFONT,proper # misc cfont 57,61,67,61,IBRFONT,proper # discount cfont 69,61,77,61,IBRFONT,proper # tax cfont 79,61,86,61,IBRFONT,proper # frt cfont 88,61,MAXRCOLS,61,IBRFONT,9,proper # tot due cfont 32,63,43,63,DBRFONT # merchandise cfont 45,63,55,63,DBRFONT # misc cfont 57,63,67,63,DBRFONT # discount cfont 69,63,77,63,DBRFONT # tax cfont 79,63,86,63,DBRFONT # frt cfont 88,63,MAXRCOLS,63,DBRFONT,10 # tot due cfont 2,61,31,64,DFONT cfont 2,65,MAXRCOLS,65,DFONT [SOP310 InvoiceShort] detect 0,2,"^~(INVOICE)|(CREDIT MEMO)|(RETURN GOODS)" detect 0,16,"^~(SHIPPED)|(RETURNED)" detect 0,16,"^SLS" detect 56,18,"!V" # set up document constants local MAXCOLS=81 # max cols to output local MAXRCOLS=80 # MAXCOLS-1 local LEFTCOL=1 # left vertical line local RIGHTCOL=81 # 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 local CUSTOMER_COPY=1 local FILE_COPY=2 local INTERNAL_COPY=3 local MAX_COPIES=3 copies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "S/O Invoice" # view in pdf properties prejob { 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]="Accounting Copy" if MAX_COPIES>=3 then copy_title$[INTERNAL_COPY]="Internal Copy" } prepage { # set serial # indicator off on 1st page of document pgno$=trim(get(78,5,3)) if pgno$="1" then serial_on=0 reprint$=trim(get(73,2,7)) doc_title$=trim(get(20,2,40)) if mid(doc_title$,1,6)="RETURN" then doc_title$="RETURN GOODS ACKNOWLEDGEMENT" if mid(doc_title$,1,6)="RETURN" then doc_title$="RETURN GOODS"; if reprint$="" then reprint$="ACKNOWLEDGEMENT" else reprint$="ACKNOWLEDGEMENT "+reprint$ xcol=20,xrow=3,xcols=46,tpos=2 merge "zMrg get company info" xrow=20 merge "zMrg get desc pos" xrow=22,yrow=60,xcols=MAXCOLS-2 merge "zMrg find detail bottom" xrow=22,yrow=detail_bottom,ipos=2 merge "zMrg find memos" xrow=detail_bottom+1,yrow=59 merge "zMrg find prepayment" # check for continued xrow1=62,xrow2=MAXROWS merge "zMrg CheckContinued" if last_page then : btmrow=detail_bottom x$="cbox LEFTCOL,60,RIGHTCOL,MAXROWS,MBOXSIZE" exec(x$) x$="cbox 25,60,RIGHTCOL,64,1,crows=62::HSHADE,ccols=37 49 59 68" exec(x$) else btmrow=MAXROWS x$=mset(1,60,MAXCOLS,7,"") endif # watermark ztext$=doc_title$ zbrow=btmrow if zbrow<40 then zbrow=60 merge "zMrg watermark" } merge "zMrg DisplayCpyTitle" precopy { if copy=INTERNAL_COPY then cols$="100" if trim(get(86,3,3))<>"NO." and copy=INTERNAL_COPY then skip=1 if copy=INTERNAL_COPY and last_page then : x$="cbox 82,60,100,64,1,crows=62::HSHADE,ccols=93" exec(x$) x$="text 83,61,"+$22$+"Total Cost"+$22$+",IBRFONT,9,cols=9" exec(x$) endif } # erase columns ! vline "!!",erase # erase rows - or = hline "==",erase hline "--",erase hline "^^" # erase cost section if not copy 3 if copy CUSTOMER_COPY,FILE_COPY cerase 81,1,102,MAXROWS end if # default line enhancement local BROW=22 local EROW=60 cfont 2,BROW,{desc_pos-2},EROW,DBFONT,IJUST,8 # item cfont {desc_pos},BROW,42,EROW,DFONT,8 # desc cfont 44,BROW,52,EROW,DBRFONT # shipped cfont 54,BROW,55,EROW,DBCFONT # uom cfont 57,BROW,65,EROW,DBRFONT # price cfont 67,BROW,68,EROW,DBCFONT # uom cfont 70,BROW,MAXRCOLS,EROW,DBRFONT # extension if copy INTERNAL_COPY cfont 82,BROW,92,EROW,DBRFONT # cost cfont 94,BROW,99,EROW,DBRFONT # gm end if # header section cerase 1,1,100,10 cbox LEFTCOL,1,RIGHTCOL,MAXROWS,MBOXSIZE,crows=10:MBOXSIZE if copy INTERNAL_COPY cbox 82,1,100,MAXROWS,MBOXSIZE end if merge "zMrg form header" # right header cbox 64,5.5,RIGHTCOL,10,1,crows=7 8.5,ccols=72::ISHADE text 65,6.25,"Number",IFONT,cols=7 text 65,7.75,"Date",IFONT,cols=7 text 65,9.25,"Page",IFONT,cols=7 text 73,6.25,{trim(get(74,3,6))},DBFONT,cols=6 text 73,7.75,{trim(get(72,7,8))},DBFONT,cols=8 text 73,9.25,{trim(get(78,5,3))},DBFONT,cols=3 if copy INTERNAL_COPY cbox 82,1,100,8,crows=4 6,ccols=90::ISHADE text 83,3,"Number",IFONT,cols=7 text 83,5,"Page",IFONT,cols=7 text 83,7,"Date",IFONT,cols=7 text 91,3,{trim(get(74,3,6))},DBFONT,cols=6 text 91,5,{trim(get(72,7,8))},DBFONT,cols=8 text 91,7,{trim(get(78,5,3))},DBFONT,cols=3 end if # bill to section cbox LEFTCOL,10,RIGHTCOL,15,MBOXSIZE,1,ccols=10::ISHADE 41 50::ISHADE text 2,11,"Bill To:",ICFONT,cols=8 text 2,12,{trim(get(16,10,25))},DBCFONT,cols=8 text 11,11,{mcut(8,11,30,4,"","Y","Y")},DBFONT,cols=30 # ship to section text 42,11,"Ship To:",ICFONT,cols=8 text 42,12,{trim(get(58,10,15))},DBCFONT,cols=8 text 51,11,{mcut(50,11,30,4,"","Y","Y")},DBFONT,cols=30 # ribbon section cerase 17,16,17,18 cerase 26,16,26,18 cerase 30,16,30,18 cerase 46,16,46,18 cerase 55,16,55,18 cerase 62,16,62,18 cerase 65,16,65,18 cbox LEFTCOL,15,RIGHTCOL,19,MBOXSIZE,1,crows=17::ISHADE,ccols=17 26 30 46 55 62 65 cfont 2,16,16,16,ICFONT,proper # ref # cfont 18,16,25,16,ICFONT,proper # shipped dt cfont 27,16,29,16,ICFONT,proper # slsp cfont 31,16,45,16,ICFONT,proper # terms cfont 47,16,54,16,ICFONT,proper # tax code cfont 56,16,61,16,ICFONT,proper # doc # cfont 63,16,64,16,ICFONT,proper # whs cfont 66,16,MAXRCOLS,16,ICFONT,proper # ship via text 2,18,{cut(2,18,15,"")},DBCFONT,cols=15 # ref # text 18,18,{cut(18,18,8,"")},DBCFONT,cols=8 # shipped dt text 27,18,{cut(27,18,3,"")},DBCFONT,cols=3 # slsp text 31,18,{cut(31,18,15,"")},DBCFONT,cols=15 # terms text 47,18,{cut(47,18,8,"")},DBCFONT,cols=8 # tax code text 56,18,{cut(56,18,6,"")},DBCFONT,cols=6 # doc # text 63,18,{cut(63,18,2,"")},DBCFONT,cols=2 # whs text 66,18,{cut(66,18,15,"")},DBCFONT,cols=15 # ship via # detail erase "!@desc_pos-1,20,desc_pos-1,60",0,0,1,1 erase "!@43,20,43,60",0,0,1,1 erase "!@53,20,53,60",0,0,1,1 erase "!@56,20,56,60",0,0,1,1 erase "!@66,20,66,60",0,0,1,1 erase "!@69,20,69,60",0,0,1,1 cbox LEFTCOL,19,RIGHTCOL,{btmrow},MBOXSIZE,crows=21::DSHADE,ccols=53 56 66 69 cbox {desc_pos-1},19,{desc_pos-1},{btmrow} cfont 2,20,{desc_pos-2},20,IFONT,proper,IJUST # item code cfont {desc_pos},20,42,20,IFONT,proper # desc cfont 44,20,52,20,IRFONT,proper # shipped cfont 54,20,55,20,ICFONT # uom cfont 57,20,65,20,IRFONT,proper # price cfont 67,20,68,20,ICFONT # uom cfont 70,20,MAXRCOLS,20,IRFONT,proper # extension if copy INTERNAL_COPY cerase 93,20,93,60 cbox 82,19,100,{btmrow},MBOXSIZE,crows=21::DSHADE,ccols=93 cfont 82,20,92,20,IRFONT,proper # cost cfont 94,20,99,20,IRFONT,proper # gm end if # handle backordered font "BACKORDERED",0,0,11,1,DRFONT # handle ordered by lines font "Ordered By @2,22,25,59",0,0,10,1,IRFONT font "Ordered By @2,22,25,59",11,0,40,1,DBLFONT # handle memo lines font "mL@2,22,25,59",3,0,80,1,DFONT,8 # memo lines erase "mL@2,22,40,59",0,0,2,1 # spec chars # enhance serial # lines font "sL@2,22,25,59",3,0,4,1,IFONT # serial lines font "sL@2,22,25,59",8,0,{43-desc_pos},1,DFONT # serial lines erase "sL@2,22,40,59",0,0,2,1 # spec chars # handle payment info font "pL@13,22,14,59",2,0,15,1,IFONT # pymt desc font "pL@13,22,14,59",17,0,13,1,DBRFONT # pymt amts font "pL@13,22,14,59",30,0,35,1,DFONT # pymt comment erase "pL@13,22,14,59",0,0,2,1 # spec chars font "BACKORDER",0,0,9,1,IFONT,proper font "BACKORDER",9,0,10,1,DBFONT # footer cerase 25,62,100,62 cerase 25,64,100,64 cerase 25,61,25,63 cerase 37,61,37,63 cerase 49,61,49,63 cerase 59,61,59,63 cerase 68,61,68,63 cerase 93,61,93,63 cfont 25,61,36,61,IBRFONT,proper # merchandise cfont 38,61,48,61,IBRFONT,proper # misc cfont 50,61,58,61,IBRFONT,proper # tax cfont 60,61,67,61,IBRFONT,proper # frt cfont 69,61,MAXRCOLS,61,IBRFONT,10,proper # tot due cfont 26,63,36,63,DBRFONT # merchandise cfont 38,63,48,63,DBRFONT # misc cfont 50,63,58,63,DBRFONT # tax cfont 60,63,67,63,DBRFONT # frt cfont 69,63,MAXRCOLS,63,DBRFONT,10 # tot due if copy INTERNAL_COPY cerase 83,61,92,61 cfont 94,61,99,61,IBRFONT,proper # gm cfont 83,63,92,63,DBRFONT,9 # tot cost cfont 94,63,99,63,DBRFONT # gm end if cfont 2,61,24,64,DFONT cfont 2,65,MAXRCOLS,65,DFONT [SOP320 CounterInvoice] detect 0,2,"^INVOICE" detect 0,16,"^CHECK/CARD#" # set up document constants local MAXCOLS=80 local MAXRCOLS=79 local LEFTCOL=1 # left vertical line local RIGHTCOL=80 # 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 local CUSTOMER_COPY=1 local FILE_COPY=2 local MAX_COPIES=2 copies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "S/O Counter Invoice" # view in pdf properties prejob { 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]="Accounting Copy" } prepage { # set serial # indicator off on 1st page of document pgno$=trim(get(70,5,10)) if pgno$="1" then serial_on=0 if trim(get(37,2,8))="INVOICE" then goto nomove for row=1 to 66 text$[row] = text$[row+1] next row if trim(get(37,2,8))<>"INVOICE" then skip=1 nomove: reprint$=trim(get(71,2,8)) doc_title$=trim(get(37,2,8)) xcol=20,xrow=3,xcols=46,tpos=2 merge "zMrg get company info" xrow=20 merge "zMrg get desc pos" xrow=22,yrow=61,xcols=MAXCOLS-2 merge "zMrg find detail bottom" xrow=22,yrow=detail_bottom,ipos=2 merge "zMrg find memos" xrow=detail_bottom+1,yrow=59 merge "zMrg find prepayment" # check for continued xrow1=60,xrow2=MAXROWS merge "zMrg CheckContinued" if last_page then : btmrow=detail_bottom x$="cbox LEFTCOL,60,RIGHTCOL,MAXROWS,MBOXSIZE" exec(x$) x$="cbox 23,60,RIGHTCOL,64,1,crows=62::HSHADE,ccols=36 46 57 68" exec(x$) else btmrow=MAXROWS x$=mset(1,60,MAXCOLS,7,"") endif # watermark ztext$=doc_title$ zbrow=btmrow merge "zMrg watermark" } merge "zMrg DisplayCpyTitle" # erase columns ! vline "!!",erase # erase rows - or = hline "==",erase hline "--",erase hline "^^" # default line enhancement local BROW=22 local EROW=60 cfont 2,BROW,{desc_pos-2},EROW,DBFONT,IJUST # item cfont {desc_pos},BROW,42,EROW,DFONT # desc cfont 44,BROW,52,EROW,DBRFONT # quantity cfont 54,BROW,55,EROW,DBRFONT # uom cfont 57,BROW,65,EROW,DBRFONT # price cfont 67,BROW,68,EROW,DBCFONT # uom cfont 70,BROW,MAXRCOLS,EROW,DBRFONT # extension # header section cerase 1,1,MAXCOLS,10 cbox LEFTCOL,1,RIGHTCOL,MAXROWS,MBOXSIZE,crows=10:MBOXSIZE merge "zMrg form header" # right header cerase 60,10,MAXCOLS,15 cbox 64,5.5,RIGHTCOL,10,1,ccols=72::ISHADE,crows=7 8.5 text 65,6.25,"Number",IFONT,cols=7 text 65,7.75,"Date",IFONT,cols=7 text 65,9.25,"Page",IFONT,cols=7 text 73,6.25,{trim(get(71,10,8))},DBFONT,cols=8 text 73,7.75,{trim(get(71,14,8))},DBFONT,cols=8 text 73,9.25,{trim(get(71,12,8))},DBFONT,cols=8 # sold to section cbox LEFTCOL,10,RIGHTCOL,15,MBOXSIZE,ccols=10::ISHADE text 2,11,"Sold To:",IFONT,cols=8 text 2,12,{trim(get(14,10,25))},DBFONT,cols=8 cmove 6,11,41,14,11,11 cfont 11,11,41,14,DBFONT # sold to addr # ribbon 1 section cerase 69,16,75,16 cerase 6,15,6,19 cerase 22,15,22,19 cerase 43,15,43,19 cerase 49,15,49,19 cerase 52,15,52,19 cerase 68,15,68,19 cbox LEFTCOL,15,RIGHTCOL,19,MBOXSIZE,crows=17::ISHADE,ccols=6 22 43 49 52 68 cfont 1,16,5,16,ICFONT,proper # salesperson cfont 7,16,21,16,ICFONT,proper # terms cfont 23,16,42,16,ICFONT,proper # check/card # cfont 44,16,48,16,ICFONT,proper # tax % cfont 50,16,51,16,ICFONT,proper # whs cfont 53,16,67,16,ICFONT,proper # ref # text 69,16,"Receipt #",ICFONT,cols=11 # receipt # cfont 1,18,5,18,DBCFONT # salesperson cfont 7,18,21,18,DBCFONT # terms cfont 23,18,42,18,DBCFONT # check/card # cfont 44,18,48,18,DBCFONT # tax % cfont 50,18,51,18,DBCFONT # whs cfont 53,18,67,18,DBCFONT # ref # cfont 69,18,MAXRCOLS,18,DBCFONT # receipt # # detail heading cerase {desc_pos-1},20,{desc_pos-1},{detail_bottom} erase "!@43,20,43,61",0,0,1,1 erase "!@53,20,53,61",0,0,1,1 erase "!@56,20,56,61",0,0,1,1 erase "!@66,20,66,61",0,0,1,1 erase "!@69,20,69,61",0,0,1,1 cbox LEFTCOL,19,RIGHTCOL,{btmrow},MBOXSIZE,crows=21::DSHADE,ccols=53 56 66 69 cbox {desc_pos-1},19,{desc_pos-1},{btmrow} cfont 2,20,{desc_pos-2},20,IFONT,IJUST,proper # item cfont {desc_pos},20,42,20,IFONT,proper # desc cfont 44,20,52,20,IRFONT,proper # quantity cfont 54,20,55,20,ICFONT # uom cfont 57,20,65,20,IRFONT,proper # price cfont 67,20,68,20,ICFONT # uom cfont 70,20,MAXRCOLS,20,IRFONT,proper # extension # handle backordered font "BACKORDERED",0,0,11,1,DRFONT # enhance memo lines font "mL@2,22,25,60",3,0,70,1,DFONT # memo lines erase "mL@2,22,40,60",0,0,2,1 # spec chars # enhance serial # lines font "sL@2,22,25,60",3,0,4,1,IFONT # serial lines font "sL@2,22,25,60",8,0,{43-desc_pos},1,DBLFONT # serial lines erase "sL@2,22,40,60",0,0,2,1 # spec chars # handle payment info font "pL@13,22,14,60",2,0,14,1,IFONT # pymt desc font "pL@13,22,14,60",17,0,12,1,DBRFONT # pymt amts font "pL@13,22,14,60",30,0,35,1,DFONT # pymt comment erase "pL@13,22,14,60",0,0,2,1 # spec chars # footer cerase 36,60,36,63 cerase 46,60,46,63 cerase 57,60,57,63 cerase 68,60,68,63 cfont 24,61,35,61,IBRFONT,proper # merchandise cfont 37,61,45,61,IBRFONT,proper # tax cfont 47,61,56,61,IBRFONT,proper # tendered cfont 58,61,67,61,IBRFONT,proper # cash back cfont 69,61,MAXRCOLS,61,IBRFONT,10,proper # tot due cfont 24,63,35,63,DBRFONT # merchandise cfont 37,63,45,63,DBRFONT # tax cfont 47,63,56,63,DBRFONT # tendered cfont 58,63,67,63,DBRFONT # cash back cfont 69,63,MAXRCOLS,63,DBRFONT,10 # tot due cfont 2,61,23,64,DFONT cfont 2,65,MAXRCOLS,65,DFONT [SOP330 BillofLading] detect 0,1,"^STRAIGHT BILL OF LADING" # set up document constants local MAXCOLS=81 # max cols to output local MAXRCOLS=80 # MAXCOLS-1 local LEFTCOL=1 # left vertical line local RIGHTCOL=81 # right vertical line local MAXROWS=66 # max rows to output cols MAXCOLS # max output columns rows MAXROWS # max output rows page MAXROWS local CUSTOMER_COPY=1 local FILE_COPY=2 local MAX_COPIES=2 copies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "S/O Bill of Lading" # view in pdf properties prejob { 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]="Accounting Copy" } prepage { #get header info for better placement doc_title$=trim(get(56,1,24)) reprint$=trim(get(71,4,7)) xcol=10,xrow=3,xcols=40,tpos=1.1 merge "zMrg get company info" xrow=15;xcols=40 merge "zMrg get zip" # check for continued xrow1=45,xrow2=47 merge "zMrg CheckContinued" if last_page then : btmrow=45 x$="cbox LEFTCOL,45,RIGHTCOL,47,MBOXSIZE,ccols=51 66::ISHADE 75" exec(x$) else btmrow=47 endif # watermark ztext$=doc_title$ zbrow=btmrow merge "zMrg watermark" } merge "zMrg DisplayCpyTitle" # erase rows - or = hline "==",erase hline "--",erase hline "^^" # header section cerase 1,1,MAXCOLS,12 merge "zMrg form header" text 1,2.1,{trim(get(56,2,24))},HBRFONT,12,cols=MAXRCOLS # right header cbox 64,5.5,RIGHTCOL,10,ccols=64 72::ISHADE,crows=7 8.5 text 65,6.25,"Number",IFONT,cols=7 text 65,7.75,"Date",IFONT,cols=7 text 65,9.25,"Page",IFONT,cols=7 text 73,6.25,{trim(get(74,6,6))},DBFONT,cols=6 text 73,7.75,{trim(get(72,8,8))},DBFONT,cols=8 text 73,9.25,{trim(get(63,10,3))},DBFONT,cols=3 text 75,9.25,"of ___",IFONT,cols=7 # ship to section cerase 1,13,1,17 cbox LEFTCOL,12,RIGHTCOL,18,MBOXSIZE,ccols=11::ISHADE text 2,13,"Ship To:",ICFONT,cols=9 text 2,14,{trim(get(10,12,15))},DBCFONT,cols=9 cmove 10,13,50,17,12,13 cfont 12,13,41,17,DBFONT # ship to addr barcode 13,15.75,{shipzip$},900,12.0,2 # ribbon 1 section cerase 8,18,8,20 cerase 31,18,31,20 cerase 34,18,34,20 cerase 38,18,38,20 cerase 44,18,44,20 cbox LEFTCOL,18,RIGHTCOL,20,MBOXSIZE,ccols=8::ISHADE 31 34::ISHADE 38 44::ISHADE cfont 1,19,7,19,IRFONT,proper # carrier cfont 32,19,33,19,IRFONT,proper # whs cfont 39,19,43,19,IRFONT,proper # notes cfont 9,19,30,19,DBFONT # carrier cfont 35,19,37,19,DBFONT # whs cfont 45,19,MAXRCOLS,19,DFONT # notes # detail cerase 7,20,7,45 cerase 11,20,11,45 cerase 66,20,66,45 cerase 75,20,75,45 cbox LEFTCOL,20,RIGHTCOL,{btmrow},MBOXSIZE,crows=22::DSHADE,ccols=7 11 66 75 cfont 1,21,6,21,IRFONT,proper # units cfont 8,21,10,21,ICFONT,proper # hm ?? cfont 12,21,65,21,IFONT,proper # desc cfont 67,21,74,21,IRFONT,proper # wt cfont 76,21,MAXRCOLS,21,ICFONT,proper # class cfont 1,23,6,45,DBRFONT # units cfont 8,23,10,45,DBCFONT # hm ?? cfont 12,23,65,45,DFONT # desc cfont 67,23,74,45,DBRFONT # wt cfont 76,23,MAXRCOLS,45,DBCFONT # class # total weight cfont LEFTCOL,46,50,46,IBLFONT cfont 52,46,65,46,IBRFONT cfont 67,46,74,46,DBRFONT # emergency contact cbox LEFTCOL,47,RIGHTCOL,49,MBOXSIZE,ccols=27::DSHADE cerase 27,48,27,48 cfont LEFTCOL,48,26,48,IRFONT,proper # emer contact cfont 28,48,MAXRCOLS,48,DBFONT # emer contact # rules cbox LEFTCOL,49,RIGHTCOL,62,MBOXSIZE,crows=54 cfont LEFTCOL,50,MAXRCOLS,53,DBCFONT cfont LEFTCOL,55,MAXRCOLS,61,DBCFONT # shipper cerase 71,64,MAXCOLS,64 cbox LEFTCOL,62,RIGHTCOL,66,MBOXSIZE,ccols=8::ISHADE 45 64::ISHADE cfont 1,63,7,63,IRFONT,proper # shipper cfont 1,64,7,64,IRFONT,proper # signed cfont 9,63,44,63,DBFONT cfont 46,63,63,63,IRFONT,proper # rcv company cfont 46,64,63,64,IRFONT,proper # signed text 1,65,"Date",IRFONT,cols=63 # dt text 10,65,"___________________________",DFONT # signed shipper text 66,64,"__________________",DFONT # signed rcv text 66,65,"__________________",DFONT # dt [SOP820 RGALong] # uses SOP310 InvoiceLong rule set [SOP820 RGAShort] # uses SOP310 InvoiceShort rule set [SR] # top of SR rule sets [SRP310 CredMemoLong] # uses SRP310 InvoiceLong rule set [SRP310 CredMemoShort] # uses SRP310 InvoiceShort rule set [SRP310 InvoiceLong] detect 0,2,"^~(INVOICE)|(CREDIT MEMO)" detect 0,16,"^CONTRACT" detect 0,16,"^EXPIRES" # set up document constants local MAXCOLS=80 # max cols to output local MAXRCOLS=79 # MAXCOLS-1 local LEFTCOL=1 # left vertical line local RIGHTCOL=80 # 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 local CUSTOMER_COPY=1 local FILE_COPY=2 local MAX_COPIES=2 copies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "S/R Invoice" # view in pdf properties prejob { 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]="Accounting Copy" } prepage { reprint$=trim(get(71,2,7)) doc_title$=trim(get(20,2,40)) xcol=20,xrow=3,xcols=46,tpos=2 merge "zMrg get company info" xrow=20 merge "zMrg get desc pos" xrow=22,yrow=60,xcols=MAXCOLS-2 merge "zMrg find detail bottom" xrow=22,yrow=detail_bottom,ipos=2 merge "zMrg find memos" xrow=detail_bottom+1,yrow=59 merge "zMrg find prepayment" xrow=13;xcols=40 merge "zMrg get zip" # check for continued xrow1=61,xrow2=MAXROWS merge "zMrg CheckContinued" if last_page then : btmrow=60 x$ ="cbox 45,60,RIGHTCOL,64,1" x$+=",crows=62::ISHADE,ccols=57 67" exec(x$) else x$=mset(1,61,MAXCOLS,6,"") btmrow=MAXROWS endif # watermark ztext$=doc_title$ zbrow=btmrow merge "zMrg watermark" } merge "zMrg DisplayCpyTitle" # erase columns ! vline "!!",erase # erase rows - or = hline "==",erase hline "--",erase hline "^^" # default line enhancement local BROW=22 local EROW=60 cfont 2,BROW,{desc_pos-2},EROW,DBFONT,IJUST,8 # serial # cfont {desc_pos},BROW,67,EROW,DFONT,8 # desc cfont 69,BROW,MAXRCOLS,EROW,DBRFONT # price # header section cerase 1,1,100,10 cbox LEFTCOL,1,RIGHTCOL,MAXROWS,MBOXSIZE,crows=10:MBOXSIZE merge "zMrg form header" # right header cbox 66,5.5,RIGHTCOL,10,1,crows=7 8.5,ccols=72::ISHADE text 67,6.25,"Number",IFONT,cols=7 text 67,7.75,"Date",IFONT,cols=7 text 67,9.25,"Page",IFONT,cols=7 text 73,6.25,{trim(get(74,3,6))},DBFONT,cols=6 text 73,7.75,{trim(get(72,7,8))},DBFONT,cols=8 text 73,9.25,{trim(get(77,5,2))},DBFONT,cols=3 # bill to section cbox LEFTCOL,10,RIGHTCOL,15,MBOXSIZE,ccols=10::ISHADE 46 55::ISHADE text 2,11,"Bill To:",ICFONT,cols=8 text 2,12,{trim(get(21,10,25))},DBCFONT,cols=8,fit text 11,11,{mcut(8,11,40,4,"","Y","Y")},DBFONT,cols=30 barcode 11,13.25,{shipzip$},900,12.0,2 # ship to section text 47,11,"Ship To:",ICFONT,cols=8 text 47,12,{trim(get(58,10,20))},DBCFONT,cols=8,fit text 56,11,{mcut(50,11,30,4,"","Y","Y")},DBFONT,cols=30 # ribbon section cerase 17,16,17,18 cerase 26,16,26,18 cerase 32,16,32,18 cerase 48,16,48,18 cerase 57,16,57,18 cerase 69,16,69,18 cbox LEFTCOL,15,RIGHTCOL,19,MBOXSIZE,1,crows=17::ISHADE,ccols=17 26 32 48 57 69 cfont 2,16,16,16,ICFONT,proper # ref # cfont 18,16,25,16,ICFONT,proper # inv dt cfont 27,16,31,16,ICFONT,proper # slsp cfont 33,16,47,16,ICFONT,proper # terms cfont 49,16,56,16,ICFONT,proper # tax code cfont 58,16,68,16,ICFONT,proper # contract cfont 70,16,MAXRCOLS,16,ICFONT,proper # expires text 2,18,{cut(2,18,15,"")},DBCFONT,cols=15 # ref # text 18,18,{cut(18,18,8,"")},DBCFONT,cols=8 # inv dt text 27,18,{cut(27,18,5,"")},DBCFONT,cols=5 # slsp text 33,18,{cut(33,18,15,"")},DBCFONT,cols=15 # terms text 49,18,{cut(49,18,8,"")},DBCFONT,cols=8 # tax code text 58,18,{cut(58,18,11,"")},DBCFONT,cols=11 # contract text 70,18,{cut(70,18,10,"")},DBCFONT,cols=11 # expires # detail erase "!@desc_pos-1,20,desc_pos-1,60",0,0,1,1 erase "!@68,20,68,60",0,0,1,1 cbox LEFTCOL,19,RIGHTCOL,{btmrow},MBOXSIZE,crows=21::DSHADE,ccols=69 cbox {desc_pos-1},19,{desc_pos-1},{btmrow} cfont 2,20,{desc_pos-2},20,IFONT,proper,IJUST # serial # cfont {desc_pos},20,67,20,IFONT,proper # desc cfont 69,20,MAXRCOLS,20,IRFONT,proper # price # handle memo lines font "mL@2,22,25,59",3,0,40,1,DFONT,8 # memo lines erase "mL@2,22,40,59",0,0,2,1 # spec chars # enhance serial # lines font "sL@2,22,25,59",3,0,4,1,DFONT # serial lines font "sL@2,22,25,59",10,0,15,1,DFONT # serial lines erase "sL@2,22,40,59",0,0,2,1 # spec chars # handle payment info font "pL@13,22,14,59",2,0,15,1,DFONT # pymt desc font "pL@13,22,14,59",17,0,13,1,DBRFONT # pymt amts font "pL@13,22,14,59",30,0,35,1,DFONT # pymt comment erase "pL@13,22,14,59",0,0,2,1 # spec chars # footer cerase 57,61,57,63 cerase 67,61,67,63 cfont 46,61,56,61,IBRFONT,proper # amt cfont 58,61,66,61,IBRFONT,proper # tax cfont 68,61,MAXRCOLS,61,IBRFONT,10,proper # tot due cfont 46,63,56,63,DBRFONT # amt cfont 58,63,66,63,DBRFONT # tax cfont 68,63,MAXRCOLS,63,DBRFONT,10 # tot due cfont 2,61,44,64,DFONT cfont 2,65,MAXRCOLS,65,DFONT [SRP310 InvoiceShort] detect 0,2,"^~(INVOICE)|(CREDIT MEMO)" detect 0,16,"^DOC #" detect 0,16,"^TAX CODE" # set up document constants local MAXCOLS=85 # max cols to output local MAXRCOLS=84 # MAXCOLS-1 local LEFTCOL=1 # left vertical line local RIGHTCOL=85 # 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 local CUSTOMER_COPY=1 local FILE_COPY=2 local MAX_COPIES=2 copies MAX_COPIES portrait dpi 600 # see global constant above GSON # graphical shading title "S/R Invoice" # view in pdf properties prejob { 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]="Accounting Copy" # the following lines are to allow for sections to cross pages repair_on=0,labor_on=0 goto end_prejob enhance_repair: # print top/heading box if not section cross pages if srow>min_row then x$="cbox LEFTCOL,"+str(srow-1.5)+",RIGHTCOL,"+STR(srow-.5)+",MBOXSIZE,DSHADE,ccols=21 49 56 59 69 72";exec(x$) # print internal box with no top or bottom x$="cbox LEFTCOL,"+str(srow-.5)+",RIGHTCOL,"+STR(erow+.5)+",MBOXSIZE,ccols=21 49 56 59 69 72,top=0,bottom=0";exec(x$) # print bottom line if not cross over page if erowmin_row then x$="cbox LEFTCOL,"+str(srow-1.5)+",RIGHTCOL,"+STR(srow-.5)+",MBOXSIZE,DSHADE,ccols=62 72";exec(x$) # print internal box with no top or bottom x$="cbox LEFTCOL,"+str(srow-.5)+",RIGHTCOL,"+STR(erow+.5)+",MBOXSIZE,ccols=62 72,top=0,bottom=0";exec(x$) # print bottom line if not cross over page if erow" " then shifted=1;break next row if shifted=1 then exec("cmove 1,1,MAXCOLS,MAXROWS,2,1") 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) if shifted=1 then cols$=STR(NUM(cols$)+1) # load row 1 variables rptdate$=proper(trim(get(1,1,15))) x=pos("page"=lcs(text$[1])) pageno$=proper(trim(get(x,1,10))) pgmname$=trim(get(x-7,1,6)) compname$=trim(get(16,1,x-8-16)) x$=set(1,1,200,"") # load row 2 variables user$=trim(get(1,2,15)) if len(user$)>4 then user$(1,4)=proper(user$(1,4)) x=pos("time"=lcs(text$[2])) if x>0 then time$=trim(get(x,2,15)) if len(time$)>4 then time$(1,4)=proper(time$(1,4)) if x>16 then doc_title$=trim(get(16,2,x-16)) x$=set(1,2,200,"") # Now draw box around header exec("cbox 1,1,"+cols$+",3.5,MBOXSIZE,HSHADE") # now place line 1 headers that need justification x$="text 1,2,"+$22$+compname$+$22$+",HBCFONT,14,cols="+str(maxlen) exec(x$) x$="text 1,2,"+$22$+pgmname$+" "+pageno$+$22$+",HBRFONT,cols="+str(maxlen) exec(x$) # now place line 2 headers that need justification x$="text 1,3,"+$22$+doc_title$+$22$+",HBCFONT,12,cols="+str(maxlen) exec(x$) x$="text 1,3,"+$22$+time$+$22$+",HBRFONT,cols="+str(maxlen) exec(x$) } text 2,2,{rptdate$},HBFONT text 2,3,{user$},HBFONT font "~(End of Report)|(END OF REPORT)",0,0,13,1,IBRFONT,10,proper [zMrg] # top of zMrg rule sets [zMrg CheckContinued] # # the merge rule set will determine if this page is # a continued page or a last page # # It should be merged into a code block after setting the # following variables and constants # # global constants in global area of rule file # HBRFONT = bold, right-justified font to display # near top of rule set # local MAXCOLS= max cols on page # local MAXROWS= max rows on page # in code block just before merge command for this rule set # xrow1 = start row for search # xrow2 = end row for search # # will return # last_page = 0 not last page # 1 is last page # last_page=0 for xrow=xrow1 to xrow2 cont_pos=pos("CONTINUED"=upper(text$[xrow])) if cont_pos then break next xrow if cont_pos then : cont$=set(cont_pos,xrow,9,"") cont$="Continued on next page ..." else cont$="... Last Page " last_page=1 endif # display continued or last page cnt$ ="text 1,"+str(MAXROWS+.5)+","+$22$+cont$+$22$ cnt$+=",HBRFONT,10,cols="+str(MAXCOLS-1) exec(cnt$) # end zMrg CheckContinued [zMrg DisplayCpyTitle] # # the merge rule set will display # the copy title at the bottom of the page # # It is a stand-alone codeblock should be after setting # the following variables and constants # # global constants in global area of rule file # HBCFONT = bold, center-justified font to display # near top of rule set # local MAXCOLS= max cols on page # local MAXROWS= max rows on page # in code block just before merge command for this rule set # copy_title$ array with copy titles # # will return # precopy { # display copy title cptitle$ ="text 1,"+str(MAXROWS+.5)+","+$22$+copy_title$[copy] cptitle$+=$22$+",HBCFONT,cols="+str(MAXCOLS) exec(cptitle$) } # end zMrg DisplayCpyTitle [zMrg find detail bottom] # search for bottom of vertical lines in detail area # prepayment area should not have any vertical lines # detail lines will have many !, prepayment only 2 ! detail_bottom=yrow equal$=dim(xcols,"=") for row=xrow to yrow-1 if pos(equal$=text$[row])=2 then detail_bottom=row;break x=pos("!"=text$[row],1,0) # get # of ! if x=2 then detail_bottom=row-1; break next row [zMrg find detail header] detrow=0 for row=3 to MAXROWS if mid(text$[row],dethdr_col,len(dethdr$))=dethdr$ then : detrow=row;break endif next row [zMrg find memos] # find memo lines and mark them for enhancing later if xrow>=yrow-1 then goto end_find_memos for row=xrow to yrow-1 # is it a blank line? if trim(get(desc_pos,row,20))="" then continue if trim(get(97,row,1))="." then continue # mje 082206 # if item # exists; must be item line x1$=trim(get(ipos,row,desc_pos-2-ipos)) x2$=trim(get(ipos,row,desc_pos-2-ipos)) if x1$<>"" and x2$<>"!" then serial_on=0;continue # is it a serial # line if get(desc_pos,row,5)="Ser# " or get(desc_pos,row,5)="Lot# " then : x$=set(desc_pos-3,row,2,"sL") serial_on=1 continue endif if get(desc_pos,row,5)=" " and serial_on then : x$=set(desc_pos-3,row,2,"sL") continue endif # must be memo line or 2nd desc line x$=set(desc_pos-3,row,2,"mL"); serial_on=0 next row end_find_memos: [zMrg find prepayment] if xrow>=yrow-1 then goto end_find_prepayment for i=xrow to yrow if pos("-----"=text$[i]) or pos("====="=text$[i]) then : text$[i]="" exec("cbox 15,"+str(i)+",42,"+str(i)) continue endif if get(15,i,1)<>"" then x$=set(13,i,2,"pL") next i end_find_prepayment: [zMrg form header] LOGO_IMAGE 1,1,12,6,"COMP_LOGO" text 1,{tpos},{doc_title$},HBRFONT,16,cols=MAXRCOLS text 1,3.2,{reprint$},HRFONT,12,cols=MAXRCOLS text 1,2,{compname$},HBCFONT,14,cols=MAXRCOLS text 1,3.2,{addr1$},HCFONT,12,cols=MAXRCOLS text 1,4.3,{addr2$},HCFONT,12,cols=MAXRCOLS text 1,5.4,{addr3$},HCFONT,12,cols=MAXRCOLS text 1,6.5,{phone$},HCFONT,12,cols=MAXRCOLS text 1,7.5,"COMP_EMAIL",HCFONT,cols=MAXRCOLS text 1,8.5,"COMP_WEBSITE",HCFONT,cols=MAXRCOLS [zMrg get company info] # get comp info from page or constants? compname$=trim(get(xcol,xrow,xcols)) if compname$="" then : compname$="COMP_NAME" addr1$="COMP_ADDR1" addr2$="COMP_ADDR2" addr3$="COMP_ADDR3" phone$="Phone: COMP_PHONES" else addr1$=trim(get(xcol,xrow+1,xcols)) addr2$=trim(get(xcol,xrow+2,xcols)) addr3$=trim(get(xcol,xrow+3,xcols)) phone$=trim(get(xcol,xrow+4,xcols)) if phone$="" then : if addr3$="" or addr3$(1,1)>="A" then : phone$="Phone: COMP_PHONES" else phone$="Phone: "+addr3$,addr3$="" endif else phone$="Phone: "+phone$ endif endif if addr3$="" then addr3$=phone$,phone$="" [zMrg get desc pos] desc_pos=pos("DESCRIPTION"=text$[xrow]) if desc_pos=0 then : desc_pos=pos("Description"=text$[xrow]) endif [zMrg get zip] shipzip$="" # Retrieve the zip code from either xrow or xrow-1 x=mask(left(text$[xrow],xcols),"[0-9][0-9][0-9][0-9][0-9]") if x>0 then shipzip$=trim(get(x,xrow,10)) if x=0 then : x=mask(trim(left(text$[xrow-1],xcols)),"[0-9][0-9][0-9][0-9][0-9]") endif if shipzip$="" then : if x>0 then shipzip$=trim(get(x,xrow-1,10)) endif shipzip$=sub(shipzip$,"-","") [zMrg gl find sub totals] prepage { # find sub total lines for row=lineno to 59 if trim(get(title_pos,row,6))="Total" and trim(get(first_value_pos,row,2))<>"" then : exec("cbox "+STR((LEFTCOL))+","+STR((row-.5))+","+STR((RIGHTCOL))+","+STR((row+.5))+",1,DSHADE") endif if trim(get(title_pos,row,6))="Total" and trim(get(first_value_pos,row,2))="" then : exec("cbox "+STR((LEFTCOL))+","+STR((row-.5))+","+STR((RIGHTCOL))+","+STR((row+1.5))+",1,DSHADE") endif next row } [zMrg gl find titles] prepage { # find title lines for row=lineno+1 to 59 if trim(get(desc_pos,row,3))<>"" then continue if trim(get(title_pos,row,6))="Total" then continue if trim(get(2,row,2))<>"" then continue x$=set(2,row,2,"tL") text$[row]=sub(text$[row],":","") next row } [zMrg gl report hdr] # header cfont 1,2,MAXCOLS,{lineno-dhdlns},HBCFONT,12,black font "AS OF",0,0,14,1,HBCFONT,12,black,proper # needed by 7.5 and earlier #font "AS OF",-15,0,31,1,HBCFONT,12,black,proper # needed by 7.6 cbox LEFTCOL,.5,RIGHTCOL,{LINENO-dhdlns-.6},1,HSHADE cerase 1,1,MAXCOLS,1 text 2,1.25,{trim(get(1,1,15))},HBFONT text 1,1.25,{pageno$},HBRFONT,cols=MAXRCOLS [zMrg gl report prepage] prepage { x=pos("PAGE"=text$[1]) if x then text$[1](x,4)="Page" pageno$=trim(get(x-7,1,20)) # find line lineno=0 for row=3 to MAXROWS if mid(text$[row],1,3)="===" then : lineno=row break endif next row } [zMrg gl title handler] # handle title lines font "tL@2,1,25,59",2,0,{MAXRCOLS-1},1,DBCFONT,11,proper # memo lines erase "tL@2,1,40,59",0,0,2,1 # spec chars [zMrg g/l 0 init] # # flag(s) needed none # # variable(s) needed none # # constant(s) needed MAXROWS # MAXROWS specifies the maximun # of rows for a page # # variable(s) returned rdate$, rpage$ # rdate$ specifies the date from the page # rpage$ specifies the pgmname and page # from the page # prepage { # if row 1 is blank, move rows up while trim(text$[1])="" for row=2 to MAXROWS text$[row-1]=text$[row] text$[row]="" next row wend # load date and page rdate$=trim(cut(1,1,20,"")) rpage$=trim(cut(21,1,MAXCOLS,"")) # make room for detail tags for row=1 to MAXROWS text$[row]=" "+text$[row] next row } [zMrg g/l 1 header] # # flag(s) needed none # # variable(s) needed none # # constant(s) needed FLDHDR, RIGHTCOL, MAXROWS # FLDHDR specifies # of detail hdr rows # RIGHTCOL specifies the ending column of a row # MAXROWS specifies the maximun # of rows for a page # # variable(s) returned hdrbtm # hdrbtm specifies the bottom line of the hdr section # prepage { # find hdrbtm hdrbtm=0,asof=0 for row=1 to MAXROWS if not(asof) and (pos("PERIOD"=text$[row]) or pos("AS OF"=text$[row])) then : asof=row text$[row]=proper(text$[row]) continue endif if get(3,row,10)="==========" then : hdrbtm=row text$[row]="" break endif next row # if asof row not followed by blank line, # insert blank row # this matches Facts 7.5 with 7.6 if trim(text$[asof+1])<>"" then : for row=MAXROWS-1 to asof+1 step -1 text$[row+1]=text$[row] text$[row]="" next row hdrbtm++ # increment hdrbtm endif # draw detail hdr box if FLDHDR>0 then : fldhdr$ ="cbox LEFTCOL,"+str(asof+1.25)+",RIGHTCOL," fldhdr$+=str(hdrbtm-.5)+",5,DSHADE" exec(fldhdr$) endif } # header section cbox LEFTCOL,1,RIGHTCOL,{asof+1},10,HSHADE text 2,2,{rdate$},HBFONT text 1,2,{rpage$},HBRFONT,cols=MAXRCOLS cfont 2,2,MAXCOLS,{asof},HBCFONT,12 [zMrg g/l 3 tag lines] # # flag(s) needed none # # variable(s) needed hdrbtm # hdrbtm specifies the bottom line of the hdr section # # constant(s) needed ILFONT, MAXCOLS, MAXROWS # ILFONT specifies the font for memo lines # Note: ILFONT is global but can be changed in rule set # MAXCOLS specifies the maximum # of cols in a line # MAXROWS specifies the maximun # of rows for a page # # variable(s) returned none # returns tagged text # prepage { # aD=acnt desc rows # aH=acnt hdr rows # aL=acnt rows # bL=blank rows # tD=dash rows # tH=total hdr rows # tL=total rows for row=hdrbtm+1 to MAXROWS # handle blank rows - bL if trim(text$[row])="" then : x$=set(1,row,2,"bL") continue endif # special handling for GLR880 glr$=mid(rpage$,4,3) # from init rule set if glr$="880" then : x$=set(1,row,2,"aL") continue endif # handle dash rows - tD # & total rows - tL if left(trim(text$[row]),5)="-----" then : x$=set(1,row,2,"tD") row++ x$=set(1,row,2,"tL") x$=trim(text$[row+1]) if x$<>"" and left(x$,5)<>"-----" then : x$=set(1,row,2,"tH") row++ x$=set(1,row,2,"tL") endif continue endif # handle acnt rows - aL # & acnt desc rows - aD # must make specific to each pgms glr=cnum(glr$,err=*next) cont=0 switch glr case 820,828 if pos("% "=mid(text$[row],27,2)) and pos("% "=mid(text$[row],52,2)) then : x$=set(1,row,2,"aL") cont=1 endif break case 822,824,826,834,836,842 if pos("% "=mid(text$[row],57,2)) and pos("% "=mid(text$[row],82,2)) then : x$=set(1,row,2,"aL") cont=1 endif break case 830 if pos("% "=mid(text$[row],52,2)) and pos("%"=mid(text$[row],134,1)) then : x$=set(1,row,2,"aL") cont=1 endif break case 832 isnum=0 x$=mid(text$[row],17,1) if x$>="0" and x$<="9" then isnum=1 if isnum and pos(" "=mid(text$[row],19,2)) and pos(" "=mid(text$[row],36,2)) then : x$=set(1,row,2,"aL") cont=1 endif break case 838 if pos("% "=mid(text$[row],28,2)) and pos("%"=mid(text$[row],88,1)) then : x$=set(1,row,2,"aL") cont=1 endif break case 840,848 isnum=0 x$=mid(text$[row],12,1) if x$>="0" and x$<="9" then isnum=1 if isnum and pos(" "=mid(text$[row],13,2)) and pos(" "=mid(text$[row],24,2)) then : x$=set(1,row,2,"aL") x$=set(1,row-1,2,"aD") cont=1 endif break case 844 if pos("% "=mid(text$[row],38,2)) and pos("% "=mid(text$[row],58,2)) then : x$=set(1,row,2,"aL") cont=1 endif break case 850 isnum=0 x$=mid(text$[row],67,1) if x$>="0" and x$<="9" then isnum=1 if isnum and left(text$[row],22)=dim(22," ") then : x$=set(1,row,2,"aL") cont=1 endif break case 852 isnum=0 x$=mid(text$[row],59,1) if x$>="0" and x$<="9" then isnum=1 if isnum and left(text$[row],14)=dim(14," ") then : x$=set(1,row,2,"aL") cont=1 endif break case 854 isnum=0 x$=mid(text$[row],23,1) if x$>="0" and x$<="9" then isnum=1 if isnum and pos(" "=mid(text$[row],24,2)) then : x$=set(1,row,2,"aL") x$=set(1,row-1,2,"aD") cont=1 endif break case 856 isnum=0 x$=mid(text$[row],47,1) if x$>="0" and x$<="9" then isnum=1 if isnum and pos(" "=mid(text$[row],49,2)) then : x$=set(1,row,2,"aL") cont=1 endif break case 880 x$=set(1,row,2,"aL") cont=1 break end switch if cont then continue # handle acnt hdr rows - aH if trim(text$[row-1])="bL" and trim(text$[row+1])="" then : x$=set(1,row,2,"aH") continue endif next row } # erase dash rows (dL) # must come before erase tags erase "tD@1,1,3,MAXROWS",3,0,MAXCOLS,1 # erase tags # takes advantage of timing of erases # which is last thing UnForm does erase "aD@1,1,3,MAXROWS",0,0,2,1 erase "aH@1,1,3,MAXROWS",0,0,2,1 erase "aL@1,1,3,MAXROWS",0,0,2,1 erase "bL@1,1,3,MAXROWS",0,0,2,1 erase "tD@1,1,3,MAXROWS",0,0,2,1 erase "tH@1,1,3,MAXROWS",0,0,2,1 erase "tL@1,1,3,MAXROWS",0,0,2,1 [zMrg g/l 4 acnt hdrs] # # flag(s) needed aH # # variable(s) needed hdrbtm # hdrbtm specifies the bottom line of the hdr section # # constant(s) needed LNBGN, LNEND, MAXROWS, DBFONT # LNBGN specifies the beginning column of a detail row # LNEND specifies the ending column of a detail row # MAXROWS specifies the maximun # of rows for a page # DBFONT specifies font to be appplied to acnt desc # This is a global but can be adjusted in rule set # # variable(s) returned none # returns enhanced account hdrs # prepage { # handle acnt hdr rows (aH) sl$="" for row=hdrbtm+1 to MAXROWS if left(text$[row],2)<>"aH" then continue x$=trim(text$[row](3)) x=pos(x$=text$[row]) if x"tL" and x$<>"tH" then continue srow=row-.75,erow=row+.75 # check for multi line total "label" if row