236: -- Bug 670873, lpo, 05/28/98
237: old_quantity number := 0;
238:
239: --
240: l_source_document_type PO_HEADERS.type_lookup_code%TYPE;
241: l_source_document_header_id PO_LINES.po_header_id%TYPE;
242: l_pricing_date PO_LINE_LOCATIONS.need_by_date%TYPE;
243: l_new_price PO_LINES.unit_price%TYPE;
244: l_return_status VARCHAR2(1);
256: cursor unit_price IS
257: SELECT pll.price_override,
258: pll.line_location_id -- SERVICES FPJ
259: FROM po_line_locations_all pll, -- GA FPI
260: po_headers_all poh -- 5684820
261: /*
262: Bug fix for 2687718.
263: Added QUOTATION in the WHERE clause to ensure that pricing works when
264: a Standard PO is sourced to a Quotation through the Supplier Catalog.
301:
302: l_api_version NUMBER := 1.0;
303:
304: --
305: l_rate PO_HEADERS.rate%TYPE;
306: l_rate_type PO_HEADERS.rate_type%TYPE;
307: l_currency_code PO_HEADERS.currency_code%TYPE;
308: --
309:
302: l_api_version NUMBER := 1.0;
303:
304: --
305: l_rate PO_HEADERS.rate%TYPE;
306: l_rate_type PO_HEADERS.rate_type%TYPE;
307: l_currency_code PO_HEADERS.currency_code%TYPE;
308: --
309:
310: -- Bug 3343892
303:
304: --
305: l_rate PO_HEADERS.rate%TYPE;
306: l_rate_type PO_HEADERS.rate_type%TYPE;
307: l_currency_code PO_HEADERS.currency_code%TYPE;
308: --
309:
310: -- Bug 3343892
311: l_base_unit_price PO_LINES.base_unit_price%TYPE;
373: SELECT ph.type_lookup_code,
374: pl.po_header_id
375: INTO l_source_document_type,
376: l_source_document_header_id
377: FROM po_headers_all ph,
378: po_lines_all pl
379: WHERE ph.po_header_id = pl.po_header_id
380: AND pl.po_line_id = p_po_line_id;
381: ELSE
382: SELECT ph.type_lookup_code,
383: ph.po_header_id
384: INTO l_source_document_type,
385: l_source_document_header_id
386: FROM po_headers_all ph
387: WHERE ph.po_header_id = p_contract_id;
388: END IF; /*IF (p_po_line_id IS NOT NULL)*/
389:
390:
542: -- rate information anymore
543:
544: IF (p_currency_code IS NULL) THEN
545: l_currency_code :=
546: PO_HEADERS_SV3.get_currency_code(l_source_document_header_id);
547: ELSE
548: l_currency_code := p_currency_code;
549: END IF;
550:
697: -- Use the currency code from the PO always. No need to pass in
698: -- rate information anymore
699:
700: IF (p_currency_code IS NULL) THEN
701: l_currency_code := PO_HEADERS_SV3.get_currency_code(p_contract_id);
702: ELSE
703: l_currency_code := p_currency_code;
704: END IF;
705: