← Back to Cases
AP Invoice Tax and Distribution Amounts Incorrect — Full ZX and XLA Correction
Case Number00057940
Oracle ModuleAccounts Payable (AP) / eBusiness Tax (ZX) / Subledger Accounting (XLA)
EBS VersionR12
Functional AreaInvoice Processing / Tax Calculation / Subledger Accounting
Related PatchesNone

Symptoms

Root Cause

A cancellation, adjustment, or correction process did not complete cleanly, leaving residual non-zero amounts across the AP invoice, tax, and accounting layers. The amounts need to be zeroed in all affected tables to bring AP, ZX, and XLA into alignment. This is a more comprehensive version of the invoice zeroing fix that additionally corrects ZX_LINES_SUMMARY, ZX_REC_NREC_DIST, and the XLA accounting lines.

Resolution

Step 1 – Create backup tables

Run data_fix.sql. Backup tables are created for:

Step 2 – Zero AP invoice distribution amounts

Update AP_INVOICE_DISTRIBUTIONS_ALL:

Step 3 – Zero AP invoice line amounts

Update AP_INVOICE_LINES_ALL to set amount = 0 for the affected invoice lines.

Step 4 – Zero ZX tax line amounts

Update ZX_LINES to set line_amt = 0, rec_tax_amt = 0, and tax_amt = 0.

Step 5 – Zero ZX summary and recoverable/non-recoverable distribution amounts
Step 6 – Zero ZX determining factor line amount

Update ZX_LINES_DET_FACTORS to set line_amt = 0 for the affected invoice and transaction line.

Step 7 – Zero XLA accounting line amounts

Update XLA_AE_LINES to set entered and accounted debit/credit amounts to zero for the affected accounting lines across the affected AE headers.

Step 8 – Zero XLA distribution link amounts

Update XLA_DISTRIBUTION_LINKS to set unrounded_entered_cr/dr = 0 and unrounded_accounted_cr/dr = 0.

Step 9 – Commit and validate

Issue COMMIT. Re-validate the invoice and confirm it passes with zero tax amounts across all layers.


Script Inventory

FileDescription
data_fix.sqlCreates backups; zeros AP_INVOICE_DISTRIBUTIONS_ALL (amount, total_dist_amount, taxable_amount); zeros AP_INVOICE_LINES_ALL; zeros ZX_LINES, ZX_LINES_SUMMARY, ZX_REC_NREC_DIST, ZX_LINES_DET_FACTORS; zeros XLA_AE_LINES entered/accounted DR/CR; zeros XLA_DISTRIBUTION_LINKS unrounded amounts.

Key Tables Affected

TableAction
AP_INVOICE_DISTRIBUTIONS_ALLUpdate amount, total_dist_amount, taxable_amount to 0
AP_INVOICE_LINES_ALLUpdate amount to 0
ZX_LINESUpdate line_amt, rec_tax_amt, tax_amt to 0
ZX_LINES_SUMMARYUpdate TAX_AMT to 0
ZX_REC_NREC_DISTUpdate rec_nrec_tax_amt, TRX_LINE_DIST_AMT, TRX_LINE_DIST_TAX_AMT to 0
ZX_LINES_DET_FACTORSUpdate line_amt to 0
XLA_AE_LINESUpdate entered/accounted DR/CR amounts to 0
XLA_DISTRIBUTION_LINKSUpdate unrounded entered/accounted amounts to 0