The following lines contain the word 'select', 'insert', 'update' or 'delete':
l_select_flag VARCHAR2(1);
SELECT customer_id, customer_site_use_id
INTO l_customer_id, l_site_use_id
FROM ar_payment_schedules
WHERE payment_schedule_id = p_ps_id;
SELECT NVL(discount_grace_days, 0)
INTO l_grace_days
FROM hz_customer_profiles
WHERE cust_account_id = l_customer_id
AND site_use_id = l_site_use_id;
arp_util.debug('get_discount: ' || 'EXCEPTION: Error selecting discount_grace_days from site level customer profile ');
SELECT NVL(discount_grace_days, 0)
INTO l_grace_days
FROM hz_customer_profiles
WHERE cust_account_id = l_customer_id
AND site_use_id IS NULL;
l_select_flag := 'N' ; -- set to 'N' if select_flag is FALSE
l_select_flag,
l_mode,
l_error_code,
l_cash_receipt_id,
p_called_from, /*Bug 5223829*/
l_amt_in_dispute /*Bug 5223829*/
);
SELECT customer_id, customer_site_use_id
INTO l_customer_id, l_site_use_id
FROM ar_payment_schedules
WHERE payment_schedule_id = p_ps_id;
SELECT NVL(discount_grace_days, 0)
INTO l_grace_days
FROM hz_customer_profiles
WHERE cust_account_id = l_customer_id
AND site_use_id = l_site_use_id;
SELECT NVL(discount_grace_days, 0)
INTO l_grace_days
FROM hz_customer_profiles
WHERE cust_account_id = l_customer_id;
SELECT discount_date
INTO l_discount_date
FROM ar_trx_discounts_v
WHERE payment_schedule_id = p_ps_id;