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

# POFOPUR.PUB

POFOPUR.PUB is a public program that will generate a BBj PDF purchase order form from properly formatted data files. This program will take the data and produce a purchase order looking similiar to the OSAS laser form.

PRINT_FORM:

This entry point is used to print a purchase order form after data is set up in temporary files.

`0050 PRINT_FORM:`
`0060 ENTER PURCINFO$,POIFH$,POIFD$,FILE[ALL]`

Variable | Description
PURCINFO$ | Template used for generic form information
POIFH$ | Template for purchase order header temporary file
POIFD$ | Template for purchase order detail temporary file
FILE[ALL] | Standard file array

Exit Points | Explanation
EXIT | POFOPUR.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 purchase orders.

`4010 GET_TEMPLATES:`
`4020 ENTER PURCINFO$,POIFH$,POIFD$`

Variable | Description
PURCINFO$ | Template used for generic form information
POIFH$ | Template for purchase order header temporary file
POIFD$ | Template for purchase order detail temporary file

The PURCINFO$ 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 (ARIFHxxx)
INDEXDETL:N(2*) | FILE[x] element that detail scratch file is opened on (ARIFDxxx)
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
LOGOP:C(2*) | L=Left justified, other values = Centered
FORMPROG:C(12*) | "ARFOINV.PUB". Set in a variable so that the multicopy form printing program knows what program to call to print invoices

See the Purchase Order file layouts for POIFHxxx and POIFDxxx for layouts of the temporary files and their templates.