Purchase Orders setting QTYs to zero on close

Discussions relating to breakout scripting, .NET and COM programming with Jiwa objects.

Re: Purchase Orders setting QTYs to zero on close

Postby Scott.Pearce » Mon Dec 07, 2015 8:16 am

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.
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 765
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 230

Return to Technical / Programming

Who is online

Users browsing this forum: No registered users and 2 guests