Browse Source

在线采购使用扩展函数计算订单利润

AddValidOverTime
sanji 2 years ago
parent
commit
52f340cd34
  1. 13
      BBWY.Server.Business/PurchaseOrder/PurchaseOrderBusiness.cs

13
BBWY.Server.Business/PurchaseOrder/PurchaseOrderBusiness.cs

@ -293,12 +293,13 @@ namespace BBWY.Server.Business
SDOrderAmount = 0,
PurchaseAmount = purchaseOrderSimpleInfo.TotalAmount
};
orderCost.PlatformCommissionAmount = dbOrder.OrderSellerPrice * orderCost.PlatformCommissionRatio;
orderCost.Profit = dbOrder.OrderSellerPrice +
dbOrder.FreightPrice -
orderCost.PurchaseAmount -
orderCost.DeliveryExpressFreight -
orderCost.PlatformCommissionAmount;
//orderCost.PlatformCommissionAmount = dbOrder.OrderSellerPrice * orderCost.PlatformCommissionRatio;
//orderCost.Profit = dbOrder.OrderSellerPrice +
// dbOrder.FreightPrice -
// orderCost.PurchaseAmount -
// orderCost.DeliveryExpressFreight -
// orderCost.PlatformCommissionAmount;
orderCost.CalculationOrderProfitAndCost(dbOrder, null);
if (!isRepurchase)
{
insertOrderCost = fsql.Insert(orderCost);

Loading…
Cancel
Save