Skip to main content

I need to allow for overpicking in WMS. I have this working ok by overriding GetQtyThreshold and arbitrarily setting the threshold high and ignoring the Threshold set by the SO line. This works fine if I have more than one items and one item not picked yet. 

public class PickPackShip_Extension : PXGraphExtension<PX.Objects.SO.WMS.PickPackShip.Host>
{
public static bool IsActive() => true;


public delegate Decimal GetQtyThresholdDelegate(SOShipLineSplit sosplit);
PXOverride]
public Decimal GetQtyThreshold(SOShipLineSplit sosplit, GetQtyThresholdDelegate baseMethod)
{
/* This is the standard Acumatica code, and I don't want to use this.
decimal threshold =
SelectFrom<SOLine>
.InnerJoin<SOShipLine>.On<SOShipLine.FK.OrderLine>
.Where<SOShipLine.shipmentNbr.IsEqual<@P.AsString>
.And<SOShipLine.lineNbr.IsEqual<@P.AsInt>>>
.View.Select(this, sosplit.ShipmentNbr, sosplit.LineNbr)
.TopFirst?.CompleteQtyMax ?? 100m;
return threshold / 100m;
*/


//So Just returning high number to allow for overpicking up to 1000%.
return 1000;
}


}

However when all the Shipment lines have the picked quantity greater than the ordered quantity, Acumatica sets the status to Picked and you cannot scan any more items. I need to override this so the status doesn’t change to Picked.

I don’t know what to override to change this behaviour. 

In Acumatica code there is this class:

 

public new sealed class ShipmentState : PickPackShip.ShipmentState

{

….

 

                protected override void SetNextState()

                {

                    var mode = Basis.Get<PackMode.Logic>();

                    if (Basis.Remove == true || mode.CanPack || mode.HasConfirmableBoxes)

                        base.SetNextState();

                    else

                        Basis.SetScanState(BuiltinScanStates.Command, PackMode.Msg.Completed, Basis.RefNbr);

                }

 

}

 

This is where it is setting the scan state to Completed. How would I go about changing overriding this so I can control when it goes to Completed Status?

 

 

 

 

 

 

Be the first to reply!

Reply