The following lines contain the word 'select', 'insert', 'update' or 'delete':
select nvl(sum(payment_amount),0)
into l_prepay_payment_amount
from oe_payments
where header_id = p_Header_Payment_rec.header_id
and payment_collection_event = 'PREPAY'
and prepaid_amount is null
and nvl(payment_number, -1) <> nvl(p_Header_Payment_rec.payment_number, -1);
select nvl(sum(prepaid_amount),0)
into l_prepaid_amount
from oe_payments
where header_id = p_Header_Payment_rec.header_id
and prepaid_amount is not null
and nvl(payment_number, -1) <> nvl(p_Header_Payment_rec.payment_number, -1);
select count(payment_type_code) into l_line_payment_count
from oe_payments
where header_id = p_Header_Payment_rec.header_id
and line_id is not null
and payment_type_code <> 'COMMITMENT';
Select invoice_to_org_id
Into l_invoice_to_org_id
From oe_order_headers_all
Where header_id = p_header_payment_rec.header_id;
SELECT count(*)
INTO l_count
FROM oe_payments
WHERE header_id = p_Header_Payment_rec.header_id
AND line_id is null
AND payment_level_code = 'ORDER'
AND nvl(payment_collection_event, 'INVOICE') = 'INVOICE'
AND nvl(payment_number, -1) <> nvl(p_Header_Payment_rec.payment_number, -1);
IF p_Header_Payment_rec.last_updated_by IS NOT NULL AND
( p_Header_Payment_rec.last_updated_by <>
p_old_Header_Payment_rec.last_updated_by OR
p_old_Header_Payment_rec.last_updated_by IS NULL )
THEN
IF NOT OE_Validate.Last_Updated_By(p_Header_Payment_rec.last_updated_by) THEN
x_return_status := FND_API.G_RET_STS_ERROR;
IF p_Header_Payment_rec.last_update_date IS NOT NULL AND
( p_Header_Payment_rec.last_update_date <>
p_old_Header_Payment_rec.last_update_date OR
p_old_Header_Payment_rec.last_update_date IS NULL )
THEN
IF NOT OE_Validate.Last_Update_Date(p_Header_Payment_rec.last_update_date) THEN
x_return_status := FND_API.G_RET_STS_ERROR;
IF p_Header_Payment_rec.last_update_login IS NOT NULL AND
( p_Header_Payment_rec.last_update_login <>
p_old_Header_Payment_rec.last_update_login OR
p_old_Header_Payment_rec.last_update_login IS NULL )
THEN
IF NOT OE_Validate.Last_Update_Login(p_Header_Payment_rec.last_update_login) THEN
x_return_status := FND_API.G_RET_STS_ERROR;
select count(payment_type_code) into l_line_payment_count
from oe_payments
where header_id = p_Header_Payment_rec.header_id
and line_id is not null;
PROCEDURE Entity_Delete
( x_return_status OUT NOCOPY VARCHAR2
, p_Header_Payment_rec IN OE_Order_PUB.Header_Payment_Rec_Type
)
IS
l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
OE_DEBUG_PUB.Add('Entering OE_VALIDATE_Header_Payments.Entity_Delete',1);
OE_DEBUG_PUB.Add('Exiting OE_VALIDATE_Header_Payments.Entity_Delete',1);
, 'Entity_Delete'
);
END Entity_Delete;