Anda di halaman 1dari 3

TRANSACTIONS

1. INVOICE

a. Invoice Header information such as the customer details, invoice


number, dates, where payment should be sent etc.
1 Record per Invoice

SELECT RCTA.TRX_NUMBER “INVOICENUMBER”,


RCTA.CUST_TRX_TYPE_ID,
RCTA.BILL_TO_CUSTOMER_ID,
RCTA.SHIP_TO_CUSTOMER_ID,
RCTA.TRX_DATE “INVOICEDATE”,
RCTA.COMPLETE_FLAG “Y OR N”
FROM RA_CUSTOMER_TRX_ALL RCTA

b. Line details, what is being invoiced and how much of it, what tax is
Applicable
At least 1 record per Invoice.

Key = RA_CUSTOMER_TRX_LINE_ID (from sequence


RA_CUSTOMER_TRX_LINES_S)

SELECT CUSTOMER_TRX_ID,
LINE_TYPE " LINE, TAX, FREIGHT",
QUANTITY_INVOICED " Line Quantity",
UNIT_SELLING_PRICE "Price per unit",
EXTENDED_AMOUNT "Quantity * Price",
LINK_TO_CUST_TRX_LINE_ID "NULL FOR LINE"
FROM RA_CUSTOMER_TRX_LINES_ALL

c. Information that needs to be posted across to the General Ledger.

1 record for each line record plus 1 for the Invoice Header

Key = CUST_TRX_LINE_GL_DIST_ID (from sequence)

SELECT CUSTOMER_TRX_ID,
CUSTOMER_TRX_LINE_ID,
AMOUNT "Value of dist entered Currency",
ACCTD_AMOUNT "value of dist book currency",
CODE_COMBINATION_ID,
POSTING_CONTROL_ID "-3 if unposted",
GL_DATE " Accounting date",
GL_POSTED_DATE " Date Invoice posted to GL"
FROM RA_CUST_TRX_LINE_GL_DIST_ALL

INVOICES, CREDIT MEMOS, ON ACCOUNT CREDIT, RECEIPTS


INVOICECUSTOMERITEM

SELECT RCT.TRX_NUMBER,
RCT.TRX_DATE,
APS.AMOUNT_DUE_ORIGINAL
RGD.ACCTD_AMOUNT,
RGD.AMOUNT,
MSI.SEGMENT1 ITEM,
OEL.BOOKED_FLAG,
RC.CUSTOMER_NAME
FROM RA_CUSTOMER_TRX_ALL RCT, RA_CUSTOMER_TRX_LINES_ALL RCTL,
AR_PAYMENT_SCHEDULES_ALL APS, RA_CUST_TRX_LINE_GL_DIST_ALL RGD,
RA_CUSTOMERS RC, OE_ORDER_LINES_ALL OEL, MTL_SYSTEM_ITEMS_B MSI
WHERE RCT.CUSTOMER_TRX_ID = RCTL.CUSTOMER_TRX_ID
AND RCT.CUSTOMER_TRX_ID = APS.CUSTOMER_TRX_ID
AND RCT.CUSTOMER_TRX_ID = RGD.CUSTOMER_TRX_ID
AND RCTL.CUSTOMER_TRX_LINE_ID = RGD.CUSTOMER_TRX_LINE_ID
AND RCT.BILL_TO_CUSTOMER_ID = RC.CUSTOMER_ID
AND RCT.SHIP_TO_CUSTOMER_ID = RC.CUSTOMER_ID
AND RC.CUSTOMER_ID = OEL.SOLD_TO_ORG_ID
AND OEL.INVENTORY_ITEM_ID = MSI.INVENTORY_ITEM_ID

INVOICE  CREDITMEMOS

SELECT ARP.AMOUNT_APPLIED,
ARP.GL_DATE,
ARP.FREIGHT_APPLIED,
ARP.LINE_APPLIED,
ARP.TAX_APPLIED,
RCT.TRX_DATE,
RCT.TRX_NUMBER
FROM AR_RECEIVABLE_APPLICATIONS_ALL ARP,
RA_CUSTOMER_TRX_ALL RCT
WHERE RCT.CUSTOMER_TRX_ID = ARP.APPLIED_CUSTOMER_TRX_ID

INVOICE RECEIPTS

SELECT ARP.AMOUNT_APPLIED,
ARP.GL_DATE,
ARP.FREIGHT_APPLIED,
ARP.LINE_APPLIED,
ARP.TAX_APPLIED,
RCT.TRX_DATE INVDATE,
RCT.TRX_NUMBER INVNUM,
RC.CUSTOMER_NUMBER,
ACR.RECEIPT_NUMBER,
ACR.AMOUNT,
APS.AMOUNT_DUE_ORIGINAL,
APS.AMOUNT_DUE_ORIGINAL,
APS.STATUS
FROM AR_RECEIVABLE_APPLICATIONS_ALL ARP,
RA_CUSTOMER_TRX_ALL RCT, AR_CASH_RECEIPTS_ALL ACR, RA_CUSTOMERS RC,
AR_PAYMENT_SCHEDULES_ALL APS
WHERE RCT.CUSTOMER_TRX_ID = ARP.APPLIED_CUSTOMER_TRX_ID
AND RCT.SOLD_TO_CUSTOMER_ID = RC.CUSTOMER_ID
AND RC.CUSTOMER_ID = ACR.PAY_FROM_CUSTOMER
AND APS.CASH_RECEIPT_ID = ACR.CASH_RECEIPT_ID