1、修复库存调拨编辑订单添加商品报错的缺陷;

2、修改采购订单反审核报错的缺陷;
This commit is contained in:
chenlin 2024-09-06 09:57:30 +08:00
parent 5d99ba9e64
commit 502a67429e
2 changed files with 7 additions and 7 deletions

View File

@ -142,12 +142,12 @@ func checkAllotInventoryParam(req *InventoryAllotAddReq, editFlag bool) error {
}
}
// 校验编辑订单时是否有传商品ID
if editFlag {
if item.ID == 0 {
return fmt.Errorf("商品[%s]ID为空", item.CommodityName)
}
}
//// 校验编辑订单时是否有传商品ID
//if editFlag {
// if item.ID == 0 {
// return fmt.Errorf("商品[%s]ID为空", item.CommodityName)
// }
//}
// 校验串码类型
switch item.IMEIType {

View File

@ -1379,7 +1379,7 @@ func combineStocks(waitCreateStockList []ErpStock) []ErpStock {
func InventoryErpPurchaseUpdateRejectStock(gdb *gorm.DB, list []ErpPurchaseInventory, purchaseOrder ErpPurchaseOrder) error {
usedStockCommodityIdList := make(map[uint32]bool)
for i, _ := range list {
if list[i].IMEIType == 2 { // 串码商品
if list[i].IMEIType == 2 || list[i].IMEIType == 3 { // 串码商品
if list[i].IMEI == "" {
return errors.New("串码为空")
}