|
@@ -112,7 +112,8 @@ public class WxOrderGoodsServiceImpl implements WxOrderGoodsService {
|
|
wxOrderGoods.setQty(wxOrderGoodsDate.getQty());
|
|
wxOrderGoods.setQty(wxOrderGoodsDate.getQty());
|
|
BigDecimal acturalPrice = wxOrderGoodsDate.getTotalPrice();
|
|
BigDecimal acturalPrice = wxOrderGoodsDate.getTotalPrice();
|
|
BigDecimal acturalTax = wxOrderGoodsDate.getTaxTotal();
|
|
BigDecimal acturalTax = wxOrderGoodsDate.getTaxTotal();
|
|
- BigDecimal price = acturalPrice.multiply(new BigDecimal(1).subtract(acturalTax)).divide(wxOrderGoodsDate.getQty()).setScale(2,BigDecimal.ROUND_HALF_UP);
|
|
|
|
|
|
+ BigDecimal price = acturalPrice.divide(new BigDecimal(1).add(acturalTax),2,BigDecimal.ROUND_HALF_UP);
|
|
|
|
+ price = price.divide(wxOrderGoodsDate.getQty(),2,BigDecimal.ROUND_HALF_UP);
|
|
wxOrderGoods.setPrice(price);
|
|
wxOrderGoods.setPrice(price);
|
|
wxOrderGoods.setTotalPrice(price.multiply(wxOrderGoodsDate.getQty()).setScale(2,BigDecimal.ROUND_HALF_UP));
|
|
wxOrderGoods.setTotalPrice(price.multiply(wxOrderGoodsDate.getQty()).setScale(2,BigDecimal.ROUND_HALF_UP));
|
|
wxOrderGoods.setTaxPrice(acturalPrice.divide(wxOrderGoodsDate.getQty()).setScale(2,BigDecimal.ROUND_HALF_UP));
|
|
wxOrderGoods.setTaxPrice(acturalPrice.divide(wxOrderGoodsDate.getQty()).setScale(2,BigDecimal.ROUND_HALF_UP));
|