The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT JAI_AR_CASH_RECEIPTS_S1.CURRVAL
FROM DUAL;
SELECT LOC_CASH_RECEIPT_ID,
RECEIPT_AMOUNT,
CUSTOMER_ID,
CONFIRM_FLAG,
CURRENCY_CODE,
EXCHANGE_RATE
FROM JAI_AR_CASH_RECEIPTS_ALL
WHERE TEMP_SEQUENCE_ID = PN_TEMP_SEQUENCE_ID
AND CASH_RECEIPT_ID IS NULL;
--raise_application_error(-20010,'Either of Receipt Amount or customer details or currency details are changed. Delete the record using Zoom function');
pv_return_message := 'Either of Receipt Amount or customer details or currency details are changed. Delete the record using Tools Menu';
UPDATE jai_ar_cash_receipts_all
SET cash_receipt_id = pr_new.cash_receipt_id,
temp_sequence_id = NULL
WHERE loc_cash_receipt_id = r_check_tmp_data.loc_cash_receipt_id;
UPDATE jai_cmn_document_taxes
SET source_doc_id = pr_new.cash_receipt_id,
source_doc_line_id = NULL
WHERE source_doc_line_id = r_check_tmp_data.loc_cash_receipt_id
AND source_table_name = 'JAI_AR_CASH_RECEIPTS_ALL';
SELECT confirm_flag
FROM jai_ar_cash_receipts_all
WHERE cash_receipt_id = cp_cash_receipt_id;
DELETE jai_cmn_document_taxes
WHERE source_table_name = 'JAI_AR_CASH_RECEIPTS_ALL'
AND source_doc_id = pr_old.cash_receipt_id;
DELETE jai_ar_cash_receipts_all
WHERE cash_receipt_id = pr_old.cash_receipt_id;
SELECT confirm_flag
FROM jai_ar_cash_receipts_all
WHERE cash_receipt_id = cp_cash_receipt_id;
DELETE jai_cmn_document_taxes
WHERE source_table_name = 'JAI_AR_CASH_RECEIPTS_ALL'
AND source_doc_id = pr_old.cash_receipt_id;
DELETE jai_ar_cash_receipts_all
WHERE cash_receipt_id = pr_old.cash_receipt_id;
--raise_application_error(-20011, 'You can''t delete this receipt. Reverse the receipt');
pv_return_message := 'You can''t delete this receipt. Reverse the receipt';