My Oracle Support Banner

R12: Incorrect Payment Accounting If Discount is Applied (Doc ID 1076138.1)

Last updated on SEPTEMBER 18, 2017

Applies to:

Oracle Payables - Version 12.0.0 to 12.1.3 [Release 12.0 to 12.1]
Information in this document applies to any platform.
ConcurrentProgram:XLAACCUP - Create Accounting Program


Payments with discounts are not accounting properly.

The accounting goes wrong in the given scenarios:

1.In case of discounts, if the payment amount is 1000 and discount is 30, the paid amount becomes 970.

Hence,the journal entries should be as shown below:

liability 1000
cash/cash clearing <970>
discount <30>

But the liability account is getting debited by 970.

In case of unaccounted reversal events and accounted reversed events (creation is reversed and cancellation is reversal), the amount of the reversed event was being considered for finding the prorated_amount, but the reversal amount was left out, leading to a discrepancy in accounting.

2.In the case of draft accounting, we do not call the procedure lock_documents_autonomous in the extract hook, because of which, the records in AP_PAYMENT_HISTORY_ALL still have a posted_flag of 'N' even though the record has been selected for accounting.

This causes an issue, due to the different states of POSTED_FLAG in draft Vs the final accounting, we have get_pay_sum returning 10 in final mode, whereas in the draft mode it returns 0 (because of no records being selected).

Hence the Payment amount in draft mode gets entered as 100 in APHD instead of 90 (as in final), which inflates the liability relief and cash/cash clearing credit.

Please use the below script to identify the affected transactions:

SELECT ac.check_id,
ac.amount check_amount,
FROM ap_checks_all ac,
ap_invoice_payments_all aip,
ap_payment_history_all aph
WHERE aip.check_id = ac.check_id
AND ac.void_date IS NULL
AND aph.check_id = aip.check_id
AND aph.accounting_event_id = aip.accounting_event_id
AND aip.discount_taken <> 0
AND aip.posted_flag = 'Y'
AND aip.reversal_inv_pmt_id IS NULL
AND aip.amount - NVL(aip.discount_taken, 0) =
SELECT SUM(aphd.amount)
FROM ap_payment_hist_dists aphd
WHERE aphd.invoice_payment_id = aip.invoice_payment_id
AND aphd.accounting_event_id = aip.accounting_event_id
AND aphd.pay_dist_lookup_code = 'CASH'
FROM xla_ae_headers xah
WHERE xah.event_id = aip.accounting_event_id
AND xah.application_id = 200
AND xah.ledger_id = aip.set_of_books_id
AND xah.balance_type_code = 'A'
AND xah.upg_batch_id IS NULL


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.