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

# APAGE.PUB

APAGE.PUB is a public program that ages open invoices in the APINxxx file.

(Normal Entry Point)

This entry point will age invoices for a specific vendor.

`0100 ENTER VEND$,INV$,AGEDATE,CUTOFF,BUCKETS[ALL],DAYS[ALL],APINFNUM,FILE[ALL],`
`0100:TYPE,O2$,PREPAY,XPOS,YPOS,COUNT,HELD,YEAR,PERIOD,CUTOFF_TYPE$`

Variable | Description
VEND$ | Vendor ID to age
INV$ | Specific invoice to age; set to “” to age all invoices for the vendor
AGEDATE | Aging date
CUTOFF | Cutoff date—invoices after the Julian date will not be aged; set to 0 to age all invoices
BUCKETS[ALL] | Returns aged balances in BUCKETS[1:6]
DAYS[ALL] | DIM DAYS[4] and set to aging days before calling (for example, DAYS[0]=0, DAYS[1]=30, DAYS[2]=60, and so on)
APINFNUM | FILE[] array index for the APINxxx file
FILE[ALL] | Standard file array used for the data file channel number
TYPE | Set to 1 for invoice date or 2 for due date
O2$ | Accounts Payable or Purchase Order options string
PREPAY | Unused
XPOS | Column position for speedo display; set to zero to suppress
YPOS | Row position for speedo display; set to zero to suppress
COUNT | Returns count of invoices processed
HELD | Set to 1 to ignore held invoices or 0 to include them
YEAR | Year to age invoices from
PERIOD | Year to age invoices from
CUTOFF_TYPE$ | Set to "P" to cutoff by period, or "D" to cutoff by date

Exit Points | Explanation
EXIT | The normal entry point normally exits with no error.
EXIT ERR | An error is returned when an error occurs.

AGE_ALL_VENDORS:

This entry point will age all vendors and their invoices.

`3005 AGE_ALL_VENDORS:`
`3010 ENTER APINFNUM,APVEFNUM,XPOS,YPOS,OSGUI$`

Variable | Description
APINFNUM | FILE[] array index for the APINxxx file
APVEFNUM | FILE[] array index for the APVExxx file
XPOS | Column position for speedo display; set to zero to suppress
YPOS | Row position for speedo display; set to zero to suppress
OSGUI$ | Standard GUI template

Exit Points | Explanation
EXIT | AGE_ALL_VENDORS normally exits with no error.