|
|
@ -408,7 +408,9 @@ namespace BBWYB.Server.Business |
|
|
|
PurchaserName = purchaseOrder.PurchaserName, |
|
|
|
PurchaserOrderId = purchaseOrder.PurchaseOrderId |
|
|
|
}; |
|
|
|
|
|
|
|
var currentOrderCostDetailList = orderCostDetailList.Where(ocd => ocd.PurchaseOrderId == purchaseOrder.PurchaseOrderId).ToList(); |
|
|
|
|
|
|
|
foreach (var orderCostDetail in currentOrderCostDetailList) |
|
|
|
{ |
|
|
|
var orderSku = orderSkuList.FirstOrDefault(osku => osku.SkuId == orderCostDetail.SkuId); |
|
|
@ -425,7 +427,11 @@ namespace BBWYB.Server.Business |
|
|
|
}; |
|
|
|
if (assocationOrderCostDetail.PurchaseQuantity != 0) |
|
|
|
assocationOrderCostDetail.PurchasePrice = assocationOrderCostDetail.SkuAmount / assocationOrderCostDetail.PurchaseQuantity; |
|
|
|
|
|
|
|
associationPurchaseOrder.AssocationOrderCostDetailList.Add(assocationOrderCostDetail); |
|
|
|
} |
|
|
|
associationPurchaseOrder.PurchaseAmount = associationPurchaseOrder.AssocationOrderCostDetailList.Sum(x => x.SkuAmount); |
|
|
|
associationPurchaseOrder.PurchaseFreight = associationPurchaseOrder.AssocationOrderCostDetailList.Sum(x => x.PurchaseFreight); |
|
|
|
list.Add(associationPurchaseOrder); |
|
|
|
} |
|
|
|
return list; |
|
|
|