Integer transferId = RequestUtil.getInteger(getRequestAttributes().get("id"));
Integer userId = RequestUtil.getInteger(getRequestAttributes().get("userid"));
String type = RequestUtil.getString(getRequestAttributes().get("type"));
boolean toAdd = true;
StockUpdateReason reason = StockUpdateReason.TR_IN;
if(type.equalsIgnoreCase("out")){
toAdd = false;
reason = StockUpdateReason.TR_OUT;
}else if(type.equalsIgnoreCase("cancelout")){