Skip to main content
Dynamics 365 Community / Forums / Finance forum / How to Link Properly I...
Unanswered

How to Link Properly Invoice Lines with Cust Packing Slip Lines?

editSubscribe (0) ShareShare
ReportReport
Posted on by 843
Hi dear community !
 
I'm trying to add cust packing slip lines into the sales invoice SSRS report.
 
in standard Sales Invoice report, only invoice lines are displayed, and I am trying to add the cust packing slip lines into it.
 
I tried linking them using /inventTrans/ in the following query:
while select inventTransOriginwhere inventTransOrigin.InventTransId == _custInvoiceTrans.InventTransIdjoin inventTranswhere inventTrans.InventTransOrigin == inventTransOrigin.RecId&& inventTrans.InvoiceId == _custInvoiceTrans.InvoiceIdjoin custPackingSlipTranswhere custPackingSlipTrans.PackingSlipId == inventTrans.PackingSlipId&& custPackingSlipTrans.ItemId == _custInvoiceTrans.ItemId&& custPackingSlipTrans.LineNum == _custInvoiceTrans.LineNum&& custPackingSlipTrans.Qty != 0
 
But there is a case where I'm having an issue where on the cust packing slip screen on the sales order, it shows only 1 line, while the query above gave me 2 lines.
I checked on the DB and I found that there is 2 inventTrans records. they have the same item and the same InventTransID but different quantity.
I'm having an issue trying to identify why there is this 2nd line with different qty. Because in the Packing slip screen on the sales order, it's only showing 1 line...
Please let me know if I am missing something in the query...
 
Any advice is appreciated !
 
Thanks in advance !