计算earningprice
This commit is contained in:
@@ -392,7 +392,11 @@ func (c *OrderManager) updateOrderSkuOtherInfo(order *model.GoodsOrder, db *dao.
|
||||
if v.VendorPrice == v.SalePrice {
|
||||
var earningPrice = 0
|
||||
if v.ShopPrice < v.SalePrice {
|
||||
earningPrice = int(utils.Float64TwoInt64(math.Round(utils.Int2Float64(int(v.ShopPrice)) * utils.Int2Float64(storePayPercentage) / 100)))
|
||||
if v.ShopPrice == 0 {
|
||||
earningPrice = int(utils.Float64TwoInt64(math.Round(utils.Int2Float64(int(v.SalePrice)) * utils.Int2Float64(storePayPercentage) / 100)))
|
||||
} else {
|
||||
earningPrice = int(utils.Float64TwoInt64(math.Round(utils.Int2Float64(int(v.ShopPrice)) * utils.Int2Float64(storePayPercentage) / 100)))
|
||||
}
|
||||
} else {
|
||||
earningPrice = int(utils.Float64TwoInt64(math.Round(utils.Int2Float64(int(v.SalePrice)) * utils.Int2Float64(storePayPercentage) / 100)))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user