|
@ -15,7 +15,11 @@ namespace BBWY.Server.Business.Extensions |
|
|
//退款之后平台扣点
|
|
|
//退款之后平台扣点
|
|
|
//orderCost.PlatformCommissionAmount = (order.OrderPayment - order.FreightPrice - orderCost.RefundAmount) * (orderCost.PlatformCommissionRatio);
|
|
|
//orderCost.PlatformCommissionAmount = (order.OrderPayment - order.FreightPrice - orderCost.RefundAmount) * (orderCost.PlatformCommissionRatio);
|
|
|
|
|
|
|
|
|
orderCost.PlatformCommissionAmount = (order.OrderSellerPrice + (order.PingTaiChengDanYouHuiQuan ?? 0M) - orderCost.RefundAmount) * orderCost.PlatformCommissionRatio; |
|
|
//orderCost.PlatformCommissionAmount = (order.OrderSellerPrice + (order.PingTaiChengDanYouHuiQuan ?? 0M) - orderCost.RefundAmount) * orderCost.PlatformCommissionRatio;
|
|
|
|
|
|
|
|
|
|
|
|
orderCost.PlatformCommissionAmount = ((order.ActualProductAmount ?? 0M) - orderCost.RefundAmount) * orderCost.PlatformCommissionRatio; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//orderCost.Profit = order.OrderSellerPrice + order.FreightPrice - orderCost.RefundAmount -
|
|
|
//orderCost.Profit = order.OrderSellerPrice + order.FreightPrice - orderCost.RefundAmount -
|
|
|
// orderCost.PurchaseAmount -
|
|
|
// orderCost.PurchaseAmount -
|
|
|
// orderCost.DeliveryExpressFreight -
|
|
|
// orderCost.DeliveryExpressFreight -
|
|
@ -33,7 +37,7 @@ namespace BBWY.Server.Business.Extensions |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public static void CalculationOrderProfitAndCost(this OrderCost orderCost, decimal actualAmountProduct, decimal orderSellerPrice, decimal pingtaichengdanyouhuiquan, IList<AfterSaleOrder> afterSaleOrders) |
|
|
public static void CalculationOrderProfitAndCost(this OrderCost orderCost, decimal actualAmountProduct, IList<AfterSaleOrder> afterSaleOrders) |
|
|
{ |
|
|
{ |
|
|
orderCost.AfterTotalCost = afterSaleOrders == null || afterSaleOrders.Count == 0 ? 0M : afterSaleOrders.Sum(aso => aso.AfterTotalCost); |
|
|
orderCost.AfterTotalCost = afterSaleOrders == null || afterSaleOrders.Count == 0 ? 0M : afterSaleOrders.Sum(aso => aso.AfterTotalCost); |
|
|
orderCost.RefundAmount = afterSaleOrders == null || afterSaleOrders.Count == 0 ? 0M : afterSaleOrders.Sum(aso => aso.RefundAmount ?? 0M); |
|
|
orderCost.RefundAmount = afterSaleOrders == null || afterSaleOrders.Count == 0 ? 0M : afterSaleOrders.Sum(aso => aso.RefundAmount ?? 0M); |
|
@ -41,7 +45,7 @@ namespace BBWY.Server.Business.Extensions |
|
|
|
|
|
|
|
|
//退款之后平台扣点
|
|
|
//退款之后平台扣点
|
|
|
//orderCost.PlatformCommissionAmount = (orderPayment - freightPrice - orderCost.RefundAmount) * (orderCost.PlatformCommissionRatio);
|
|
|
//orderCost.PlatformCommissionAmount = (orderPayment - freightPrice - orderCost.RefundAmount) * (orderCost.PlatformCommissionRatio);
|
|
|
orderCost.PlatformCommissionAmount = (orderSellerPrice + pingtaichengdanyouhuiquan - orderCost.RefundAmount) * orderCost.PlatformCommissionRatio; |
|
|
orderCost.PlatformCommissionAmount = (actualAmountProduct - orderCost.RefundAmount) * orderCost.PlatformCommissionRatio; |
|
|
|
|
|
|
|
|
//orderCost.Profit = orderSellerPrice + freightPrice - orderCost.RefundAmount -
|
|
|
//orderCost.Profit = orderSellerPrice + freightPrice - orderCost.RefundAmount -
|
|
|
// orderCost.PurchaseAmount -
|
|
|
// orderCost.PurchaseAmount -
|
|
|