Skip to main content
Answer

GI on Invoice and SalesOrder

  • July 17, 2022
  • 10 replies
  • 744 views

Hello,

Im trying to build GI with ARInvoice being linked to SalesOrder. I tried to use InvoiceNbr in both but no luck. How can I do it?

Best answer by jinin

Hi @Leo05 

Please find the screenshots
 

 

 

10 replies

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • July 18, 2022

Hi @Leo05  Assuming that you are using SO behavior Sales Order but not the Invoice Type.

If yes, below is the query to link the Sales Order to Invoice. You can use the same joins in the GI to fetch the details. Let me know if you need any help on the GI.

 

select * from SOOrder S inner join SOOrderShipment SS on S.CompanyID=SS.CompanyID and S.OrderType=SS.OrderType and S.OrderNbr=SS.OrderNbr
Inner Join ARTran AR on AR.CompanyID=S.CompanyID and AR.SOShipmentType = SS.ShipmentType and AR.SOShipmentNbr = SS.ShipmentNbr
Where S.CompanyID=2 and S.OrderNbr='SO006683'

 


  • Author
  • Freshman I
  • July 18, 2022

Thanks for reply but I need a bit different stuff. Im tracking Invoice updates and need to filter invoices by sales order properties. So I need to build relations between AR.ARInvoice and SO.SOOrder tables.


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • July 18, 2022

Hi @Leo05 ,

Please find the below GI sample. You can add conditions and result grids based on your requirement.

 

 


  • Author
  • Freshman I
  • July 20, 2022

Hi @Leo05 ,

Please find the below GI sample. You can add conditions and result grids based on your requirement.

 

 

Thanks @jinin,

The problem I do not have permissions to import GI if possible could you please create screenshot with relations tab?


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • July 20, 2022

Hi @Leo05 

Please find the screenshots
 

 


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • Answer
  • July 20, 2022

Hi @Leo05 

Please find the screenshots
 

 

 


  • Freshman I
  • April 28, 2023

@jinin This is helpful - thank you! When I run this, I get a lot of duplicate lines. I’m a newbie so there might be something basic I’m missing. Or is it the way the tables are joined/ related? Thank you.


  • Freshman I
  • April 29, 2023

I used group by and I think it is working now. Thank you anyway.


Forum|alt.badge.img
  • Jr Varsity II
  • October 14, 2023

Has anyone managed to join the ARTran, SOOrder and SOLine tables without causing duplicates?

 


Forum|alt.badge.img+8
  • Semi-Pro I
  • October 14, 2023

Hi @Bree612 Please find the attached Generic Inquiry as a solution.
We could join the ARTran, SOOrder and SOLine without causing duplicates with the below limitations.

Limitation: The Sales Order has one Shipment and One Invoice.

Screenshots for reference: