|
@@ -276,7 +276,6 @@ public class OrderSubmitServiceImpl implements OrderSubmitService {
|
|
|
// 机构税费(单)
|
|
|
BigDecimal addedValueTax = new BigDecimal(0);
|
|
|
int priceType = 0;
|
|
|
- //不含税可开票商品计算税费
|
|
|
Integer activityId = productMapper.getActivityIdByProductId(product.getProductId());
|
|
|
if (activityId != null && activityId > 0) {
|
|
|
//活动阶梯
|
|
@@ -297,15 +296,21 @@ public class OrderSubmitServiceImpl implements OrderSubmitService {
|
|
|
productPrice = collageProduct.getPrice();
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
Integer discount = productMapper.findProductDiscount(product.getProductId(), userId);
|
|
|
if (null != discount && discount > 0) {
|
|
|
productPrice = MathUtil.div(MathUtil.mul(productPrice, discount), 100);
|
|
|
}
|
|
|
- //税费
|
|
|
+ //不含税可开票商品计算税费
|
|
|
boolean addTaxFlag = (0 == product.getIncludedTax()) && (1 == product.getInvoiceType() || 2 == product.getInvoiceType());
|
|
|
if (addTaxFlag) {
|
|
|
addedValueTax = MathUtil.div(MathUtil.mul(productPrice, product.getClubTaxPoint()), BigDecimal.valueOf(100), 2);
|
|
|
productPrice = MathUtil.add(productPrice, addedValueTax);
|
|
|
+ BigDecimal normalPrice = product.getNormalPrice();
|
|
|
+ if (null != normalPrice) {
|
|
|
+ BigDecimal normalPriceTax = MathUtil.div(MathUtil.mul(normalPrice, product.getClubTaxPoint()), BigDecimal.valueOf(100), 2);
|
|
|
+ product.setNormalPrice(MathUtil.add(normalPrice,normalPriceTax));
|
|
|
+ }
|
|
|
product.setPrice(productPrice);
|
|
|
}
|
|
|
if (MathUtil.compare(productPrice, BigDecimal.ZERO) == 0) {
|