For Matching
--------------------
--------------------
fnd_global.apps_initialize(user_id => 3532,
resp_id => 53496,
resp_appl_id => 200);
mo_global.set_policy_context('S', 215);
resp_id => 53496,
resp_appl_id => 200);
mo_global.set_policy_context('S', 215);
AP_RECT_MATCH_PKG.AP_AMT_RECPT_MATCH
For Validating
------------------------
AP_APPROVAL_MATCHED_PKG.Exec_Matched_Variance_Checks
Contains queries for validating matched invoices
--------------------------------------------------------------
IF (p_po_release_id IS NULL) THEN
SELECT nvl(sum(nvl(aid.amount, 0)), 0)
INTO l_matched_amount
FROM ap_invoice_distributions aid,
po_distributions pd
WHERE pd.po_distribution_id = aid.po_distribution_id
AND pd.po_header_id = p_po_header_id
AND aid.invoice_id = p_invoice_id
AND aid.line_type_lookup_code IN ('ITEM','PREPAY');
ELSE
SELECT nvl(sum(nvl(aid.amount, 0)), 0)
INTO l_matched_amount
FROM ap_invoice_distributions aid,
po_distributions pd
WHERE pd.po_distribution_id = aid.po_distribution_id
AND aid.invoice_id = p_invoice_id
AND pd.po_release_id = p_po_release_id
AND aid.line_type_lookup_code IN ('ITEM','PREPAY');
END IF;
For Validating
------------------------
AP_APPROVAL_MATCHED_PKG.Exec_Matched_Variance_Checks
Contains queries for validating matched invoices
--------------------------------------------------------------
IF (p_po_release_id IS NULL) THEN
SELECT nvl(sum(nvl(aid.amount, 0)), 0)
INTO l_matched_amount
FROM ap_invoice_distributions aid,
po_distributions pd
WHERE pd.po_distribution_id = aid.po_distribution_id
AND pd.po_header_id = p_po_header_id
AND aid.invoice_id = p_invoice_id
AND aid.line_type_lookup_code IN ('ITEM','PREPAY');
ELSE
SELECT nvl(sum(nvl(aid.amount, 0)), 0)
INTO l_matched_amount
FROM ap_invoice_distributions aid,
po_distributions pd
WHERE pd.po_distribution_id = aid.po_distribution_id
AND aid.invoice_id = p_invoice_id
AND pd.po_release_id = p_po_release_id
AND aid.line_type_lookup_code IN ('ITEM','PREPAY');
END IF;
No comments:
Post a Comment