This commit is contained in:
@@ -699,12 +699,15 @@ namespace AyaNova.Biz
|
|||||||
{
|
{
|
||||||
var ThisPart = poParts.Single(x => x.Id == poItem.PartId);//part should always be there, if it isn't we have deeper problems
|
var ThisPart = poParts.Single(x => x.Id == poItem.PartId);//part should always be there, if it isn't we have deeper problems
|
||||||
//VendorPartNumber
|
//VendorPartNumber
|
||||||
if (ThisPart.ManufacturerId == vendorId)
|
if (string.IsNullOrWhiteSpace(poItem.VendorPartNumber))//only set if empty, user may have typed in one already on create
|
||||||
poItem.VendorPartNumber = ThisPart.ManufacturerNumber;
|
{
|
||||||
else if (ThisPart.WholeSalerId == vendorId)
|
if (ThisPart.ManufacturerId == vendorId)
|
||||||
poItem.VendorPartNumber = ThisPart.WholeSalerNumber;
|
poItem.VendorPartNumber = ThisPart.ManufacturerNumber;
|
||||||
else if (ThisPart.AlternativeWholeSalerId == vendorId)
|
else if (ThisPart.WholeSalerId == vendorId)
|
||||||
poItem.VendorPartNumber = ThisPart.AlternativeWholeSalerNumber;
|
poItem.VendorPartNumber = ThisPart.WholeSalerNumber;
|
||||||
|
else if (ThisPart.AlternativeWholeSalerId == vendorId)
|
||||||
|
poItem.VendorPartNumber = ThisPart.AlternativeWholeSalerNumber;
|
||||||
|
}
|
||||||
|
|
||||||
//Costs
|
//Costs
|
||||||
poItem.PurchaseOrderCost = ThisPart.Cost;
|
poItem.PurchaseOrderCost = ThisPart.Cost;
|
||||||
|
|||||||
Reference in New Issue
Block a user