The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT pay_admin_assigned_ref_code
FROM IBY_PAY_INSTRUCTIONS_ALL
WHERE payment_instruction_id = p_pinstr_id;
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec,p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec,p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec,p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insert_transaction_errors('N',p_docErrorTab);
SELECT calling_app_doc_unique_ref2
FROM IBY_DOCS_PAYABLE_ALL -- added all
WHERE upper(document_type)='STANDARD'
AND calling_app_id=200
AND UPPER(payment_function) IN ('PAYABLES_DISB','EMPLOYEE_EXP')
AND document_status = 'PAYMENT_CREATED'
AND payment_id in (select payment_id
from iby_payments_all
where payment_instruction_id = p_instruction_id);
SELECT vendor_id, invoice_num
FROM AP_INVOICES
WHERE
invoice_id=p_invoice_id;
SELECT nvl(vendor_type_lookup_code, 'XXX') -- Bug 6398944
FROM AP_SUPPLIERS
WHERE vendor_id = p_vendor_id;
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
x_error_mesg := 'All selected invoices must have one vendor type, either EMPLOYEE or NON-EMPLOYEE.';
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insert_transaction_errors('N',p_docErrorTab);
This procedure is responsible to insert the treasury symbol into the table FV_TP_TS_AMT_DATA along with the amount.
This table will later be used for the maximum treasury symbol validations.
*/
PROCEDURE TREASURY_SYMBOLS_PROCESS
(
p_format_name IN VARCHAR2,
p_instruction_id IN NUMBER,
p_payment_id IN NUMBER,
p_invoice_id IN NUMBER,
p_docErrorTab IN OUT NOCOPY IBY_VALIDATIONSETS_PUB.docErrorTabType,
p_docErrorRec IN OUT NOCOPY IBY_TRANSACTION_ERRORS%ROWTYPE,
x_error_code OUT NOCOPY NUMBER,
x_error_mesg OUT NOCOPY VARCHAR2
)IS
-- Get Distribution Code Combination Id And SOB
CURSOR dist_sob_csr(p_invoice_id NUMBER)
IS
SELECT apid.dist_code_combination_id,
apid.set_of_books_id,
apid.org_id,
apid.amount, -- added this for 5466103
glpv.chart_of_accounts_id
FROM ap_invoice_distributions_all apid,
gl_ledgers_public_v glpv
WHERE apid.invoice_id = p_invoice_id
AND apid.set_of_books_id = glpv.ledger_id;
SELECT fvfp.fund_value fund_value,
fvts.treasury_symbol treasury_symbol
FROM fv_fund_parameters fvfp ,
fv_treasury_symbols fvts
WHERE fvfp.treasury_symbol_id = fvts.treasury_symbol_id
AND
fvfp.set_of_books_id = fvts.set_of_books_id
AND
fvfp.fund_value = p_fund_value
AND
fvfp.set_of_books_id = p_ledger_id ;
SELECT ibydocpay.payment_amount
FROM iby_docs_payable_all ibydocpay,
iby_payments_all ibypmt
WHERE ibydocpay.payment_id = p_payment_id
AND ibydocpay.calling_app_doc_unique_ref2 = p_invoice_id
AND ibydocpay.payment_id=ibypmt.payment_id
AND ibydocpay.calling_app_id=200
AND UPPER(ibydocpay.document_type)='STANDARD'
AND UPPER(ibydocpay.payment_function) IN ('PAYABLES_DISB','EMPLOYEE_EXP');
EXECUTE IMMEDIATE 'Select ' || l_seg_name || ' from GL_CODE_COMBINATIONS where code_combination_id= :ccid' INTO l_fund_val USING l_dist_sob_rec.dist_code_combination_id;
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
SELECT count(*) INTO l_row_exist
FROM FV_TP_TS_AMT_DATA
WHERE
treasury_symbol=l_tas_rec.treasury_symbol
AND
payment_instruction_id= p_instruction_id;
INSERT INTO
FV_TP_TS_AMT_DATA(treasury_symbol,
amount,
payment_instruction_id,
org_id,
set_of_books_id)
VALUES(l_tas_rec.treasury_symbol,
l_amt_id_rec.payment_amount, -- changed from l_dist_sob_rec.amount(Bug 14542468)
p_instruction_id,
l_dist_sob_rec.org_id,
l_dist_sob_rec.set_of_books_id);
UPDATE
FV_TP_TS_AMT_DATA
SET
amount = amount + l_amt_id_rec.payment_amount -- changed from l_dist_sob_rec.amount(Bug 14542468)
WHERE
treasury_symbol=l_tas_rec.treasury_symbol
AND
payment_instruction_id= p_instruction_id;
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insert_transaction_errors('N',p_docErrorTab);
SELECT COUNT(*) INTO l_count_tas
FROM FV_TP_TS_AMT_DATA
WHERE payment_instruction_id = p_instruction_id;
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
SELECT COUNT(*) INTO l_count_tas
FROM FV_TP_TS_AMT_DATA
WHERE payment_instruction_id = p_instruction_id;
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insert_transaction_errors('N',p_docErrorTab);
SELECT address_line_1, address_line_2, town_or_city, region_2, postal_code
FROM fv_system_parameters_v
WHERE
ou_org_id=p_org_id;
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insert_transaction_errors('N',p_docErrorTab);
SELECT payee_address1, payee_address2, payee_address3, payee_address4, payee_city, payee_postal_code, payee_state
FROM iby_payments_all
WHERE
PAYMENT_ID=p_payment_id
AND payment_status = 'INSTRUCTION_CREATED' ;
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insert_transaction_errors('N',p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insert_transaction_errors('N',p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insert_transaction_errors('N',p_docErrorTab);
SELECT idpa.payment_reason_code,
asup.vendor_type_lookup_code
INTO l_payment_reason_code,
l_vendor_type_lookup_code
FROM IBY_DOCS_PAYABLE_ALL idpa, -- added all
ap_supplier_sites_all asst,
ap_suppliers asup
WHERE idpa.payment_id=p_payment_id
AND idpa.calling_app_doc_unique_ref2 = p_invoice_id
AND idpa.document_status = 'PAYMENT_CREATED'
AND idpa.calling_app_id=200
AND UPPER(idpa.payment_function) IN ('PAYABLES_DISB','EMPLOYEE_EXP')
AND idpa.supplier_site_id = asst.vendor_site_id
AND asst.vendor_id = asup.vendor_id ;
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insert_transaction_errors('N',p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insert_transaction_errors('N',p_docErrorTab);
select party_name
into l_party_name
from hz_parties
where party_id = p_payee_party_id;
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insert_transaction_errors('N',p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insert_transaction_errors('N',p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insert_transaction_errors('N',p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insert_transaction_errors('N',p_docErrorTab);
SELECT exclusive_payment_flag,
calling_app_doc_ref_number
FROM IBY_DOCS_PAYABLE_ALL
WHERE calling_app_doc_unique_ref2 = p_invoice_id
AND document_status = 'PAYMENT_CREATED'
AND payment_id = p_payment_id
AND calling_app_id=200
AND UPPER(payment_function) IN ('PAYABLES_DISB','EMPLOYEE_EXP');
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insert_transaction_errors('N',p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insert_transaction_errors('N',p_docErrorTab);
SELECT calling_app_doc_ref_number
INTO l_invoice_num FROM IBY_DOCS_PAYABLE_ALL
WHERE calling_app_doc_unique_ref2 = p_invoice_id
AND payment_id = p_payment_id
AND calling_app_id=200
AND UPPER(payment_function) IN ('PAYABLES_DISB','EMPLOYEE_EXP');
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insert_transaction_errors('N',p_docErrorTab);
select hca.class_code,
ipa.internal_bank_account_id,
cba.bank_branch_id,
cba.bank_account_name
into l_rfc_id,
l_bank_account_id,
l_bank_branch_id,
l_bank_account_name
from iby_payments_all ipa,
ce_bank_accounts cba,
hz_code_assignments hca
where ipa.payment_id = p_payment_id
and ipa.internal_bank_account_id = cba.bank_account_id(+)
and hca.owner_table_name(+) = 'HZ_PARTIES'
and hca.class_category(+) = 'RFC_IDENTIFIER'
and hca.owner_table_id(+) = cba.bank_branch_id;
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insert_transaction_errors('N',p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insert_transaction_errors('N',p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insert_transaction_errors('N',p_docErrorTab);
select ipia.org_id, haou.name
into l_org_id, l_org_name
from iby_pay_instructions_all ipia,
hr_all_organization_units haou
where ipia.payment_instruction_id = p_pay_instruction_id
and ipia.org_id = haou.organization_id;
select fed_employer_id_number
into l_fed_employer_id_number
from fv_operating_units_all
where org_id = l_org_id;
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insert_transaction_errors('N',p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insertIntoErrorTable(p_docErrorRec, p_docErrorTab);
IBY_VALIDATIONSETS_PUB.insert_transaction_errors('N',p_docErrorTab);