Hi There
With the move order lines plugin, we are having some issues with the items that are backordered, as they wont reduce the quantity moved to the new order. Hence we using custom code for this, all works well except the QuantityAvailable gets increased by that amount all the time.
So the back ordered quantity successfully moves to new order and its also reduces on the existing one, but it increases the quantityavailable by the amount in new order,
Pls see screenshot, the first one SO 85493, the order quantity gets set to 0's correctly, but quantityavailable was -67 first before moving, and after moving to order SO 85494 it became -69
Below is the code we are using, the IF part works just fine, its just the ELSE part, we're having problem with. Kindly advise.
If existingSalesOrderLine.QuantityBackOrdered > 0 Then
If existingSalesOrderLine.QuantityBackOrdered > quantityTaken Then
existingSalesOrderLine.HiddenSetQuantityBackOrdered(existingSalesOrderLine.QuantityBackOrdered - quantityTaken)
Else existingSalesOrderLine.QuantityBackOrdered = quantityTaken
existingSalesOrderLine.HiddenSetQuantityOrdered(0)
existingSalesOrderLine.HiddenSetQuantityThisDelivery(0)
existingSalesOrderLine.HiddenSetQuantityBackOrdered(0)
End If
End If