Tuesday, 24 January 2012

AR RECEIPT TO INVOICE QUERY

Select * from GL_JE_HEADERS gjh,
         GL_JE_LINES gjl,
         AR_CASH_RECEIPT_HISTORY_ALL acrha,
         AR_CASH_RECEIPTS_ALL acra,
         AR_RECEIVABLE_APPLICATIONS_ALL araa,
         RA_CUSTOMER_TRX_ALL rcta,
         RA_CUSTOMER_TRX_LINES_ALL rctla,
        RA_CUST_TRX_LINE_GL_DIST_ALL rctlgda,
         GL_CODE_COMBINATIONS gcc
   WHERE gjh.JE_HEADER_ID = gjl.JE_HEADER_ID
   AND gjl.CODE_COMBINATION_ID = abaa.ASSET_CODE_COMBINATION_ID
   AND acrha.CASH_RECEIPT_ID = acra.CASH_RECEIPT_ID
   AND acrha.CASH_RECEIPT_HISTORY_ID = araa.CASH_RECEIPT_HISTORY_ID
   AND acrha.CASH_RECEIPT_ID = araa.CASH_RECEIPT_ID
   AND rcta.CUSTOMER_TRX_ID = araa.APPLIED_CUSTOMER_TRX_ID
   AND rcta.CUSTOMER_TRX_ID = rctla.CUSTOMER_TRX_ID
   AND rctlgda.CUSTOMER_TRX_LINE_ID = rctla.CUSTOMER_TRX_LINE_ID
   AND gcc.CODE_COMBINATION_ID = rctlgda.CODE_COMBINATION_ID

1 comment: