Skip to main content
Solved

How to associate an invoice with the inventory transaction history table


Forum|alt.badge.img+6

Hello everyone.

Does anyone know? What is the key between the inventory transaction history table and the sales invoice lines. The customer's order_no alone is not enough, because many invoices can be issued to it.

Best answer by Tomas Ruderfelt

There is no direct connection.

You can go via OUTSTANDING_SALES to CUSTOMER_ORDER_DELIVERY.

But to explain more in detail, what is the purpose for doing this? What are you trying to achieve?

View original
Did this topic help you find an answer to your question?

4 replies

Forum|alt.badge.img+16
  • Superhero (Employee)
  • 321 replies
  • April 17, 2023

Hi,

What kind of inventory transaction (i.e. Transaction code) are you referring to?. 

Regards,

Pilar


Forum|alt.badge.img+6
  • Author
  • Sidekick (Customer)
  • 11 replies
  • April 26, 2023

Not a transaction code. How to find inventory transactions (transaction_id) with sales invoice number?


Forum|alt.badge.img+19
  • Superhero (Employee)
  • 488 replies
  • Answer
  • April 26, 2023

There is no direct connection.

You can go via OUTSTANDING_SALES to CUSTOMER_ORDER_DELIVERY.

But to explain more in detail, what is the purpose for doing this? What are you trying to achieve?


Forum|alt.badge.img+6
  • Author
  • Sidekick (Customer)
  • 11 replies
  • June 27, 2023
Tomas Ruderfelt wrote:

There is no direct connection.

You can go via OUTSTANDING_SALES to CUSTOMER_ORDER_DELIVERY.

But to explain more in detail, what is the purpose for doing this? What are you trying to achieve?

Thank you, that was it. I didn't notice the source_ref5 = deliv_no binding. Goal achieved, having the invoice number I can identify warehouse transactions.

 

select * 
from INVENTORY_TRANSACTION_HIST2 ith
left join CUSTOMER_ORDER_DELIVERY cod on source_ref5=cod.deliv_no
left join OUTSTANDING_SALES os on os.deliv_no=cod.deliv_no
left join CUST_ORDER_INV_ITEM_UIV_ALL coi on os.invoice_id=coi.invoice_id and os.item_id=coi.item_id
where coi.invoice_id='358073' and coi.item_id like '%'


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings