Receivables uses the following tables to store your invoice and guarantee information:
RA_CUSTOMER_TRX
RA_CUSTOMER_TRX_LINES
RA_CUST_TRX_LINE_GL_DIST
AR_PAYMENT_SCHEDULES
AR_ADJUSTMENTS
Consider a sample invoice:
Invoice Number: I-103
Bill-To: ABC Inc
Invoice Date: 22-May-94
Invoice Lines:
| Invoice Line | Amount | Tax | Total Amount |
|---|---|---|---|
| 1 Table @ $1000 | 1000.00 | 100.00 | $1100.00 |
with a sample guarantee:
Guarantee Number: G-102
Bill-To: ABC Inc
Deposit Date: 20-May-94
Amount: $500
Invoice I-103 applied against guarantee G-102 is stored in this table as follows:
| customer_trx_id | trx_number | bill_to_customer_id | trx_date |
|---|---|---|---|
| 110120 | I-103 | ABC Inc | 22-May-94 |
Invoice I-103 applied against guarantee G-102 is stored in this table as follows:
| customer_trx_line_id | customer_trx_id | link_to_cust_trx_line_id | line_type | extended_amount |
|---|---|---|---|---|
| 120 | 110120 | LINE | 1000 | |
| 121 | 110120 | 120 | TAX | 100 |
If there had been a sales credit for this invoice, records relating to the revenue credit would be inserted in the table RA_CUST_TRX_LINE_SALESREPS, linked via the column customer_trx_line_id.
Invoice I-103 applied against guarantee G-102 is stored in this table as follows:
| cust_trx_line_gl_dist_id | code_combination_id | customer_trx_line_id | account_class | amount |
|---|---|---|---|---|
| 200101 | 01-1200-1000-3000 | REC | 1100 | |
| 200102 | 01-8100-1000-3000 | 120 | REV | 1000 |
| 200103 | 01-4100-1000-3000 | 121 | TAX | 100 |
Invoice I-103 applied against guarantee G-102 is stored in this table as follows:
| payment_ schedule_id | amount_due_original | amount_due_remaining | customer_trx_id | cash_receipt_id | trx_number | status | amount_applied | class |
|---|---|---|---|---|---|---|---|---|
| 401100 | 1100 | 1100 | 110120 | NULL | I-103 | OP | NULL | INV |
The payment schedule for the invoice originally shows an amount_due_remaining of 1100.
Invoice I-103 applied against guarantee G-102 is stored in this table as follows:
| adjustment_id | amount | customer_trx_id | type | payment_schedule_id | code_combination_id |
|---|---|---|---|---|---|
| 56789 | -500 | 110120 | INVOICE | 302302 | 01-6200-1000-3000 |
When the invoice is applied to the guarantee, Receivables inserts a record into AR_ADJUSTMENTS to record an adjustment against the invoice. The amount column equals the inverse of the amount_due_remaining from the AR_PAYMENT_SCHEDULES table for the guarantee or the total value of the invoice lines, whichever is smaller. Receivables uses the customer_trx_id and payment_schedule_id to link the adjustment to the guarantee payment schedule in the AR_PAYMENT_SCHEDULES table.
The code_combination_id column stores the unearned revenue account of the guarantee. Receivables will use this account to reverse the unearned revenue distribution, originally created by the guarantee, and will use the unbilled receivable account, originally created by the guarantee, to reverse the unbilled receivable balance.
Invoice I-103 applied against guarantee G-102 is stored in this table as follows:
| payment_schedule_id | amount_due_original | amount_due_remaining | customer_trx_id | trx_number | status | amount_applied | class | amount_adjusted |
|---|---|---|---|---|---|---|---|---|
| 302302 | 500 | 0 | 110120 | G-102 | CL | NULL | GUAR | -500 |
The payment schedule record of the guarantee is updated to reflect the application of the invoice against the guarantee. The amount_due_remaining column is zero and the amount_adjusted column becomes -500. The payment schedule record for the invoice will not be impacted by the adjustment.