Guest User

Untitled

a guest
Jan 16th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. protected void setParmAllowDefault()
  2. {
  3. InventModelGroup inventModelGroup = movement.inventModelGroup();
  4. InventLocation inventLocation = InventLocation::find(movement.inventLocationId());
  5. boolean negativeFinancial = false;
  6. boolean negativePhysical = false;
  7.  
  8. //START +Allow negative inventory by warehouse+
  9. NegativeStockLevel negativeStockLevel = inventLocation.NegativeStockLevel;
  10. //END +Allow negative inventory by warehouse+
  11.  
  12. this.parmAllowReservePhysical(true);
  13. this.parmAllowAutoReserveDim(true);
  14. this.parmAllowReserveOrdered(InventParameters::find().ReserveOnOrdered);
  15. this.parmAllowReserveByDate(inventModelGroup.ReserveByDate);
  16. this.parmAllowReserveReversed(inventModelGroup.ReserveReversed);
  17.  
  18. if (!movement.inventTable().inventItemType().mustInventBeControlled() || movement.mustDoAutoLossProfitEstimate())
  19. {
  20. this.parmAllowNegativeFinancial(true);
  21.  
  22. //START +Allow negative inventory by warehouse+
  23. //+orig+ this.parmAllowNegativePhysical(true);
  24. this.parmAllowNegativePhysical(INT_WMSnegativeState ? true : inventModelGroup.NegativePhysical);
  25. //END +Allow negative inventory by warehouse+
  26. }
  27. else
  28. {
  29. negativeFinancial = (inventModelGroup.NegativeFinancial || (inventLocation && inventLocation.RetailInventNegFinancial));
  30. negativePhysical = (inventModelGroup.NegativePhysical || (inventLocation && inventLocation.RetailInventNegPhysical));
  31.  
  32. this.parmAllowNegativeFinancial(negativeFinancial);
  33.  
  34. //START +Allow negative inventory by warehouse+
  35. //+orig+ this.parmAllowNegativePhysical(negativePhysical);
  36. this.parmAllowNegativePhysical(negativeStockLevel ? true : inventModelGroup.NegativePhysical);
  37. //END +Allow negative inventory by warehouse+
  38. }
  39. }
Add Comment
Please, Sign In to add comment