You are here: Development Standards > Routines > Application-SpecificRoutines > APFOCHK.PUB

# APFOCHK.PUB

APFOCHK.PUB is a public program that will generate a BBj PDF check form from properly formatted data files. This program will take the data and produce an Accounts Payable check, looking similiar to the OSAS laser form.

PRINT_FORM:

This entry point is used to print an invoice form after data is set up in temporary files.

`0050 PRINT_FORM:`
`0060 ENTER CHKINFO$,APCFH$,APCFD$,FILE[ALL]`

Variable | Description
CHKINFO$ | Template used for generic form information
APVFH$ | Template for check header temporary file
APVFD$ | Template for check detail temporary file
FILE[ALL] | Standard file array

Exit Points | Explanation
EXIT | APFOCHK.PUB normally exits with no error.

GET_TEMPLATES:

This entry point is to retrieve the template format that will be set up and used for general form information, as well as the temporary files built for use for printing checks.

`5005 GET_TEMPLATES:`
`5010 ENTER CHKINFO$,APCFH$,APCFD$`

Variable | Description
CHKINFO$ | Template used for generic form information
APCFH$ | Template for check header temporary file
APCFD$ | Template for check detail temporary file

The CHKINFO$ template has the following format:

Field | Description
PRINTNAME:C(30*) | BBj Java name of printer to print to
FORMID:C(8*) | Form ID from scratch files to print
OUTPATH:C(65*) | Path and name of PDF file to generate if e-mailing or printing to file
LOGO:C(80*) | Path and name of logo image to print on form
COPYTEXT:C(15*) | Text to print if printing multiple copies of form
INDEXHEAD:N(2*) | FILE[x] element that header scratch file is opened on (APCFHxxx)
INDEXDETL:N(2*) | FILE[x] element that detail scratch file is opened on (APCFDxxx)
STUBNAME:C(30*) | Title of stub
COMPNAME:C(30*) | Current company’s name
COMPADD1:C(30*) | Current company’s Address Line 1
COMPADD2:C(30*) | Current company’s Address Line 2
COMPADD3:C(30*) | Current company’s Address Line 3
COMPADD4:C(30*) | Current company’s Address Line 4
COMPADD5:C(30*) | Current company’s Address Line 5
BANKADD1:C(30*) | Bank’s Address Line 1
BANKADD2:C(30*) | Bank’s Address Line 2
BANKADD3:C(30*) | Bank’s Address Line 3
BANKADD4:C(30*) | Bank’s Address Line 4
BANKADD5:C(30*) | Bank’s Address Line 5
LOGOP:C(2*) | L=Left justified, other values = Centered
FORMPROG:C(12*) | "APFOCHK.PUB". Set in a variable so that the multicopy form printing program knows what program to call to print invoices
ARCHIVE:N(1*) | Set to 1 if current copy will be archived
CHKXPOS:N(3*) | X position of the MICR check number on the form
CHKYPOS:N(3*) | Y position of the MICR check number on the form
ROUTEXPOS:N(3*) | X position of the MICR routing code on the form
ROUTEYPOS:N(3*) | Y position of the MICR routing code on the form
ACCTXPOS:N(3*) | X position of the MICR account number on the form
ACCTYPOS:N(3*) | Y position of the MICR account number on the form
SIGLINE:N(1*) | Number of signature lines set up in the Bank (1 or 2)
ROUTE:C(9*) | Bank routing number
ACCT:C(20*) | Checking account number
FRACTION:C(13*) | Fraction ID number

See the Accounts Payable file layouts for APCFHxxx and APCFDxxx for layouts of the temporary files and their templates.