Re: Purchase Orders setting QTYs to zero on close
Upon closing a purchase order, the quantities will be set to that which was delivered (as per GRNs that reference the purchase order). The code that does this:
As you can see, it is quite explicit and the behaviour does not alter based on warehouse.
- Code: Select all
Public Sub CloseOrder()
OnClosing()
For Each Line As Line In Lines
If Line.Delivered < Line.Quantity Then
Line.Quantity = Line.Delivered
End If
Next Line
_OrderStatus = JiwaApplication.Entities.PurchaseOrder.Workflow.Status.Closed
Save()
OnClosed()
End Sub
As you can see, it is quite explicit and the behaviour does not alter based on warehouse.