SELECT
rcta.customer_trx_id,
rcta.trx_number,
rcta.trx_date,
ac.customer_name,
rctla.line_number inv_line_number,
rctla.unit_selling_price inv_unit_selling_price,
ooha.header_id,
ooha.order_number,
oola.line_number so_line_number,
oola.line_id,
oola.ordered_item,
oola.ordered_quantity * oola.unit_selling_price so_amount
FROM
apps.ra_customer_trx_all rcta,
apps.ra_customer_trx_lines_all rctla,
apps.ar_customers ac,
apps.oe_order_headers_all ooha,
apps.oe_order_lines_all oola
WHERE
1 = 1
AND rcta.customer_trx_id = rctla.customer_trx_id
AND rcta.bill_to_customer_id = ac.customer_id
AND ooha.header_id = oola.header_id
AND rctla.interface_line_attribute6 = TO_CHAR(oola.line_id)
AND rctla.interface_line_attribute1 = TO_CHAR(ooha.order_number)
AND rcta.trx_number = nvl(:p_trx_number,rcta.trx_number)
AND ooha.order_number = nvl(:p_order_number,ooha.order_number);
Comments
Post a Comment