4355: --get payment term from customer profiles
4356: ----------------------------------------------------------------------------
4357: CURSOR l_std_terms_csr (cp_cust_id IN NUMBER,
4358: cp_site_use_id IN NUMBER) IS
4359: SELECT c.standard_terms standard_terms
4360: FROM hz_customer_profiles c
4361: WHERE c.cust_account_id = cp_cust_id
4362: AND c.site_use_id = cp_site_use_id
4363: UNION
4360: FROM hz_customer_profiles c
4361: WHERE c.cust_account_id = cp_cust_id
4362: AND c.site_use_id = cp_site_use_id
4363: UNION
4364: SELECT c1.standard_terms standard_terms
4365: FROM hz_customer_profiles c1
4366: WHERE c1.cust_account_id = cp_cust_id
4367: AND c1.site_use_id IS NULL
4368: AND NOT EXISTS (