SELECT DISTINCT hou.NAME operating_unit, TO_NUMBER (poh.segment1) po_no,
(rsh.receipt_num) receipt_no, pla.line_num,
pov1.vendor_name fright_vendor, site.vendor_site_code,
(SELECT ood.organization_code
FROM org_organization_definitions ood
WHERE ood.organization_id =
rsh.organization_id
AND ood.operating_unit = hou.organization_id)
organization_code,
(SELECT ood.organization_name
FROM org_organization_definitions ood
WHERE ood.organization_id =
rsh.organization_id
AND ood.operating_unit = hou.organization_id)
organization_name,
rsl.to_subinventory sub_inventory, jir.tax_line_no,
jir.tax_name, jir.tax_rate, jir.tax_type, jir.precedence_1,
jir.precedence_2, jir.precedence_3, jir.precedence_4,
jir.precedence_5, jir.currency, jir.modvat_flag,
jir.third_party_flag, jir.tax_amount
FROM jai_rcv_line_taxes jir,
rcv_shipment_lines rsl,
po_vendors pov,
po_vendors pov1,
po_vendor_sites_all site,
po_headers_all poh,
po_lines_all pla,
rcv_shipment_headers rsh,
hr_operating_units hou --,--org_organization_definitions ood
WHERE jir.shipment_line_id = jir.shipment_line_id
AND jir.shipment_header_id = rsl.shipment_header_id
AND pov.vendor_id = jir.vendor_id
AND site.vendor_site_id(+) = jir.vendor_site_id
AND poh.po_header_id = rsl.po_header_id
AND poh.po_header_id = pla.po_header_id
AND rsl.po_line_id = pla.po_line_id
AND jir.vendor_id = pov1.vendor_id
AND rsh.shipment_header_id =
jir.shipment_header_id
AND rsh.RECEIPT_NUM ='3'
(rsh.receipt_num) receipt_no, pla.line_num,
pov1.vendor_name fright_vendor, site.vendor_site_code,
(SELECT ood.organization_code
FROM org_organization_definitions ood
WHERE ood.organization_id =
rsh.organization_id
AND ood.operating_unit = hou.organization_id)
organization_code,
(SELECT ood.organization_name
FROM org_organization_definitions ood
WHERE ood.organization_id =
rsh.organization_id
AND ood.operating_unit = hou.organization_id)
organization_name,
rsl.to_subinventory sub_inventory, jir.tax_line_no,
jir.tax_name, jir.tax_rate, jir.tax_type, jir.precedence_1,
jir.precedence_2, jir.precedence_3, jir.precedence_4,
jir.precedence_5, jir.currency, jir.modvat_flag,
jir.third_party_flag, jir.tax_amount
FROM jai_rcv_line_taxes jir,
rcv_shipment_lines rsl,
po_vendors pov,
po_vendors pov1,
po_vendor_sites_all site,
po_headers_all poh,
po_lines_all pla,
rcv_shipment_headers rsh,
hr_operating_units hou --,--org_organization_definitions ood
WHERE jir.shipment_line_id = jir.shipment_line_id
AND jir.shipment_header_id = rsl.shipment_header_id
AND pov.vendor_id = jir.vendor_id
AND site.vendor_site_id(+) = jir.vendor_site_id
AND poh.po_header_id = rsl.po_header_id
AND poh.po_header_id = pla.po_header_id
AND rsl.po_line_id = pla.po_line_id
AND jir.vendor_id = pov1.vendor_id
AND rsh.shipment_header_id =
jir.shipment_header_id
AND rsh.RECEIPT_NUM ='3'
No comments:
Post a Comment