zhijiezhao před 1 rokem
rodič
revize
8147443aef

+ 1 - 1
src/main/java/com/caimei/modules/order/service/CmPayShopService.java

@@ -461,7 +461,7 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
                         p.setDiscountPrice(MathUtil.div(p.getDiscountPrice(), MathUtil.div(MathUtil.add(p.getTaxRate(), 100), 100)).doubleValue());
                     }*/
                     // 付采美总金额
-                    allServeAmount = MathUtil.add(allServeAmount, MathUtil.mul(MathUtil.sub(p.getNum(),p.getReturnedNum()), p.getCmCostPrice())).doubleValue();
+                    allServeAmount = MathUtil.add(allServeAmount, MathUtil.mul(MathUtil.sub(p.getNum(), p.getReturnedNum()), p.getCmCostPrice())).doubleValue();
                     // 子订单利润
                     if (p.getReturnedNum().equals(p.getNum())) {
                         brokerage = MathUtil.add(brokerage, 0).doubleValue();

+ 2 - 2
src/main/java/com/caimei/modules/order/web/CmPayShopController.java

@@ -335,8 +335,8 @@ public class CmPayShopController extends BaseController {
                     soZeroCostFlag = false;
                 }
                 // 在订单商品含税的情况下, 成本计算税费
-                if ("0".equals(product.getIncludedTax()) && null != product.getTaxRate() && product.getTaxRate() > 0d) {
-                    costPrice = MathUtil.add(costPrice, MathUtil.div(MathUtil.mul(costPrice, product.getTaxRate()), 100)).doubleValue();
+                if ("0".equals(product.getIncludedTax()) && null != product.getSupplierTaxRate() && product.getSupplierTaxRate() > 0d) {
+                    costPrice = MathUtil.add(costPrice, MathUtil.div(MathUtil.mul(costPrice, product.getSupplierTaxRate()), 100)).doubleValue();
                 }
                 // product.setSingleShouldPayTotalTax(MathUtil.div(MathUtil.mul(MathUtil.div(product.getCostPrice(), MathUtil.div(MathUtil.add(product.getTaxRate(), 100),100)), product.getSupplierTaxRate()), 100).doubleValue());
                 Double singleShouldPayTotalTax = product.getSingleShouldPayTotalTax() == null ? 0d : product.getSingleShouldPayTotalTax();

+ 1 - 1
src/main/java/com/caimei/modules/order/web/NewOrderController.java

@@ -729,7 +729,7 @@ public class NewOrderController extends BaseController {
             }
         }
         addMessage(redirectAttributes, "确认订单成功");
-        return "redirect:" + Global.getAdminPath() + "/order/detail/?id=" + orderID;
+        return "redirect:" + Global.getAdminPath() + "/shopOrder/detail/?id=" + shopOrderID;
     }
 
 

+ 1 - 1
src/main/resources/mappings/modules/order/ShopOrderMapper.xml

@@ -79,7 +79,7 @@
     		a.sendOutStatus AS sendOutStatus,
     		a.shopProductAmount AS shopProductAmount,
     		ifnull(a.shopPostFee, 0) AS shopPostFee,
-    		a.shopTaxFee AS shopTaxFee,
+    		ifnull(a.shopTaxFee,0) AS shopTaxFee,
     		a.shouldPayShopAmount AS shouldPayShopAmount,
     		a.payedShopAmount AS payedShopAmount,
     		a.shopOtherFee AS shopOtherFee,