Page 1 of 1

Re: Purchase Orders setting QTYs to zero on close

PostPosted: Mon Dec 07, 2015 8:16 am
by Scott.Pearce
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:

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.