Skip to main content

Notifications

Announcements

No record found.

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

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

Posted on by 847
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 !
  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 288,584 Super User on at
    How to Link Properly Invoice Lines with Cust Packing Slip Lines?
    Hi Community user,
     
    Both of the lines will probably have a different financial date and voucher. Using the voucher and date of the invoice you can get the correct inventory transactions.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,584 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,864 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans