Wednesday, February 20, 2013

Useful query :Relation between AR invoice and Sales Order

Query for to find out AR invoice and Sales Order Details


SELECT oha.order_number, 
               ola.line_number so_line_number,
               ola.ordered_item item_name,
              ola.ordered_quantity * ola.unit_selling_price LINE_AMOUNT,
              rcta.trx_number Transaction_number, rcta.trx_date,
              rctla.line_number TRX_line_number,
               rctla.unit_selling_price unit_selling_price
  FROM oe_order_headers_all oha,
              oe_order_lines_all ola,
               ra_customer_trx_all rcta,
               ra_customer_trx_lines_all rctla
 WHERE oha.header_id = ola.header_id
   AND rcta.customer_trx_id = rctla.customer_trx_id
   AND rctla.interface_line_attribute6 = TO_CHAR (ola.line_id)
   AND rctla.interface_line_attribute1 = TO_CHAR (oha.order_number)
   AND order_number = :p_order_number

4 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. One more useful website to learn tally....

    ReplyDelete
  3. Have one sales activity for every day, since you know you can finish that. Each activity will expand upon the one from the earlier day. sales automation

    ReplyDelete
  4. Thank you so much for this useful query..! appreciate it..!

    ReplyDelete