This commit is contained in:
2021-02-24 18:00:12 +00:00
parent 2704e5a98d
commit 0aca73ec00

View File

@@ -528,6 +528,11 @@ namespace AyaNova.Biz
//Update part values into poitem if the vendor has changed
if (oldObj.VendorId != newObj.VendorId)
SetPoItemDefaultPartValues(newItem, PoParts, newObj.VendorId);
//Set received cost if appropriate but don't overwrite an existing one
if (newItem.QuantityReceived > 0 && newItem.ReceivedCost == 0 && newItem.PurchaseOrderCost != 0)
newItem.ReceivedCost = newItem.PurchaseOrderCost;
continue;//on to next
}
@@ -556,8 +561,7 @@ namespace AyaNova.Biz
//Costs
poItem.PurchaseOrderCost = ThisPart.Cost;
if (poItem.QuantityReceived > 0 && poItem.ReceivedCost == 0 && poItem.PurchaseOrderCost != 0)
poItem.ReceivedCost = poItem.PurchaseOrderCost;
}