This commit is contained in:
苏尹岚
2020-12-29 16:45:20 +08:00
parent 036e25cae1
commit 05140d0baf

View File

@@ -1572,8 +1572,13 @@ func OrderProfitWarning(order *model.GoodsOrder) {
}
storeID := jxutils.GetShowStoreIDFromOrder(order)
storeDetail, err := dao.GetStoreDetail(db, storeID, order.VendorID, "")
payPercentage := 0
if storeDetail != nil && err == nil {
payPercentage := storeDetail.PayPercentage
if storeDetail.VendorPayPercentage != 0 {
payPercentage = storeDetail.VendorPayPercentage
} else {
payPercentage = storeDetail.PayPercentage
}
if beego.BConfig.RunMode == "jxgy" {
if payPercentage >= 50 {
profit = utils.Str2Float64(utils.Int64ToStr(order.TotalShopMoney-order.EarningPrice)) / 100