From 259f3b2b7176414dfccede254609fdc2db95ba7f Mon Sep 17 00:00:00 2001 From: shanj <18996038927@163.com> Date: Tue, 12 Dec 2023 20:32:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=A2=84=E4=BC=B0=E6=88=90?= =?UTF-8?q?=E6=9C=AC=E7=9A=84=E8=AE=A2=E5=8D=95=E5=9C=A8=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E6=88=90=E6=9C=AC=E6=97=B6=E7=9A=84=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E8=AE=A1=E7=AE=97=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BBWY.Server.Business/Order/OrderBusiness.cs | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/BBWY.Server.Business/Order/OrderBusiness.cs b/BBWY.Server.Business/Order/OrderBusiness.cs index db1c0b62..69618a12 100644 --- a/BBWY.Server.Business/Order/OrderBusiness.cs +++ b/BBWY.Server.Business/Order/OrderBusiness.cs @@ -596,17 +596,6 @@ namespace BBWY.Server.Business SkuAmount = purchaseOrder.SingleSkuAmount * deductionQuantity, StorageAmount = purchaseOrder.SingleStorageAmount * deductionQuantity }; - //orderCostDetail.SkuGrossProfit = orderSku.Price.Value * deductionQuantity - avgPreferential - (orderCostDetail.TotalCost + orderCostDetail.DeliveryExpressFreight) - orderSku.Price.Value * deductionQuantity * autoCalculationCostRequest.PlatformCommissionRatio; - - - //var shouldPay = orderSku.ShouldPay ?? 0M; - //var pingTaiCoupon = orderSku.PingTaiChengDanYouHuiQuan ?? 0M; - //var venderFee = orderSku.VenderFee ?? 0M; - - //var koudian = (shouldPay - venderFee) * deductionQuantity * autoCalculationCostRequest.PlatformCommissionRatio; - //orderCostDetail.SkuGrossProfit = (shouldPay + pingTaiCoupon) * deductionQuantity - - // orderCostDetail.TotalCost - orderCostDetail.DeliveryExpressFreight - - // koudian; orderCostDetail.CalculationSkuGrossProfit(orderSku.ShouldPay ?? 0M, orderSku.PingTaiChengDanYouHuiQuan ?? 0M, @@ -642,7 +631,12 @@ namespace BBWY.Server.Business } else { - orderCost.IsEstimateCost = false; + if (orderCost.IsEstimateCost == true) + { + orderCost.IsEstimateCost = false; + orderCost.PurchaseAmount = 0M; + orderCost.DeliveryExpressFreight = 0M; + } orderCost.PurchaseAmount += orderCostPurchaseAmount; orderCost.DeliveryExpressFreight += orderDeliveryExpressFreight; orderCost.CalculationOrderProfitAndCost(dbOrder, dbAfterSaleOrderList);