How to link "Corporate card transaction reversal" invoice lines from expenses to Company Account
Summary:
I am attempting to create a BI report using SQL Query to report on the miscellaneous invoice lines, which are system generated from credit card expense reports by Oracle Cloud Fusion 23A. These miscellaneous invoice lines are automatically generated from 'company account' settings of credit cards, and are given the default line description of "Corporate card transaction reversal.”
I would like to report on these system generated miscellaneous invoice lines, and their linkages to their respective 'company accounts' (i.e. which company account was a miscellaneous invoice line generated from?).
I'm trying to link my code below to the table holding company account data, EXM_CC_COMPANY_ACCOUNTS table through EXM_CREDIT_CARD_TRXNS table. However, in the miscellaneous invoice lines generated by expense reports (invoices with invoice number starting 'ER#'), their CREDIT_CARD_TRX_ID fields are null in AP_INVOICE_LINES_ALL table. I noticed that their SOURCE_TRX_ID and SOURCE_LINE_ID in AP_INVOICE_LINES_ALL table are populated. However, I am unable to find a table that use either of these IDs.