结算京西平台费时,采用四舍五入计算

This commit is contained in:
renyutian
2019-04-24 17:02:42 +08:00
parent b9112379df
commit dcb9122425
2 changed files with 3 additions and 3 deletions

View File

@@ -62,8 +62,8 @@ func (c *OrderManager) SaveOrderFinancialInfo(order *model.OrderFinancial, opera
}
}
order.ShopMoneyByCal = order.SalePriceMoney - order.TotalDiscountMoney - order.PointsDeductionMoney + order.PmFreightDiscountMoney - order.DistanceFreightMoney - order.FreightTipsMoney - order.DonationMoney + order.SelfDeliveryDiscountMoney + order.PmSubsidyMoney + order.SkuBoxMoney + order.BoxMoney - order.PmMoney
order.JxPmMoney = (order.ShopMoney+order.PmMoney)*TotalRate/1000 - order.PmMoney // 京西平台费 = 总金额*20%-第三方平台费
if order.JxPmMoney < 0 { // 如果算出京西平台费为负数则置0
order.JxPmMoney = utils.Float64TwoInt64(float64(order.ShopMoney+order.PmMoney)*TotalRate/1000) - order.PmMoney // 京西平台费 = 总金额*20%-第三方平台费
if order.JxPmMoney < 0 { // 如果算出京西平台费为负数则置0
order.JxPmMoney = 0
}