jiangshuai
2023-11-16 a0125ef3d6ce35be7b6dc4919c4192dba4a7329a
报废数量bug
1个文件已修改
5 ■■■■■ 已修改文件
controllers/operation.go 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/operation.go
@@ -413,6 +413,7 @@
                    locAmount.ProductId = v.ID
                    locAmount.CreateDate = time.Now().Format("2006-01-02 15:04:05")
                    locAmount.Amount = locAmount.Amount.Add(value)
                    locAmount.ProductCategoryID = v.CategoryId
                    if res := models.NewLocationProductAmountSearch().Orm.Where("id=?", locAmount.ID).Save(locAmount); res.Error != nil {
                        return res.Error
                    }
@@ -462,6 +463,7 @@
                        locAmount.ProductId = v.ID
                        locAmount.CreateDate = time.Now().Format("2006-01-02 15:04:05")
                        locAmount.Amount = locAmount.Amount.Add(value)
                        locAmount.ProductCategoryID = v.CategoryId
                        if res := models.NewLocationProductAmountSearch().Orm.Where("id=?", locAmount.ID).Save(locAmount); res.Error != nil {
                            return res.Error
                        }
@@ -478,6 +480,7 @@
                        locAmount.ProductId = v.ID
                        locAmount.CreateDate = time.Now().Format("2006-01-02 15:04:05")
                        locAmount.Amount = locAmount.Amount.Add(value)
                        locAmount.ProductCategoryID = v.CategoryId
                        if res := models.NewLocationProductAmountSearch().Orm.Where("id=?", locAmount.ID).Save(locAmount); res.Error != nil {
                            return res.Error
                        }
@@ -611,6 +614,7 @@
                    locAmount.ProductId = v.ID
                    locAmount.CreateDate = time.Now().Format("2006-01-02 15:04:05")
                    locAmount.Amount = locAmount.Amount.Add(value)
                    locAmount.ProductCategoryID = v.CategoryId
                    if res := models.NewLocationProductAmountSearch().Orm.Where("id=?", locAmount.ID).Save(locAmount); res.Error != nil {
                        return res.Error
                    }
@@ -659,6 +663,7 @@
                        locAmount.ProductId = v.ID
                        locAmount.CreateDate = time.Now().Format("2006-01-02 15:04:05")
                        locAmount.Amount = locAmount.Amount.Add(value)
                        locAmount.ProductCategoryID = v.CategoryId
                        if res := models.NewLocationProductAmountSearch().Orm.Where("id=?", locAmount.ID).Save(locAmount); res.Error != nil {
                            return res.Error
                        }