Thursday 22 May 2014

SQL Query to check if AP invoices is Accounted or not.

Validated but not posted.

SELECT INVOICE_NUM
FROM AP_INVOICES_ALL
WHERE AP_INVOICES_PKG.GET_APPROVAL_STATUS
 (INVOICE_ID,
 INVOICE_AMOUNT,
 PAYMENT_STATUS_FLAG,
 INVOICE_TYPE_LOOKUP_CODE
 ) ='APPROVED'
 AND AP_INVOICES_PKG.GET_POSTING_STATUS(INVOICE_ID)='N'

Validated and posted. 

SELECT INVOICE_NUM
FROM AP_INVOICES_ALL
WHERE AP_INVOICES_PKG.GET_APPROVAL_STATUS
 (INVOICE_ID,
 INVOICE_AMOUNT,
 PAYMENT_STATUS_FLAG,
 INVOICE_TYPE_LOOKUP_CODE
 ) ='APPROVED'
 AND AP_INVOICES_PKG.GET_POSTING_STATUS(INVOICE_ID)='P'

There are 4 different types as below

'S' - Selected
'P' - Partial
'N' - Unposted
'Y' - Posted


3 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. how to get ap invoice posted to gl date and invoice validation dates

    ReplyDelete
  3. I wanted to thank you for this excellent read!! I definitely loved every little bit of it. I have you bookmarked your site to check out the new stuff you post. check the call history

    ReplyDelete