Commit 65ad1233 by 杨树贤

活动价格和含税价格的问题

parent af8b6151
Showing with 3 additions and 3 deletions
......@@ -557,10 +557,10 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku {
priceCostUs = c.MyRound(priceCostUs, 4)
//美金售价
priceUs := c.MulFloat(priceCostUs, priceRatio.RatioUsd)
//人民币成本价,mro只有人民币,所以人民币价格不是从美金来的,就它要特殊处理
//人民币成本价,mro只有人民币,所以人民币价格不是从美金来的,而且人民币是含税的.就它要特殊处理
var priceCostCn float64
if sku.SupplierId == 1688 {
priceCostCn = c.MulFloat(price.PriceCn, coefficient.Ratio, tax)
priceCostCn = c.MulFloat(price.PriceCn, coefficient.Ratio)
} else {
priceCostCn = c.MulFloat(price.PriceUs, coefficient.Ratio, tax)
}
......@@ -574,7 +574,7 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku {
data[key].PriceCn = c.MyRound(priceCn, 4)
data[key].PriceCostCn = priceCostCn
//处理活动价和原价相同的情况
if (sku.GoodsType == 1 || sku.GoodsType == 2) && sku.AcType > 1 && sku.Ratio > 0 {
if (sku.GoodsType == 1 || sku.GoodsType == 2 || sku.GoodsType == 6) && sku.AcType > 1 && sku.Ratio > 0 {
priceAc := c.MyRound(c.MulFloat(data[key].PriceCn, (sku.Ratio/100)), 4)
data[key].PriceAc = priceAc
if sku.RatioUs > 0 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment