1、修复库存调拨时,同一个调拨订单添加多个不同采购价的串码商品审核后采购价随机变成一致的缺陷;

This commit is contained in:
chenlin 2024-10-24 16:04:14 +08:00
parent b56dc88ebd
commit 612c087b44

View File

@ -684,8 +684,8 @@ func allotAuditAndUpdateStock(gdb *gorm.DB, allotOrder ErpInventoryAllotOrder) e
}
// 更新库存调拨商品信息表的调拨金额
err = gdb.Table("erp_inventory_allot_commodity").Where("allot_order_id = ? and commodity_id = ?",
v.AllotOrderId, v.CommodityId).
err = gdb.Table("erp_inventory_allot_commodity").Where("allot_order_id = ? and commodity_id = ? and "+
"imei = ?", v.AllotOrderId, v.CommodityId, v.IMEI).
Updates(map[string]interface{}{
"amount": nAmount,
}).Error