The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT trxn_extension_id
INTO l_hdr_trxn_extn_id
FROM oe_payments
WHERE header_id=p_Line_Payment_rec.header_id
AND line_id IS NULL
AND nvl(payment_collection_event, 'PREPAY') = 'INVOICE';
SELECT authorization_date
INTO l_hdr_auth_date
FROM IBY_TRXN_EXT_AUTHS_V
WHERE trxn_extension_id = l_hdr_trxn_extn_id
AND authorization_status=0
AND effective_auth_amount > 0;
SELECT creation_date
INTO l_lin_creation_date
FROM oe_order_lines_all
WHERE line_id=p_line_Payment_rec.line_id;
Select invoice_to_org_id
Into l_invoice_to_org_id
From oe_order_headers_all
Where header_id = p_line_payment_rec.header_id;
SELECT count(payment_type_code)
INTO l_count
FROM oe_payments
WHERE line_id = p_Line_Payment_rec.line_id
AND header_id = p_Line_Payment_rec.header_id
AND payment_level_code = 'LINE'
AND nvl(payment_number, -1) <> nvl(p_Line_Payment_rec.payment_number, -1)
AND nvl(payment_collection_event, 'INVOICE') = 'INVOICE'
and payment_type_code <> 'COMMITMENT'
and p_Line_Payment_rec.payment_type_code <> 'COMMITMENT';
SELECT count(payment_type_code)
into l_comt_count
from oe_payments
where line_id = p_Line_Payment_rec.line_id
and header_id = p_Line_Payment_rec.header_id
and payment_level_code = 'LINE'
and nvl(payment_number, -1) <> nvl(p_Line_Payment_rec.payment_number, -1)
and payment_type_code = 'COMMITMENT';
select count(payment_type_code) into l_prepay_count
from oe_payments
where (payment_collection_event = 'PREPAY'
or prepaid_amount is not null )
and header_id = p_Line_Payment_rec.header_id;
select payment_term_id into l_term_id
from oe_order_headers_all
where header_id = p_Line_Payment_rec.header_id;
IF p_Line_Payment_rec.last_updated_by IS NOT NULL AND
( p_Line_Payment_rec.last_updated_by <>
p_old_Line_Payment_rec.last_updated_by OR
p_old_Line_Payment_rec.last_updated_by IS NULL )
THEN
IF NOT OE_Validate.Last_Updated_By(p_Line_Payment_rec.last_updated_by) THEN
x_return_status := FND_API.G_RET_STS_ERROR;
IF p_Line_Payment_rec.last_update_date IS NOT NULL AND
( p_Line_Payment_rec.last_update_date <>
p_old_Line_Payment_rec.last_update_date OR
p_old_Line_Payment_rec.last_update_date IS NULL )
THEN
IF NOT OE_Validate.Last_Update_Date(p_Line_Payment_rec.last_update_date) THEN
x_return_status := FND_API.G_RET_STS_ERROR;
IF p_Line_Payment_rec.last_update_login IS NOT NULL AND
( p_Line_Payment_rec.last_update_login <>
p_old_Line_Payment_rec.last_update_login OR
p_old_Line_Payment_rec.last_update_login IS NULL )
THEN
IF NOT OE_Validate.Last_Update_Login(p_Line_Payment_rec.last_update_login) THEN
x_return_status := FND_API.G_RET_STS_ERROR;
PROCEDURE Entity_Delete
( x_return_status OUT NOCOPY VARCHAR2
, p_Line_Payment_rec IN OE_Order_PUB.Line_Payment_Rec_Type
)
IS
l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
OE_DEBUG_PUB.Add('Entering OE_VALIDATE_Line_Payments.Entity_Delete',1);
OE_DEBUG_PUB.Add('Exiting OE_VALIDATE_Line_Payments.Entity_Delete',1);
, 'Entity_Delete'
);
END Entity_Delete;