I want automatic sales order to be posted while i post warehouse shipment for this order.
My sales order contains assigned item charge.
I post shipment but sales order stay. i should post it manualy.
Can sales order be automatic posted while posting shipment?
I use SetShipInvoice(TRUE, TRUE) For this method. And it is works perfect to auto post sales orders without Item Charges.
With item charge i get an error = Qty. To Assign should be 0.
Are you sure it IS assigned? Normally ItemCharge assignment must be done manually, no automation here - if you haven’t coded one.
says that assignment is NOT done, (or done partially)…
Charges allocates manually before shipment post.
But Post Shipment post drops “Qty. to Ship” for Item Charges and then several line of code below rises error - because Qty. to Assign > Qty. To Ship.
If SalesLine.SHIP then Qty. To Ship := 0;
But i set Salesline.ship and SalesLine.invoice manually by code in the begining of the shipment post.
NAV 5.0 SP1
You can find the solution for your problem in the CU 5763, especially in function InitSourceDocumentLine.
Navision sets all “Qty to Ship” to zero for lines not included in the Warehouse Shipment. So it does for resources, G/L Accounts and als Item Charges,