|
@@ -287,15 +287,18 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
|
|
p.setCostPrice(MathUtil.div(p.getCostPrice(), MathUtil.div(MathUtil.add(p.getTaxRate(), 100),100)).doubleValue());
|
|
p.setCostPrice(MathUtil.div(p.getCostPrice(), MathUtil.div(MathUtil.add(p.getTaxRate(), 100),100)).doubleValue());
|
|
p.setNewCostPrice(newCostPrice);*/
|
|
p.setNewCostPrice(newCostPrice);*/
|
|
|
|
|
|
- /* p.setOldDiscountPrice(p.getDiscountPrice());
|
|
|
|
- if ("0".equals(p.getIncludedTax()) && null != p.getTaxRate() && p.getTaxRate() > 0d) {
|
|
|
|
|
|
+ p.setOldDiscountPrice(p.getDiscountPrice());
|
|
|
|
+ /*if ("0".equals(p.getIncludedTax()) && null != p.getTaxRate() && p.getTaxRate() > 0d) {
|
|
p.setDiscountPrice(MathUtil.div(p.getDiscountPrice(), MathUtil.div(MathUtil.add(p.getTaxRate(), 100), 100)).doubleValue());
|
|
p.setDiscountPrice(MathUtil.div(p.getDiscountPrice(), MathUtil.div(MathUtil.add(p.getTaxRate(), 100), 100)).doubleValue());
|
|
}*/
|
|
}*/
|
|
// 付采美总金额
|
|
// 付采美总金额
|
|
allServeAmount = MathUtil.add(allServeAmount, MathUtil.mul(p.getNum(), p.getCmCostPrice())).doubleValue();
|
|
allServeAmount = MathUtil.add(allServeAmount, MathUtil.mul(p.getNum(), p.getCmCostPrice())).doubleValue();
|
|
// 子订单利润
|
|
// 子订单利润
|
|
-
|
|
|
|
- brokerage = MathUtil.add(brokerage, MathUtil.mul(p.getBrokerage(),p.getNum())).doubleValue();
|
|
|
|
|
|
+ if (p.getProductType() == 0) {
|
|
|
|
+ brokerage = MathUtil.add(brokerage, MathUtil.mul(p.getBrokerage(), p.getNum())).doubleValue();
|
|
|
|
+ } else {
|
|
|
|
+ brokerage = MathUtil.add(brokerage, 0).doubleValue();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
so.setBrokerage(brokerage);
|
|
so.setBrokerage(brokerage);
|
|
so.setAllServeAmount(allServeAmount);
|
|
so.setAllServeAmount(allServeAmount);
|
|
@@ -443,13 +446,17 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
|
|
newCostPrice = p.getCostPrice();
|
|
newCostPrice = p.getCostPrice();
|
|
p.setCostPrice(MathUtil.div(p.getCostPrice(), MathUtil.div(MathUtil.add(p.getTaxRate(), 100),100)).doubleValue());
|
|
p.setCostPrice(MathUtil.div(p.getCostPrice(), MathUtil.div(MathUtil.add(p.getTaxRate(), 100),100)).doubleValue());
|
|
p.setNewCostPrice(newCostPrice);*/
|
|
p.setNewCostPrice(newCostPrice);*/
|
|
- /*p.setOldDiscountPrice(p.getDiscountPrice());
|
|
|
|
- if ("0".equals(p.getIncludedTax()) && null != p.getTaxRate() && p.getTaxRate() > 0d) {
|
|
|
|
|
|
+ p.setOldDiscountPrice(p.getDiscountPrice());
|
|
|
|
+ /*if ("0".equals(p.getIncludedTax()) && null != p.getTaxRate() && p.getTaxRate() > 0d) {
|
|
p.setDiscountPrice(MathUtil.div(p.getDiscountPrice(), MathUtil.div(MathUtil.add(p.getTaxRate(), 100), 100)).doubleValue());
|
|
p.setDiscountPrice(MathUtil.div(p.getDiscountPrice(), MathUtil.div(MathUtil.add(p.getTaxRate(), 100), 100)).doubleValue());
|
|
}*/
|
|
}*/
|
|
// 付采美总金额
|
|
// 付采美总金额
|
|
allServeAmount = MathUtil.add(allServeAmount, MathUtil.mul(p.getNum(), p.getCmCostPrice())).doubleValue();
|
|
allServeAmount = MathUtil.add(allServeAmount, MathUtil.mul(p.getNum(), p.getCmCostPrice())).doubleValue();
|
|
- brokerage = MathUtil.add(brokerage, MathUtil.mul(p.getBrokerage(),p.getNum())).doubleValue();
|
|
|
|
|
|
+ if (p.getProductType() == 0) {
|
|
|
|
+ brokerage = MathUtil.add(brokerage, MathUtil.mul(p.getBrokerage(), p.getNum())).doubleValue();
|
|
|
|
+ } else {
|
|
|
|
+ brokerage = MathUtil.add(brokerage, 0).doubleValue();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
so.setBrokerage(brokerage);
|
|
so.setBrokerage(brokerage);
|
|
so.setAllServeAmount(allServeAmount);
|
|
so.setAllServeAmount(allServeAmount);
|