2480: p_sequence + ROWNUM,
2481: substr(l_textline,1,240),
2482: 'PO_SUB_REL_VENDOR_ON_HOLD'
2483: FROM PO_RELEASES_GT POR,PO_HEADERS_GT POH,PO_VENDORS POV,
2484: PO_SYSTEM_PARAMETERS PSP
2485: WHERE POR.po_header_id = POH.po_header_id
2486: AND POV.vendor_id = POH.vendor_id
2487: AND POR.po_release_id = p_document_id
2488: AND nvl(PSP.ENFORCE_VENDOR_HOLD_FLAG,'N') = 'Y'
4003: l_textline po_online_report_text.text_line%TYPE := NULL;
4004: l_api_name CONSTANT varchar2(40) := 'CHECK_PO_REL_REQPRICE';
4005: l_progress VARCHAR2(3);
4006:
4007: l_enforce_price_tolerance po_system_parameters.enforce_price_change_allowance%TYPE;
4008: l_enforce_price_amount po_system_parameters.enforce_price_change_amount%TYPE;
4009: l_amount_tolerance po_system_parameters.price_change_amount%TYPE;
4010:
4011: TYPE unit_of_measure IS TABLE of PO_LINES.unit_meas_lookup_code%TYPE;
4004: l_api_name CONSTANT varchar2(40) := 'CHECK_PO_REL_REQPRICE';
4005: l_progress VARCHAR2(3);
4006:
4007: l_enforce_price_tolerance po_system_parameters.enforce_price_change_allowance%TYPE;
4008: l_enforce_price_amount po_system_parameters.enforce_price_change_amount%TYPE;
4009: l_amount_tolerance po_system_parameters.price_change_amount%TYPE;
4010:
4011: TYPE unit_of_measure IS TABLE of PO_LINES.unit_meas_lookup_code%TYPE;
4012: TYPE NumTab IS TABLE of NUMBER;
4005: l_progress VARCHAR2(3);
4006:
4007: l_enforce_price_tolerance po_system_parameters.enforce_price_change_allowance%TYPE;
4008: l_enforce_price_amount po_system_parameters.enforce_price_change_amount%TYPE;
4009: l_amount_tolerance po_system_parameters.price_change_amount%TYPE;
4010:
4011: TYPE unit_of_measure IS TABLE of PO_LINES.unit_meas_lookup_code%TYPE;
4012: TYPE NumTab IS TABLE of NUMBER;
4013: l_ship_price_in_base_curr NumTab;
4035: l_po_curr FND_CURRENCIES.currency_code%TYPE;
4036: l_req_ou_func_curr FND_CURRENCIES.currency_code%TYPE;
4037: l_rate_date DATE;
4038: l_rate NUMBER;
4039: l_rate_type PO_SYSTEM_PARAMETERS_ALL.default_rate_type%TYPE;
4040: l_requesting_org_id NumTab;
4041: l_display_rate NUMBER;
4042: l_return_status VARCHAR2(1);
4043: l_error_message_name FND_NEW_MESSAGES.message_name%TYPE;
4223: nvl(price_change_amount, -1)
4224: INTO l_enforce_price_tolerance,
4225: l_enforce_price_amount,
4226: l_amount_tolerance
4227: FROM po_system_parameters;
4228:
4229: l_progress := '001';
4230: IF g_debug_stmt THEN
4231: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_STATEMENT) THEN
4406: IF l_rate IS NULL THEN
4407: BEGIN
4408: SELECT default_rate_type
4409: INTO l_rate_type
4410: FROM po_system_parameters;
4411: EXCEPTION
4412: WHEN OTHERS THEN
4413: RAISE;
4414: END;
4475: SELECT NVL(MSI.price_tolerance_percent/100,
4476: NVL(POSP.price_change_allowance/100,-1))
4477: INTO l_price_tolerance_allowed
4478: FROM MTL_SYSTEM_ITEMS MSI,
4479: PO_SYSTEM_PARAMETERS POSP,
4480: FINANCIALS_SYSTEM_PARAMETERS FSP
4481: WHERE msi.inventory_item_id(+) = l_item_id(shipment_line)
4482: AND MSI.organization_id(+) = FSP.inventory_organization_id;
4483:
4640: IF l_rate IS NULL THEN
4641: BEGIN
4642: SELECT default_rate_type
4643: INTO l_rate_type
4644: FROM po_system_parameters;
4645: EXCEPTION
4646: WHEN OTHERS THEN
4647: RAISE;
4648: END;
4706: --do the amount check
4707: --makes sure the requisition amount and
4708: --PO amount for each shipment line is within the value
4709: --defined in the column PRICE_CHANGE_AMOUNT of table
4710: --PO_SYSTEM_PARAMETERS.
4711: --Bug 3262304, 3266272 mbhargav Using the Req price which is
4712: --rounded to the ext_precn of the its currency.
4713: IF ((l_ship_price_ext_precn -
4714: (l_req_line_price_ext_precn * l_shipment_to_req_rate)
4872: 0,
4873: p_sequence + ROWNUM,
4874: substr(l_textline,1,240),
4875: 'PO_SUB_VENDOR_ON_HOLD'
4876: FROM PO_HEADERS_GT POH, PO_VENDORS POV, PO_SYSTEM_PARAMETERS PSP
4877: WHERE POV.vendor_id = POH.vendor_id
4878: AND POH.po_header_id = p_document_id
4879: AND nvl(PSP.ENFORCE_VENDOR_HOLD_FLAG,'N') = 'Y'
4880: AND nvl(POV.hold_flag,'N') = 'Y';
9471: WHERE pllg.po_line_id = pol.po_line_id
9472: AND pllg.approved_date IS NOT NULL) --< Bug 3301427 End >
9473: AND NOT EXISTS (SELECT 1
9474: FROM po_ga_org_assignments PGOA,
9475: po_system_parameters PSP
9476: WHERE PGOA.po_header_id = POHA.po_header_id
9477: AND PGOA.purchasing_org_id = PSP.org_id
9478: AND PGOA.enabled_flag = 'Y');
9479:
12557: /* End Bug 7229262/7239696 */
12558:
12559: ' AND POAH2.object_id = ' || p_query_table || '.' || l_id_column || ')) OR (' ||
12560: p_employee_id || ' IN (SELECT H.superior_id ' ||
12561: ' FROM PO_EMPLOYEE_HIERARCHIES H, PO_SYSTEM_PARAMETERS PSP WHERE H.employee_id = ' ||
12562: p_query_table || '.' || p_owner_id_column ||
12563: ' AND H.position_structure_id = NVL(PSP.SECURITY_POSITION_STRUCTURE_ID,-1) '
12564: ||'AND PSP.ORG_ID = '||p_query_table || '.ORG_ID '
12565: ||'))))';