VI Import for SO Invoice - Misc and Charge items from SO not importing

I need to know if there is a script or perform logic that can help my situation. 

- I have a VI Import Job importing Invoices from Sales Orders

- The source file does NOT contain the Misc or Charge items from the SO 

Can this be done without the lines not living in the source data?  Is there a script I can run or perform logic that can pull everything on write? 

Sage 100 v2016 premium with ACS multi-bin, Dm2/PDI software

Thank you! 

  • 0

    I don't know about script / perform logic options, but this is how we've dealt with this problem for one customer:

    Import into a UDT, and write a SQL View to merge the UDT data with the open SO lines for those orders... and then do a second import from the SQL view.

  • 0 in reply to Kevin M

    Thank you Kevin.  You just gave me an idea that may work.  I'm going to give it a try here shortly and see if it is doable for the user. 

    Thanks!! :) 

  • 0 in reply to E.Leale

    One issue with this technique is the need to empty the UDT after each batch... but it works..

  • 0

    Are you saying the Sales Order has the Misc and Charge items but when you invoice it with the import, your source only contains the Standard inventory items which results in the Misc and Charge items not being automatically copied to the sales order?

    If that is the case, then you could use the coBusiness'Lines'CopyLinesFromSalesOrder([Sales Order Number], [Y or N to indicate to ship the lines complete]) method in a temp field set to Calculated. This would mean only having the header info in the source and having the temp field set as numeric, to assign on the header, and to reset on every record. 

    This may not work however if your source actually contains specific quantities to ship for the Standard inventory items and you need to be able to set those values.

  • 0 in reply to David Speck

    Hi David - 

    Yes, the SO contains Freight for some customers and the Freight is setup as a Misc/Charge item.  The source file only contains the InvtType 1 Lines.  We have a dispatch system, Deliveryworks that takes the data from Sage to the warehouse for load and delivery - at the end of the shift the file comes back with the actual delivered.  The easiest solution (for me anyway) would be to have Deliverworks grab all the lines and suppress types 3 and 5 while shipping and delivering, then the file that is imported would contain all lines.  But it isn't always about me.... 

    I was thinking of kicking off an exception report after import and before invoice processing to alert the user on the Invoices that have lines missing, that may or may not work.  I have found keeping it as simple as possible for the user is the only way to get things done. 

  • 0 in reply to E.Leale

    Does your source contain the SO_SalesOrderDetail.LineKey value?

    If it does, you could always chain the first import to another import that queries your SO_SalesOrderDetail and SO_InvoiceDetail tables with a join and WHERE clause that will only return the lines that are missing and you could even exclude ItemType 1 lines. Point it to a DSN with credentials saved or use SOTAMAS90 and enter the credentials in VI but make sure to enter the [user]|[company code] in the user field (that is a vertical pipe separating the user and company code btw).