Description:
Aging reports help to identify how old the customer Invoice due for the payment. This helps to identify and to decide those Invoice is due last 30 or Last 60 days for the payment, and it’s still pending.
CREATE OR REPLACE FUNCTION APPS.Aging_Bucket_Due
(P_CUST_ACCOUNT_ID IN NUMBER,
P_AGING_BUCKET IN NUMBER)
RETURN NUMBER
IS
l_bucket_balance NUMBER(10,2);
BEGIN
select nvl(sum(arp.acctd_amount_due_remaining),0)
into l_bucket_balance
from ar_payment_schedules_all arp,
ar_aging_buckets ab,
ar_aging_bucket_lines abl,
iex_delinquencies_all iexd
where iexd.cust_account_id = P_CUST_ACCOUNT_ID
and iexd.status = ‘DELINQUENT’
and abl.aging_bucket_id = ab.aging_bucket_id
and Ab.bucket_name = FND_PROFILE.VALUE(‘IEX_COLLECTIONS_BUCKET_NAME’)
and iexd.payment_schedule_id = arp.payment_schedule_id
and (trunc(sysdate) – trunc(arp.due_date)) between abl.days_start and abl.days_to
and arp.status =’OP’
and abl.Bucket_Sequence_num = P_AGING_BUCKET;
RETURN l_bucket_balance;
END Aging_Bucket_Due;
Summary:
This Post described the script to get Aging Bucket Due for Customer in Oracle EBS.
Queries?
Do drop a note by writing us at doyen.ebiz@gmail.com or use the comment section below to ask your questions.