Query to get customer payment terms in oracle apps
In this post , we will be discuss about SQL Query to get customer payment terms in oracle apps. Payment Terms is the agreement between two parties for example customer and supplier , about payment due. Based on the Payment Terms both parties do the payments to each other. This helps to decide when the payment will be due once we got the services or goods from other party. Here below I will share detail sql query which helps to get customer payment terms in oracle apps.
Important Table of customer payment terms SQL query.
1.hz_cust_site_uses_all.
2.hz_cust_acct_sites_all.
3.ar_customers.
4.ra_terms.
Complete SQL Query to get customer payment terms in oracle apps
select customer_name,SITE_USE_CODE,LOCATION,PAYMENT_TERM_ID,name
from apps.hz_cust_site_uses_all a1,
hz_cust_acct_sites_all a2,
ar_customers a3,
ra_terms a4
where a1.CUST_ACCT_SITE_ID=a2.CUST_ACCT_SITE_ID
and a2.CUST_ACCOUNT_ID=a3.CUSTOMER_ID
and a3.CUSTOMER_ID=:P_CUSTOMER_ID
and a1.PAYMENT_TERM_ID=a4.TERM_ID(+)
from apps.hz_cust_site_uses_all a1,
hz_cust_acct_sites_all a2,
ar_customers a3,
ra_terms a4
where a1.CUST_ACCT_SITE_ID=a2.CUST_ACCT_SITE_ID
and a2.CUST_ACCOUNT_ID=a3.CUSTOMER_ID
and a3.CUSTOMER_ID=:P_CUSTOMER_ID
and a1.PAYMENT_TERM_ID=a4.TERM_ID(+)
0 comments:
Post a Comment