Create Function Mentioned Below to get AP Invoice Validation Status.
For Example :
Invoice Validation Status
Fully Applied |
Unvalidated |
Never Validated |
Validated |
Cancelled |
Available |
Needs Revalidation |
Unpaid |
CREATE OR REPLACE function APPS.TATA_AP_INVOICE_STATUS(P_Invoice_id Number)
return varchar2 is
V_STATUS varchar2(500);
begin
SELECT
DECODE(AP_INVOICES_UTILITY_PKG.GET_APPROVAL_STATUS(AIA.INVOICE_ID,AIA.INVOICE_AMOUNT,AIA.PAYMENT_STATUS_FLAG,AIA.INVOICE_TYPE_LOOKUP_CODE),
'FULL' , 'Fully Applied',
'NEVER APPROVED' , 'Never Validated',
'NEEDS REAPPROVAL', 'Needs Revalidation',
'CANCELLED' , 'Cancelled',
'UNPAID' , 'Unpaid',
'AVAILABLE' , 'Available',
'UNAPPROVED' , 'Unvalidated',
'APPROVED' , 'Validated',
'PERMANENT' , 'Permanent Prepayment',
NULL)
INTO V_STATUS
FROM
AP_INVOICES_ALL AIA
WHERE AIA.INVOICE_ID = P_INVOICE_ID;
return(V_STATUS);
EXCEPTION
when no_data_found then
return null;
end;
Hello Muhammad. This is a really useful post, thank you! Do we have permission to use this code? We'd like to include it in a report we're writing
ReplyDeleteThanks
Ross
Yes you can use. Thats why i post here
ReplyDeletehello Muhammad, thank you
ReplyDelete