锁定库位
有时候需要锁定某个库位不允许其出库或者入库,可以通过 库存管理->设置->库存细分->位置->其他->锁定->输入已锁定或者输出已锁定来设置.
在InventMovent的checkLocationBlocking方法中可以看到它的逻辑:
个人觉得还是通过是否来判断比较好,无非加个字段而已.
在InventMovent的checkLocationBlocking方法中可以看到它的逻辑:
boolean checkLocationBlocking(InventDim inventDimLocation = null)
{
boolean ret = true;
WMSLocation WMSLocation;
InventDim inventDimThis;
;
if (!this.mustCheckLocationBlocking())
return true;
inventDimThis = inventDimLocation;
if (!inventDimLocation.wMSLocationId)
{
inventDimThis = this.inventdim();
if (!inventDimThis.wMSLocationId)
return true;
}
WMSLocation = inventDimThis.WMSLocation();
if (!WMSLocation)
return true;
if (WMSLocation.InputBlockingCauseId && this.transQty() > 0)
ret = checkFailed(strfmt("@SYS72264", inventDimThis.wMSLocationId));
if (WMSLocation.OutputBlockingCauseId && this.transQty() < 0)
ret = checkFailed(strfmt("@SYS72265", inventDimThis.wMSLocationId));
return ret;
}
AX对于一些逻辑的处理,大部分通过是否来判定,比如是否过账财务库存之类的,而有一些是通过有无来判定,比如是否锁定,它就取决于是否选择了锁定库位的理由来判定,类似的还有是否过账到折扣科目也是通过是否选择了折扣科目来处理的.{
boolean ret = true;
WMSLocation WMSLocation;
InventDim inventDimThis;
;
if (!this.mustCheckLocationBlocking())
return true;
inventDimThis = inventDimLocation;
if (!inventDimLocation.wMSLocationId)
{
inventDimThis = this.inventdim();
if (!inventDimThis.wMSLocationId)
return true;
}
WMSLocation = inventDimThis.WMSLocation();
if (!WMSLocation)
return true;
if (WMSLocation.InputBlockingCauseId && this.transQty() > 0)
ret = checkFailed(strfmt("@SYS72264", inventDimThis.wMSLocationId));
if (WMSLocation.OutputBlockingCauseId && this.transQty() < 0)
ret = checkFailed(strfmt("@SYS72265", inventDimThis.wMSLocationId));
return ret;
}
个人觉得还是通过是否来判断比较好,无非加个字段而已.