|
@@ -202,7 +202,7 @@ public class CmPayShopController extends BaseController {
|
|
* promotionFullReduction 促销满减优惠(不考虑凑单促销)
|
|
* promotionFullReduction 促销满减优惠(不考虑凑单促销)
|
|
*/
|
|
*/
|
|
String shopOrderID = newShopOrder.getId();
|
|
String shopOrderID = newShopOrder.getId();
|
|
- Double freight = newShopOrder.getShopPostFee();
|
|
|
|
|
|
+ Double freight = null == newShopOrder.getShopPostFee() ? 0d : newShopOrder.getShopPostFee();
|
|
Double thirdPartyFee = newShopOrder.getShopOtherFee() == null ? 0d : newShopOrder.getShopOtherFee();
|
|
Double thirdPartyFee = newShopOrder.getShopOtherFee() == null ? 0d : newShopOrder.getShopOtherFee();
|
|
String costType = newShopOrder.getCostType();
|
|
String costType = newShopOrder.getCostType();
|
|
Double proportional = newShopOrder.getProportional();
|
|
Double proportional = newShopOrder.getProportional();
|
|
@@ -220,8 +220,7 @@ public class CmPayShopController extends BaseController {
|
|
double totalCostFee = 0D;
|
|
double totalCostFee = 0D;
|
|
double totalTaxesFee = 0D;
|
|
double totalTaxesFee = 0D;
|
|
NewShopOrder shopOrder = newShopOrderService.get(shopOrderID);
|
|
NewShopOrder shopOrder = newShopOrderService.get(shopOrderID);
|
|
- // 初始运费
|
|
|
|
- Double postFee = null == shopOrder.getShopPostFee() ? 0d : shopOrder.getShopPostFee();
|
|
|
|
|
|
+
|
|
String dbcostType = shopOrder.getCostType();
|
|
String dbcostType = shopOrder.getCostType();
|
|
String cmChangePayShopRecondId = "0";
|
|
String cmChangePayShopRecondId = "0";
|
|
if (StringUtils.isEmpty(dbcostType)) {
|
|
if (StringUtils.isEmpty(dbcostType)) {
|
|
@@ -363,8 +362,10 @@ public class CmPayShopController extends BaseController {
|
|
cmChangePayShopProduct.setSingleShouldPayTotalTax(orderProduct.getSingleShouldPayTotalTax());
|
|
cmChangePayShopProduct.setSingleShouldPayTotalTax(orderProduct.getSingleShouldPayTotalTax());
|
|
cmChangePayShopProductService.save(cmChangePayShopProduct);
|
|
cmChangePayShopProductService.save(cmChangePayShopProduct);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ // 成本
|
|
orderProduct.setCostPrice(costPrice);
|
|
orderProduct.setCostPrice(costPrice);
|
|
|
|
+ // 成本 不含税
|
|
|
|
+ orderProduct.setCostPriceTax(product.getCostPrice() == null ? 0d : product.getCostPrice());
|
|
orderProduct.setOrganizeCostPrice(organizeCostPrice);
|
|
orderProduct.setOrganizeCostPrice(organizeCostPrice);
|
|
orderProduct.setCmCostPrice(cmCostPrice);
|
|
orderProduct.setCmCostPrice(cmCostPrice);
|
|
// 同步使用机构税率 作为供应商税率
|
|
// 同步使用机构税率 作为供应商税率
|
|
@@ -527,10 +528,8 @@ public class CmPayShopController extends BaseController {
|
|
shopOrder.setModifyShouldPayNote(modifyShouldPayNote); //备注
|
|
shopOrder.setModifyShouldPayNote(modifyShouldPayNote); //备注
|
|
shopOrder.setModifyShouldPayUserID(UserUtils.getUser().getId()); //修改人的用户id
|
|
shopOrder.setModifyShouldPayUserID(UserUtils.getUser().getId()); //修改人的用户id
|
|
shopOrder.setModifyShouldPayDate(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); //修改时间
|
|
shopOrder.setModifyShouldPayDate(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); //修改时间
|
|
- double shouldPayShopAmount = shopOrder.getShopProductAmount();
|
|
|
|
- if (null != shopOrder.getShopPostFee()) {
|
|
|
|
- shouldPayShopAmount += (shopOrder.getShopPostFee() - postFee);
|
|
|
|
- }
|
|
|
|
|
|
+ double shouldPayShopAmount = shopOrder.getShopProductAmount() + (null != shopOrder.getShopPostFee() ? shopOrder.getShopPostFee() : 0d);
|
|
|
|
+
|
|
if (shopOrder.getPayedShopAmount() != null && shouldPayShopAmount == shopOrder.getPayedShopAmount()) {
|
|
if (shopOrder.getPayedShopAmount() != null && shouldPayShopAmount == shopOrder.getPayedShopAmount()) {
|
|
shopOrder.setPayStatus("3");
|
|
shopOrder.setPayStatus("3");
|
|
}
|
|
}
|