解决bug:如果开启了出入库管理,采购退货或者销售出库的时候会去校验是否缺少库存,应该不需要去校验
This commit is contained in:
@@ -648,8 +648,15 @@ public class DepotItemService {
|
|||||||
thisRealNumber = depotItem.getOperNumber()==null?BigDecimal.ZERO:depotItem.getOperNumber();
|
thisRealNumber = depotItem.getOperNumber()==null?BigDecimal.ZERO:depotItem.getOperNumber();
|
||||||
}
|
}
|
||||||
if(!systemConfigService.getMinusStockFlag() && stock.compareTo(thisRealNumber)<0){
|
if(!systemConfigService.getMinusStockFlag() && stock.compareTo(thisRealNumber)<0){
|
||||||
throw new BusinessRunTimeException(ExceptionConstants.MATERIAL_STOCK_NOT_ENOUGH_CODE,
|
//如果开启出入库管理,并且类型等于采购退货、销售,则跳过
|
||||||
String.format(ExceptionConstants.MATERIAL_STOCK_NOT_ENOUGH_MSG, stockMsg));
|
if(systemConfigService.getInOutManageFlag() &&
|
||||||
|
(BusinessConstants.SUB_TYPE_PURCHASE_RETURN.equals(depotHead.getSubType())
|
||||||
|
||BusinessConstants.SUB_TYPE_SALES.equals(depotHead.getSubType()))) {
|
||||||
|
//跳过
|
||||||
|
} else {
|
||||||
|
throw new BusinessRunTimeException(ExceptionConstants.MATERIAL_STOCK_NOT_ENOUGH_CODE,
|
||||||
|
String.format(ExceptionConstants.MATERIAL_STOCK_NOT_ENOUGH_MSG, stockMsg));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//出库时处理序列号
|
//出库时处理序列号
|
||||||
if(!BusinessConstants.SUB_TYPE_TRANSFER.equals(depotHead.getSubType())) {
|
if(!BusinessConstants.SUB_TYPE_TRANSFER.equals(depotHead.getSubType())) {
|
||||||
|
|||||||
Reference in New Issue
Block a user