Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected void setParmAllowDefault()
- {
- InventModelGroup inventModelGroup = movement.inventModelGroup();
- InventLocation inventLocation = InventLocation::find(movement.inventLocationId());
- boolean negativeFinancial = false;
- boolean negativePhysical = false;
- //START +Allow negative inventory by warehouse+
- NegativeStockLevel negativeStockLevel = inventLocation.NegativeStockLevel;
- //END +Allow negative inventory by warehouse+
- this.parmAllowReservePhysical(true);
- this.parmAllowAutoReserveDim(true);
- this.parmAllowReserveOrdered(InventParameters::find().ReserveOnOrdered);
- this.parmAllowReserveByDate(inventModelGroup.ReserveByDate);
- this.parmAllowReserveReversed(inventModelGroup.ReserveReversed);
- if (!movement.inventTable().inventItemType().mustInventBeControlled() || movement.mustDoAutoLossProfitEstimate())
- {
- this.parmAllowNegativeFinancial(true);
- //START +Allow negative inventory by warehouse+
- //+orig+ this.parmAllowNegativePhysical(true);
- this.parmAllowNegativePhysical(INT_WMSnegativeState ? true : inventModelGroup.NegativePhysical);
- //END +Allow negative inventory by warehouse+
- }
- else
- {
- negativeFinancial = (inventModelGroup.NegativeFinancial || (inventLocation && inventLocation.RetailInventNegFinancial));
- negativePhysical = (inventModelGroup.NegativePhysical || (inventLocation && inventLocation.RetailInventNegPhysical));
- this.parmAllowNegativeFinancial(negativeFinancial);
- //START +Allow negative inventory by warehouse+
- //+orig+ this.parmAllowNegativePhysical(negativePhysical);
- this.parmAllowNegativePhysical(negativeStockLevel ? true : inventModelGroup.NegativePhysical);
- //END +Allow negative inventory by warehouse+
- }
- }
Add Comment
Please, Sign In to add comment