|
|
@ -592,7 +592,8 @@ 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; |
|
|
|
//orderCostDetail.SkuGrossProfit = orderSku.Price.Value * deductionQuantity - avgPreferential - (orderCostDetail.TotalCost + orderCostDetail.DeliveryExpressFreight) - orderSku.Price.Value * deductionQuantity * autoCalculationCostRequest.PlatformCommissionRatio;
|
|
|
|
orderCostDetail.SkuGrossProfit = (orderSku.ShouldPay ?? 0M) - orderCostDetail.TotalCost - orderCostDetail.DeliveryExpressFreight; |
|
|
|
insertOrderCostDetailList.Add(orderCostDetail); |
|
|
|
} |
|
|
|
} |
|
|
@ -660,7 +661,8 @@ namespace BBWY.Server.Business |
|
|
|
{ |
|
|
|
osku.SkuId, |
|
|
|
osku.Price, |
|
|
|
osku.ItemTotal |
|
|
|
osku.ItemTotal, |
|
|
|
osku.ShouldPay |
|
|
|
}); |
|
|
|
var avgPreferential = dbOrder.PreferentialAmount / orderSkuList.Count(); |
|
|
|
|
|
|
@ -682,9 +684,10 @@ namespace BBWY.Server.Business |
|
|
|
var osku = orderSkuList.FirstOrDefault(o => o.SkuId == orderCostDetail.SkuId); |
|
|
|
if (osku != null) |
|
|
|
{ |
|
|
|
orderCostDetail.SkuGrossProfit = osku.Price.Value * orderCostDetail.DeductionQuantity - avgPreferential - |
|
|
|
(orderCostDetail.TotalCost + orderCostDetail.DeliveryExpressFreight) - |
|
|
|
osku.Price.Value * orderCostDetail.DeductionQuantity * manualCalculationCostRequest.PlatformCommissionRatio; |
|
|
|
//orderCostDetail.SkuGrossProfit = osku.Price.Value * orderCostDetail.DeductionQuantity - avgPreferential -
|
|
|
|
// (orderCostDetail.TotalCost + orderCostDetail.DeliveryExpressFreight) -
|
|
|
|
// osku.Price.Value * orderCostDetail.DeductionQuantity * manualCalculationCostRequest.PlatformCommissionRatio;
|
|
|
|
orderCostDetail.SkuGrossProfit = (osku.ShouldPay ?? 0M) - orderCostDetail.TotalCost - orderCostDetail.DeliveryExpressFreight; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -940,9 +943,10 @@ namespace BBWY.Server.Business |
|
|
|
var dbOrderSku = dbOrderSkuList.FirstOrDefault(dbosku => dbosku.SkuId == relationOrderSku.SkuId); |
|
|
|
if (dbOrderSku != null) |
|
|
|
{ |
|
|
|
orderCostDetail.SkuGrossProfit = dbOrderSku.Price.Value * orderCostDetail.DeductionQuantity - avgPreferential - |
|
|
|
(orderCostDetail.TotalCost + orderCostDetail.DeliveryExpressFreight) - |
|
|
|
dbOrderSku.Price.Value * orderCostDetail.DeductionQuantity * relationPurchaseOrderRequestV2.PlatformCommissionRatio; |
|
|
|
//orderCostDetail.SkuGrossProfit = dbOrderSku.Price.Value * orderCostDetail.DeductionQuantity - avgPreferential -
|
|
|
|
// (orderCostDetail.TotalCost + orderCostDetail.DeliveryExpressFreight) -
|
|
|
|
// dbOrderSku.Price.Value * orderCostDetail.DeductionQuantity * relationPurchaseOrderRequestV2.PlatformCommissionRatio;
|
|
|
|
orderCostDetail.SkuGrossProfit = (dbOrderSku.ShouldPay ?? 0M) - orderCostDetail.TotalCost - orderCostDetail.DeliveryExpressFreight; |
|
|
|
} |
|
|
|
#endregion
|
|
|
|
} |
|
|
|