740: l_return_status VARCHAR2(100);
741: l_msg_count NUMBER;
742: l_msg_data VARCHAR2(2000);
743:
744: l_org_id po_line_locations_all.org_id%type;
745: l_po_release_id po_line_locations_all.po_release_id%type;
746: l_doc_type VARCHAR2(20);
747:
748: CURSOR PO_Info_from_line_loc (c_po_line_location_Id IN NUMBER) IS
741: l_msg_count NUMBER;
742: l_msg_data VARCHAR2(2000);
743:
744: l_org_id po_line_locations_all.org_id%type;
745: l_po_release_id po_line_locations_all.po_release_id%type;
746: l_doc_type VARCHAR2(20);
747:
748: CURSOR PO_Info_from_line_loc (c_po_line_location_Id IN NUMBER) IS
749: SELECT pll.org_id, pll.quantity, pll.po_header_id, nvl(ph.rate ,1), pll.po_release_id, mum.uom_code
746: l_doc_type VARCHAR2(20);
747:
748: CURSOR PO_Info_from_line_loc (c_po_line_location_Id IN NUMBER) IS
749: SELECT pll.org_id, pll.quantity, pll.po_header_id, nvl(ph.rate ,1), pll.po_release_id, mum.uom_code
750: FROM po_line_locations_all pll, po_headers_all ph, mtl_units_of_measure mum
751: WHERE pll.line_location_id = c_po_line_location_Id
752: AND pll.po_header_id = ph.po_header_id
753: AND pll.unit_meas_lookup_code = mum.unit_of_measure (+);
754:
755: CURSOR PO_Info_from_dist (c_po_dist_Id IN NUMBER) IS
756: SELECT pll.org_id, pll.quantity, pll.line_location_id,
757: pll.po_header_id, nvl(ph.rate,1), pll.po_release_id, mum.uom_code,
758: pd.quantity_ordered, pll.price_override
759: FROM po_line_locations_all pll, po_distributions_all pd,
760: po_headers_all ph, mtl_units_of_measure mum
761: WHERE pd.po_distribution_id = c_po_dist_Id
762: AND pd.line_location_id = pll.line_location_id
763: AND pll.po_header_id = ph.po_header_id
7492: IF P_Line_Location_Id IS NOT NULL THEN
7493:
7494: SELECT matching_basis, payment_type, shipment_type
7495: INTO l_matching_basis, l_payment_type, l_shipment_type
7496: FROM po_line_locations_all
7497: WHERE line_location_id = P_Line_Location_Id;
7498:
7499: IF l_matching_basis = 'AMOUNT' THEN
7500:
7612: rsl.item_id rcv_item_id
7613: FROM ap_invoice_distributions_all D,
7614: po_distributions_all PD,
7615: po_lines_all PL,
7616: po_line_locations_all PLL,
7617: rcv_transactions RTXN,
7618: rcv_shipment_lines RSL
7619: WHERE D.invoice_distribution_id = c_inv_dist_id
7620: AND D.po_distribution_id = PD.po_distribution_id