huangzhiguo 1 anno fa
parent
commit
59744b6e4f

+ 9 - 0
src/main/java/com/caimei/modules/order/entity/NewOrderProduct.java

@@ -31,6 +31,7 @@ public class NewOrderProduct extends DataEntity<NewOrderProduct> {
     private Double totalAmount;//     float comment '总价',
     private Double discount;//     decimal(20,6) comment '折扣',
     private Double discountPrice;//     decimal(20,6) comment '折后单价',
+    private Double oldDiscountPrice;//     decimal(20,6) comment '折后单价',
     private String includedTax;//   char(2) comment '是否含税 0不含税 1含税 2未知',
     private String invoiceType;//   char(2) comment '发票类型 1增值税专用发票 2增值税普通发票 3不开发票',
     private Double taxRate;//     decimal(20,0) comment '税率',
@@ -339,6 +340,14 @@ public class NewOrderProduct extends DataEntity<NewOrderProduct> {
         this.discountPrice = discountPrice;
     }
 
+    public Double getOldDiscountPrice() {
+        return oldDiscountPrice;
+    }
+
+    public void setOldDiscountPrice(Double oldDiscountPrice) {
+        this.oldDiscountPrice = oldDiscountPrice;
+    }
+
     public Double getTaxRate() {
         return taxRate;
     }

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

@@ -238,6 +238,15 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
                     returnNum = newOrderProductDao.CountReturnedPurchaseProduct(so.getShopOrderID(), p.getOrderProductID());
                     returnNum = returnNum == null ? 0 : returnNum;
                     p.setReturnedNum(returnNum);
+                    // 还原下单时商品成本
+                    /*Double newCostPrice = 0d;
+                    newCostPrice = p.getCostPrice();
+                    p.setCostPrice(MathUtil.div(p.getCostPrice(), MathUtil.div(MathUtil.add(p.getTaxRate(), 100),100)).doubleValue());
+                    p.setNewCostPrice(newCostPrice);*/
+
+                    p.setOldDiscountPrice(p.getDiscountPrice());
+                    p.setDiscountPrice(MathUtil.div(p.getDiscountPrice(), MathUtil.div(MathUtil.add(p.getTaxRate(), 100),100)).doubleValue());
+                    // 付采美总金额
                     allServeAmount += p.getNum() * p.getCmCostPrice();
                 }
                 so.setAllServeAmount(allServeAmount);
@@ -379,6 +388,14 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
                     count = newOrderProductDao.CountReturnedPurchaseProduct(so.getShopOrderID(), p.getOrderProductID());
                     count = count == null ? 0 : count;
                     p.setReturnedNum(count);
+                    // 还原下单时商品成本
+                    /*Double newCostPrice = 0d;
+                    newCostPrice = p.getCostPrice();
+                    p.setCostPrice(MathUtil.div(p.getCostPrice(), MathUtil.div(MathUtil.add(p.getTaxRate(), 100),100)).doubleValue());
+                    p.setNewCostPrice(newCostPrice);*/
+                    p.setOldDiscountPrice(p.getDiscountPrice());
+                    p.setDiscountPrice(MathUtil.div(p.getDiscountPrice(), MathUtil.div(MathUtil.add(p.getTaxRate(), 100),100)).doubleValue());
+                    // 付采美总金额
                     allServeAmount += p.getNum() * p.getCmCostPrice();
                 }
                 so.setAllServeAmount(allServeAmount);

+ 7 - 0
src/main/java/com/caimei/modules/order/service/NewShopOrderService.java

@@ -331,6 +331,13 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
                 Integer returnNum = newOrderProductDao.CountReturnedPurchaseProduct(so.getShopOrderID(), p.getOrderProductID());
                 returnNum = returnNum == null ? 0 : returnNum;
                 p.setReturnedNum(returnNum);
+                // 还原下单时商品成本
+                /*Double newCostPrice = 0d;
+                newCostPrice = p.getCostPrice();
+                p.setCostPrice(MathUtil.div(p.getCostPrice(), MathUtil.div(MathUtil.add(p.getTaxRate(), 100),100)).doubleValue());
+                p.setNewCostPrice(newCostPrice);*/
+                p.setOldDiscountPrice(p.getDiscountPrice());
+                p.setDiscountPrice(MathUtil.div(p.getDiscountPrice(), MathUtil.div(MathUtil.add(p.getTaxRate(), 100),100)).doubleValue());
             }
             if (so.getShopPostFee() == null) so.setShopPostFee(0D);
             if (so.getShopTaxFee() == null) so.setShopTaxFee(0D);

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

@@ -11,6 +11,7 @@ import com.caimei.modules.order.service.*;
 import com.caimei.modules.sys.utils.UploadImageUtils;
 import com.caimei.modules.user.entity.CmUserOrganize;
 import com.caimei.modules.user.service.CmUserOrganizeService;
+import com.caimei.utils.MathUtil;
 import com.thinkgem.jeesite.common.config.Global;
 import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.utils.Encodes;
@@ -302,6 +303,11 @@ public class CmPayShopController extends BaseController {
                 if (soZeroCostFlag && costPrice > 0) {
                     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();
+                }
+                // 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();
                 Double supplierTaxRate = product.getSupplierTaxRate() == null ? 0d : product.getSupplierTaxRate();
                 // 获取已被退款的商品数量
@@ -490,7 +496,7 @@ public class CmPayShopController extends BaseController {
         shopOrder.setModifyShouldPayNote(modifyShouldPayNote);  //备注
         shopOrder.setModifyShouldPayUserID(UserUtils.getUser().getId());  //修改人的用户id
         shopOrder.setModifyShouldPayDate(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));  //修改时间
-        double shouldPayShopAmount = shopOrder.getShopProductAmount() + shopOrder.getShopPostFee() + shopOrder.getShopTaxFee();
+        double shouldPayShopAmount = shopOrder.getShopProductAmount() + shopOrder.getShopPostFee(); // + shopOrder.getShopTaxFee();
         if (shopOrder.getPayedShopAmount() != null && shouldPayShopAmount == shopOrder.getPayedShopAmount())
             shopOrder.setPayStatus("3");
         shopOrder.setShouldPayShopAmount(shouldPayShopAmount);

+ 7 - 0
src/main/java/com/caimei/modules/order/web/CmShopOrderController.java

@@ -7,6 +7,7 @@ import com.caimei.modules.order.service.CmChangePayShopRecondService;
 import com.caimei.modules.order.service.NewShopOrderService;
 import com.caimei.modules.user.entity.CmUserOrganize;
 import com.caimei.modules.user.service.CmUserOrganizeService;
+import com.caimei.utils.MathUtil;
 import com.thinkgem.jeesite.common.config.Global;
 import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.utils.StringUtils;
@@ -195,6 +196,12 @@ public class CmShopOrderController extends BaseController {
         if (CollectionUtils.isNotEmpty(list) && list.size() == 1) {
             dbCostType = list.get(0).getCostType();
         }
+        for (NewOrderProduct p : list.get(0).getNewOrderProducts()) {
+            Double newCostPrice = 0d;
+            newCostPrice = p.getCostPrice();
+            p.setCostPrice(MathUtil.div(p.getCostPrice(), MathUtil.div(MathUtil.add(p.getTaxRate(), 100),100)).doubleValue());
+            p.setNewCostPrice(newCostPrice);
+        }
         BigDecimal payShopOtherFee = cmPayShopRecordDao.findPayShopOtherFee(newShopOrder.getShopOrderID());
         model.addAttribute("payShopOtherFee", payShopOtherFee);
         model.addAttribute("dbCostType", dbCostType);

+ 6 - 5
src/main/webapp/WEB-INF/views/modules/order/cmPayShopChange.jsp

@@ -217,20 +217,21 @@
                         <td>供应商成本(单)</td>
                         <td>集团成本(单)</td>
                         <td>采美成本(单)</td>
-                        <td>供应商税率</td>
+                        <td>机构税率</td>
                         <td>供应商税费(单)</td>
                     </tr>
                     <c:forEach items="${newShopOrder.newOrderProducts}" var="product" varStatus="index">
                         <tr class="orderProducts">
                             <td hidden><input id="num" name="newOrderProducts[${index.index}].num"
                                               value="${product.num - product.returnedNum}"></td>
+<%--                            <td hidden><input id="taxRate" name="newOrderProducts[${index.index}].taxRate" value="${product.taxRate}"></td>--%>
                             <td hidden><input id="presentNum" name="newOrderProducts[${index.index}].presentNum"
                                               value="${product.presentNum}"></td>
                             <td hidden><input id="name" name="newOrderProducts[${index.index}].name"
                                               value="${product.name}"></td>
                             <td hidden><input id="orderProductID" name="newOrderProducts[${index.index}].orderProductID"
                                               value="${product.orderProductID}"></td>
-                            <td hidden><input id="includedTax${index.index}" value="${product.includedTax}"></td>
+                            <td hidden><input id="includedTax${index.index}" name="newOrderProducts[${index.index}].includedTax" value="${product.includedTax}"></td>
                             <td hidden><input id="productID${index.index}" value="${product.productID}"></td>
                             <td width="40%" id="productName${index.index}">${product.name}</td>
                             <td width="30%"><input id="costPrice" style="width: 80px;float: left"
@@ -254,8 +255,8 @@
                                     </c:when>
                                     <c:otherwise>
                                         <input style="width: 120px;float: left" maxlength="5" id="supplierTaxRate"
-                                               name="newOrderProducts[${index.index}].supplierTaxRate"
-                                               value="${empty product.supplierTaxRate?0.0:product.supplierTaxRate}"
+                                               name="newOrderProducts[${index.index}].taxRate"
+                                               value="${empty product.taxRate?0.0:product.taxRate}"
                                                onchange="changeShouldPay(this)"/>%
                                     </c:otherwise>
                                 </c:choose>
@@ -533,7 +534,7 @@
                 $(ele).find('input[id=singleShouldPayTotalTax]').val(singleShouldPayTotalTax);
             }
             //计算应付供应商
-            totalAmount += ((Number(productNum) * Number(costPrice)) + (Number(productNum) * Number(singleShouldPayTotalTax)));
+            totalAmount += ((Number(productNum) * Number(costPrice)) + (Number(productNum) * Number(singleShouldPayTotalTax))); /* + (Number(productNum) * Number(singleShouldPayTotalTax))*/
         });
         totalAmount += Number(shopPostFee);
         // 四舍五入

+ 10 - 9
src/main/webapp/WEB-INF/views/modules/order/cmPayShopDetail.jsp

@@ -393,11 +393,12 @@
                                 </c:if>
                             </td>--%>
                         <td colspan="2">
-                            <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1"
+                            <%--<a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1"
                                style="text-decoration: underline">
-                                <c:if test="${s.shopReceiptStatus == 1}"><font color="red">待收款</font></c:if>
-                                <c:if test="${s.shopReceiptStatus == 2}"><font color="#ff8c00">部分收款</font></c:if>
-                                <c:if test="${s.shopReceiptStatus == 3}"><font color="green">已收款</font></c:if></a>
+                                </a>--%>
+                            <c:if test="${s.shopReceiptStatus == 1}"><font color="red">待收款</font></c:if>
+                            <c:if test="${s.shopReceiptStatus == 2}"><font color="#ff8c00">部分收款</font></c:if>
+                            <c:if test="${s.shopReceiptStatus == 3}"><font color="green">已收款</font></c:if>
                         </td>
                         <td colspan="3">
                             <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1"
@@ -543,9 +544,9 @@
                         <th colspan="2">总价</th>
                         <th>利润(单)</th>
                         <th>利润(总)</th>
-                        <th>平台服务费</th>
+                        <th>平台服务费(单)</th>
                         <th colspan="3">供应商税率 / 单税费 / 总税费</th>
-                        <th>成本(单)</th>
+                        <th>成本(单 + 税)</th>
                         <th>成本(总)</th>
                     </tr>
                     <c:forEach items="${s.newOrderProducts}" var="p" varStatus="pIndex">
@@ -586,13 +587,13 @@
                                     value="${((empty p.touchPrice?p.discountPrice:p.touchPrice) + p.addedValueTax)*(p.num+p.presentNum-p.returnedNum)}"
                                     type="number" pattern="#,##0.00"/></td>
                             <td><fmt:formatNumber
-                                    value="${(empty p.touchPrice?p.discountPrice:p.touchPrice) + p.addedValueTax - p.costPrice - p.singleShouldPayTotalTax}"
+                                    value="${p.oldDiscountPrice - p.costPrice - p.cmCostPrice - p.organizeCostPrice}"
                                     pattern="#,##0.00"/></td>
 
                             <td class="payCm"><fmt:formatNumber
-                                    value="${((empty p.touchPrice?p.discountPrice:p.touchPrice) + p.addedValueTax - p.costPrice - p.singleShouldPayTotalTax) * (p.num + p.presentNum - p.returnedNum)}"
+                                    value="${(p.oldDiscountPrice - p.costPrice - p.cmCostPrice - p.organizeCostPrice) * (p.num + p.presentNum - p.returnedNum)}"
                                     pattern="#,##0.00"/></td>
-                            <td>${p.cmCostPrice}</td>
+                            <td><fmt:formatNumber value="${p.cmCostPrice}" type="number" pattern="#,##0.00"/></td>
                             <td class="p-taxes">${(p.includedTax ne '' and p.includedTax eq 0 and p.invoiceType eq 3)?'---':empty p.supplierTaxRate?0.0:p.supplierTaxRate}${(p.includedTax ne '' and p.includedTax eq 0 and p.invoiceType eq 3)?'':'%'}</td>
                             <td class="p-taxes">${(p.includedTax ne '' and (p.includedTax eq 1 or (p.includedTax eq 0 and p.invoiceType eq 3)))?'---': empty p.singleShouldPayTotalTax ?0.00:p.singleShouldPayTotalTax}</td>
                             <td class="p-taxes-t"><c:choose>

+ 10 - 9
src/main/webapp/WEB-INF/views/modules/order/cmPayShopEdit.jsp

@@ -143,11 +143,12 @@
                                 </c:if>
                             </td>--%>
                         <td colspan="2">
-                            <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1"
+                            <%--<a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1"
                                style="text-decoration: underline">
-                                <c:if test="${s.shopReceiptStatus == 1}"><font color="red">待收款</font></c:if>
-                                <c:if test="${s.shopReceiptStatus == 2}"><font color="#ff8c00">部分收款</font></c:if>
-                                <c:if test="${s.shopReceiptStatus == 3}"><font color="green">已收款</font></c:if></a>
+                                </a>--%>
+                            <c:if test="${s.shopReceiptStatus == 1}"><font color="red">待收款</font></c:if>
+                            <c:if test="${s.shopReceiptStatus == 2}"><font color="#ff8c00">部分收款</font></c:if>
+                            <c:if test="${s.shopReceiptStatus == 3}"><font color="green">已收款</font></c:if>
                         </td>
                         <td colspan="3">
                             <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1"
@@ -293,9 +294,9 @@
                         <th colspan="2">总价</th>
                         <th>利润(单)</th>
                         <th>利润(总)</th>
-                        <th>平台服务费</th>
+                        <th>平台服务费(单)</th>
                         <th colspan="3">供应商税率 / 单税费 / 总税费</th>
-                        <th>成本(单)</th>
+                        <th>成本(单 + 税)</th>
                         <th>成本(总)</th>
                     </tr>
                     <c:forEach items="${s.newOrderProducts}" var="p" varStatus="pIndex">
@@ -336,13 +337,13 @@
                                     value="${((empty p.touchPrice?p.discountPrice:p.touchPrice) + p.addedValueTax)*(p.num+p.presentNum-p.returnedNum)}"
                                     type="number" pattern="#,##0.00"/></td>
                             <td><fmt:formatNumber
-                                    value="${(empty p.touchPrice?p.discountPrice:p.touchPrice) + p.addedValueTax - p.costPrice - p.singleShouldPayTotalTax}"
+                                    value="${p.oldDiscountPrice - p.costPrice - p.cmCostPrice - p.organizeCostPrice}"
                                     pattern="#,##0.00"/></td>
 
                             <td class="payCm"><fmt:formatNumber
-                                    value="${((empty p.touchPrice?p.discountPrice:p.touchPrice) + p.addedValueTax - p.costPrice - p.singleShouldPayTotalTax) * (p.num + p.presentNum - p.returnedNum)}"
+                                    value="${(p.oldDiscountPrice - p.costPrice - p.cmCostPrice - p.organizeCostPrice) * (p.num + p.presentNum - p.returnedNum)}"
                                     pattern="#,##0.00"/></td>
-                            <td>${p.cmCostPrice}</td>
+                            <td><fmt:formatNumber value="${p.cmCostPrice}" type="number" pattern="#,##0.00"/></td>
                             <td class="p-taxes">${(p.includedTax ne '' and p.includedTax eq 0 and p.invoiceType eq 3)?'---':empty p.supplierTaxRate?0.0:p.supplierTaxRate}${(p.includedTax ne '' and p.includedTax eq 0 and p.invoiceType eq 3)?'':'%'}</td>
                             <td class="p-taxes">${(p.includedTax ne '' and (p.includedTax eq 1 or (p.includedTax eq 0 and p.invoiceType eq 3)))?'---': empty p.singleShouldPayTotalTax ?0.00:p.singleShouldPayTotalTax}</td>
                             <td class="p-taxes-t"><c:choose>

+ 10 - 9
src/main/webapp/WEB-INF/views/modules/order/cmPayShopForm.jsp

@@ -475,11 +475,12 @@
                             </c:if>
                         </td>--%>
                         <td colspan="2">
-                            <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1"
+                            <%--<a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1"
                                style="text-decoration: underline">
-                                <c:if test="${s.shopReceiptStatus == 1}"><font color="red">待收款</font></c:if>
-                                <c:if test="${s.shopReceiptStatus == 2}"><font color="#ff8c00">部分收款</font></c:if>
-                                <c:if test="${s.shopReceiptStatus == 3}"><font color="green">已收款</font></c:if></a>
+                                </a>--%>
+                            <c:if test="${s.shopReceiptStatus == 1}"><font color="red">待收款</font></c:if>
+                            <c:if test="${s.shopReceiptStatus == 2}"><font color="#ff8c00">部分收款</font></c:if>
+                            <c:if test="${s.shopReceiptStatus == 3}"><font color="green">已收款</font></c:if>
                         </td>
                         <td colspan="3">
                             <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1"
@@ -625,9 +626,9 @@
                         <th colspan="2">总价</th>
                         <th>利润(单)</th>
                         <th>利润(总)</th>
-                        <th>平台服务费</th>
+                        <th>平台服务费(单)</th>
                         <th colspan="3">供应商税率 / 单税费 / 总税费</th>
-                        <th>成本(单)</th>
+                        <th>成本(单 + 税)</th>
                         <th>成本(总)</th>
                     </tr>
                     <c:forEach items="${s.newOrderProducts}" var="p" varStatus="pIndex">
@@ -668,13 +669,13 @@
                                     value="${((empty p.touchPrice?p.discountPrice:p.touchPrice) + p.addedValueTax)*(p.num+p.presentNum-p.returnedNum)}"
                                     type="number" pattern="#,##0.00"/></td>
                             <td><fmt:formatNumber
-                                    value="${(empty p.touchPrice?p.discountPrice:p.touchPrice) + p.addedValueTax - p.costPrice - p.singleShouldPayTotalTax}"
+                                    value="${p.oldDiscountPrice - p.costPrice - p.cmCostPrice - p.organizeCostPrice}"
                                     pattern="#,##0.00"/></td>
 
                             <td class="payCm"><fmt:formatNumber
-                                    value="${((empty p.touchPrice?p.discountPrice:p.touchPrice) + p.addedValueTax - p.costPrice - p.singleShouldPayTotalTax) * (p.num + p.presentNum - p.returnedNum)}"
+                                    value="${(p.oldDiscountPrice - p.costPrice - p.cmCostPrice - p.organizeCostPrice) * (p.num + p.presentNum - p.returnedNum)}"
                                     pattern="#,##0.00"/></td>
-                            <td>${p.cmCostPrice}</td>
+                            <td><fmt:formatNumber value="${p.cmCostPrice}" type="number" pattern="#,##0.00"/></td>
                             <td class="p-taxes">${(p.includedTax ne '' and p.includedTax eq 0 and p.invoiceType eq 3)?'---':empty p.supplierTaxRate?0.0:p.supplierTaxRate}${(p.includedTax ne '' and p.includedTax eq 0 and p.invoiceType eq 3)?'':'%'}</td>
                             <td class="p-taxes">${(p.includedTax ne '' and (p.includedTax eq 1 or (p.includedTax eq 0 and p.invoiceType eq 3)))?'---': empty p.singleShouldPayTotalTax ?0.00:p.singleShouldPayTotalTax}</td>
                             <td class="p-taxes-t"><c:choose>

+ 2 - 2
src/main/webapp/WEB-INF/views/modules/order/cmPayShopList.jsp

@@ -419,10 +419,10 @@
                     <td colspan="2"><fmt:formatNumber value="${s.totalAmount}" type="number" pattern="#,##0.00"/></td>
                     <td colspan="3">${s.orderTime}</td>
                         <%--此处对应订单列表收款状态--%>
-                    <td><a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1" style="text-decoration: underline">
+                    <td><%--<a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1" style="text-decoration: underline"></a>--%>
                         <c:if test="${s.shopReceiptStatus == 1}"><font color="red">待收款</font></c:if>
                         <c:if test="${s.shopReceiptStatus == 2}"><font color="#ff8c00">部分收款</font></c:if>
-                        <c:if test="${s.shopReceiptStatus == 3}"><font color="green">已收款</font></c:if></a>
+                        <c:if test="${s.shopReceiptStatus == 3}"><font color="green">已收款</font></c:if>
                     </td>
                     <td><a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1" style="text-decoration: underline">${s.receiptAmount}</a></td>
                     <td colspan="3">

+ 10 - 9
src/main/webapp/WEB-INF/views/modules/order/cmPayShopPrintDetail.jsp

@@ -156,11 +156,12 @@
                                     </c:if>
                                 </td>--%>
 							<td colspan="2">
-								<a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1"
+								<%--<a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1"
 								   style="text-decoration: underline">
-									<c:if test="${s.shopReceiptStatus == 1}"><font color="red">待收款</font></c:if>
-									<c:if test="${s.shopReceiptStatus == 2}"><font color="#ff8c00">部分收款</font></c:if>
-									<c:if test="${s.shopReceiptStatus == 3}"><font color="green">已收款</font></c:if></a>
+									</a>--%>
+								<c:if test="${s.shopReceiptStatus == 1}"><font color="red">待收款</font></c:if>
+								<c:if test="${s.shopReceiptStatus == 2}"><font color="#ff8c00">部分收款</font></c:if>
+								<c:if test="${s.shopReceiptStatus == 3}"><font color="green">已收款</font></c:if>
 							</td>
 							<td colspan="3">
 								<a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1"
@@ -306,9 +307,9 @@
 							<th colspan="2">总价</th>
 							<th>利润(单)</th>
 							<th>利润(总)</th>
-							<th>平台服务费</th>
+							<th>平台服务费(单)</th>
 							<th colspan="3">供应商税率 / 单税费 / 总税费</th>
-							<th>成本(单)</th>
+							<th>成本(单 + 税)</th>
 							<th>成本(总)</th>
 						</tr>
 						<c:forEach items="${s.newOrderProducts}" var="p" varStatus="pIndex">
@@ -349,13 +350,13 @@
 										value="${((empty p.touchPrice?p.discountPrice:p.touchPrice) + p.addedValueTax)*(p.num+p.presentNum-p.returnedNum)}"
 										type="number" pattern="#,##0.00"/></td>
 								<td><fmt:formatNumber
-										value="${(empty p.touchPrice?p.discountPrice:p.touchPrice) + p.addedValueTax - p.costPrice - p.singleShouldPayTotalTax}"
+										value="${p.oldDiscountPrice - p.costPrice - p.cmCostPrice - p.organizeCostPrice}"
 										pattern="#,##0.00"/></td>
 
 								<td class="payCm"><fmt:formatNumber
-										value="${((empty p.touchPrice?p.discountPrice:p.touchPrice) + p.addedValueTax - p.costPrice - p.singleShouldPayTotalTax) * (p.num + p.presentNum - p.returnedNum)}"
+										value="${(p.oldDiscountPrice - p.costPrice - p.cmCostPrice - p.organizeCostPrice) * (p.num + p.presentNum - p.returnedNum)}"
 										pattern="#,##0.00"/></td>
-								<td>${p.cmCostPrice}</td>
+								<td><fmt:formatNumber value="${p.cmCostPrice}" type="number" pattern="#,##0.00"/></td>
 								<td class="p-taxes">${(p.includedTax ne '' and p.includedTax eq 0 and p.invoiceType eq 3)?'---':empty p.supplierTaxRate?0.0:p.supplierTaxRate}${(p.includedTax ne '' and p.includedTax eq 0 and p.invoiceType eq 3)?'':'%'}</td>
 								<td class="p-taxes">${(p.includedTax ne '' and (p.includedTax eq 1 or (p.includedTax eq 0 and p.invoiceType eq 3)))?'---': empty p.singleShouldPayTotalTax ?0.00:p.singleShouldPayTotalTax}</td>
 								<td class="p-taxes-t"><c:choose>