Commit e871cbaa by mushishixian

成本计算规则

parent 81cba3bb
Showing with 6 additions and 1 deletions
......@@ -497,13 +497,18 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku {
//美金成本价
priceCostUs := c.MulFloat(price.PriceUs, usDiscountRatio)
priceCostUs = c.MyRound(priceCostUs, 4)
fmt.Println("美金成本价 :", priceCostUs)
//美金售价
priceUs := c.MulFloat(priceCostUs, priceRatio.RatioUsd)
fmt.Println("美金售价 :", priceUs)
//人民币成本价
priceCostCn := c.MulFloat(price.PriceUs, cnDiscountRatio, coefficient.Ratio, tax)
priceCostCn := c.MulFloat(price.PriceUs, coefficient.Ratio, tax)
priceCostCn = c.MulFloat(c.MyRound(priceCostCn, 4), cnDiscountRatio)
priceCostCn = c.MyRound(priceCostCn, 4)
fmt.Println("人民币成本价 :", priceCostCn)
//人民币售价
priceCn := c.MulFloat(priceCostCn, priceRatio.Ratio)
fmt.Println("人民币售价 :", priceCn)
data[key].PriceUs = c.MyRound(priceUs, 4)
data[key].PriceCostUs = priceCostUs
//处理人民币
......
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