AP Payment Schedule - draft

Description
Categories: BI Publisher, Financials, Procurement
Application: Payables
Source: Payment Schedule Report (XML) - Not Supported: Reserved For Future Use
Short Name: APXPAYSC_XML
DB package: AP_APXPAYSC_XMLP_PKG
SELECT
	upper(ALC.DISPLAYED_FIELD)							C_PAYMENT_METHOD, 
	APS.DUE_DATE								C_DUE_DATE, 
	decode(:h_sort_by_alternate, 'Y', PV.VENDOR_NAME_ALT, 'N', PV.VENDOR_NAME)		C_SUPPLIER_NAME, 
	decode(:h_sort_by_alternate, 'Y', PVS.VENDOR_SITE_CODE_ALT, 'N', PVS.VENDOR_SITE_CODE)	C_SUPPLIER_SITE, 
                   PV.VENDOR_NAME 								C_SUPPLIER_NAME_DISP, 
	PVS.VENDOR_SITE_CODE							C_SUPPLIER_SITE_CODE_DISP, 
	AI.INVOICE_NUM								C_INVOICE_NUM, 
	AI.INVOICE_DATE								C_INVOICE_DATE,
	APS.GROSS_AMOUNT							C_INVOICE_AMOUNT,
	APS.AMOUNT_REMAINING							C_SCHEDULED_AMOUNT
FROM 
	AP_LOOKUP_CODES 			                                      ALC,
 	AP_PAYMENT_SCHEDULES				APS, 
 	AP_INVOICES					AI, 
 	PO_VENDORS					PV, 
	PO_VENDOR_SITES					PVS
WHERE  APS.DUE_DATE <= :p_end_due_date
    and  nvl(APS.HOLD_FLAG,'N') <> 'Y'     and  APS.PAYMENT_STATUS_FLAG IN ('N','P') 
    and  AI.PAYMENT_CURRENCY_CODE = :p_payment_currency
    and  (ALC.LOOKUP_CODE = :p_payment_method  or :p_payment_method is null)
    and   ALC.LOOKUP_TYPE = 'PAYMENT METHOD' 
    and  ALC.LOOKUP_CODE = APS.PAYMENT_METHOD_LOOKUP_CODE
    and  (AI.PAY_GROUP_LOOKUP_CODE = :p_pay_group or :p_pay_group is null)
    and  ((APS.PAYMENT_PRIORITY between :p_priority_range_low and :p_priority_range_high) or (:p_priority_range_low is null and :p_priority_range_high is null))
    and  (AI.VENDOR_ID = :p_supplier_name or :p_supplier_name is null)
    and  APS.INVOiCE_ID = AI.INVOICE_ID	
    and  PV.VENDOR_ID = AI.VENDOR_ID
    and  PVS.VENDOR_SITE_ID = AI.VENDOR_SITE_ID
    and  AI.CANCELLED_DATE  is NULL
	               		    and AP_INVOICES_PKG.GET_APPROVAL_STATUS(AI.INVOICE_ID, AI.INVOICE_AMOUNT, AI.PAYMENT_STATUS_FLAG, AI.INVOICE_TYPE_LOOKUP_CODE) IN 
         ('APPROVED', 'UNPAID')
ORDER BY C_PAYMENT_METHOD,C_DUE_DATE,C_SUPPLIER_NAME,C_SUPPLIER_SITE,C_SUPPLIER_NAME_DISP,C_SUPPLIER_SITE_CODE_DISP,C_INVOICE_NUM
Parameter Name SQL text Validation
Ledger Id
 
Supplier Name
 
LOV Oracle
Priority Range High
 
Number
Priority Range Low
 
Number
Pay Group
 
LOV Oracle
Payment Method
 
LOV Oracle
End Due Date
 
Date
Payment Currency
 
LOV Oracle