1553: sum(decode(osta.transfer_type, 'IN', nvl(osta.common_quantity,0), 0)) - sum(decode(osta.transfer_type, 'OUT', nvl(osta.common_quantity,0), 0)) as end_inventory
1554: FROM
1555: ozf_sales_transactions_all osta
1556: ,hz_parties hp
1557: ,hz_cust_accounts hca
1558: WHERE osta.sold_to_party_id = hp.party_id
1559: AND osta.error_flag='N'
1560: AND osta.sold_to_party_id =hp.party_id
1561: AND hca.cust_account_id = p_customer_id
1644: hz.account_number,
1645: hp.party_name
1646: FROM
1647: oe_order_lines_all oola,
1648: hz_cust_accounts hz,
1649: hz_parties hp,
1650: dpp_transaction_headers_all dtha,
1651: dpp_transaction_lines_all dtla
1652: WHERE
1729: hz.cust_account_id,
1730: hz.account_number,
1731: hp.party_name
1732: FROM
1733: hz_cust_accounts hz,
1734: hz_parties hp
1735: WHERE
1736: hp.party_id = hz.party_id and
1737: hz.status = 'A' and
2302: SELECT
2303: hz.account_number,
2304: hp.party_name
2305: FROM
2306: hz_cust_accounts hz,
2307: hz_parties hp
2308: WHERE
2309: hp.party_id = hz.party_id and
2310: hz.cust_account_id = p_customer_id;