Purchase Orders setting QTYs to zero on close

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

Purchase Orders setting QTYs to zero on close

Postby aegean66 » Fri Dec 04, 2015 4:58 pm

We have began using a separate warehouse, and since then we have had an issue where if we set a purchase order to closed, it sets all the quantities on the order to zero.

This doesn't happen usually, and it still doesn't happen in our original warehouse. Sometimes we will restate a purchase order from closed to sent, and need the original quantities.

Any ideas why this is behaving differently from the original warehouse?

thanks
Damon.
aegean66
Occasional Contributor
Occasional Contributor
 
Posts: 36
Joined: Wed Mar 02, 2011 2:26 pm
Location: Usa
Topics Solved: 2

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: 742
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 221


Return to Technical / Programming

Who is online

Users browsing this forum: No registered users and 4 guests