AP Invoice and Payment Audit by Voucher Number

Description

Categories
Enginatics
Repository
GitHub
Lists every voucher number of the Payables invoice and payment document sequences with its status: Entered, Deleted (the number was issued, but the invoice or payment no longer exists) or Not Entered (the number is missing from the sequence audit trail).

Replaces Oracle's Invoice Audit by Voucher Number (APXINVAD) and Payment Audit by Voucher Number (APXPAYAD). Unlike Oracle's payment report, a voided payment is listed as Entered with its void date, and a payment number without a payment as Deleted instead of Not Entered.

Missing numbers are the gaps between the numbers recorded in the sequence audit table, counted from the sequence's initial value, and belong to the ledger of the next recorded number. Numbers after the last recorded voucher are not reported.

The GL date of a payment is the earliest accounting date of its invoice payments.

SQL 107 lines

Parameters 8

ParameterTypeList of values SQL
LedgerLOV
gl.name=:ledger
Operating UnitLOV
(haouv.name=:operating_unit or z.org_id is null and z.set_of_books_id in (select hou.set_of_books_id from hr_operating_units hou where hou.name=:operating_unit))
Sequence NameLOV
fds.name=:sequence_name
Voucher Number FromNumber
z.voucher_number>=:voucher_number_from
Voucher Number ToNumber
z.voucher_number<=:voucher_number_to
GL Date FromDate
and x.gl_date>=:gl_date_from
GL Date ToDate
and x.gl_date<:gl_date_to+1
StatusLOV
z.status_code=xxen_util.lookup_code(:status,'SEQ_DOCUMENT_STATUS',0)