This commit is contained in:
@@ -151,20 +151,20 @@ namespace AyaNova.Biz
|
|||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
item.DisplayPartNumber = await ct.Part.AsNoTracking().Where(x => x.Id == item.PartId).Select(x => x.PartNumber).SingleAsync();
|
item.PartViz = await ct.Part.AsNoTracking().Where(x => x.Id == item.PartId).Select(x => x.PartNumber).SingleAsync();
|
||||||
item.DisplayWarehouse = await ct.PartWarehouse.AsNoTracking().Where(x => x.Id == item.PartWarehouseId).Select(x => x.Name).SingleAsync();
|
item.WarehouseViz = await ct.PartWarehouse.AsNoTracking().Where(x => x.Id == item.PartWarehouseId).Select(x => x.Name).SingleAsync();
|
||||||
if (item.WorkorderItemPartRequestId != null)
|
if (item.WorkorderItemPartRequestId != null)
|
||||||
{
|
{
|
||||||
po.HasPartRequest = true;
|
po.HasPartRequest = true;
|
||||||
item.DisplayRequestWorkorder = "todo:woidfromleafnode";//MIGRATE_OUTSTANDING routine to get wo id from the woitempartrequestid
|
item.WorkorderItemPartRequestViz = "todo:woidfromleafnode";//MIGRATE_OUTSTANDING routine to get wo id from the woitempartrequestid
|
||||||
if (item.PartRequestedById != null)
|
if (item.PartRequestedById != null)
|
||||||
item.DisplayRequestUser = await ct.User.AsNoTracking().Where(x => x.Id == item.PartRequestedById).Select(x => x.Name).SingleAsync();
|
item.PartRequestedByViz = await ct.User.AsNoTracking().Where(x => x.Id == item.PartRequestedById).Select(x => x.Name).SingleAsync();
|
||||||
}
|
}
|
||||||
TaxCode tax = null;
|
TaxCode tax = null;
|
||||||
if (item.PurchaseTaxCodeId != null)
|
if (item.PurchaseTaxCodeId != null)
|
||||||
{
|
{
|
||||||
tax = await ct.TaxCode.AsNoTracking().Where(x => x.Id == item.PurchaseTaxCodeId).SingleAsync();
|
tax = await ct.TaxCode.AsNoTracking().Where(x => x.Id == item.PurchaseTaxCodeId).SingleAsync();
|
||||||
item.DisplayTaxCode = tax.Name;
|
item.PurchaseTaxCodeViz = tax.Name;
|
||||||
po.HasTaxes = true;
|
po.HasTaxes = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -195,10 +195,10 @@ namespace AyaNova.Biz
|
|||||||
dTaxB = (dNet + dTaxA) * tax.TaxB;//tax on tax
|
dTaxB = (dNet + dTaxA) * tax.TaxB;//tax on tax
|
||||||
}
|
}
|
||||||
//set line total and taxes display values
|
//set line total and taxes display values
|
||||||
item.DisplayTaxA = dTaxA;
|
item.TaxAViz = dTaxA;
|
||||||
item.DisplayTaxB = dTaxB;
|
item.TaxBViz = dTaxB;
|
||||||
item.DisplayNetTotal = dNet;
|
item.NetTotalViz = dNet;
|
||||||
item.DisplayLineTotal = dNet + dTaxA + dTaxB;
|
item.LineTotalViz = dNet + dTaxA + dTaxB;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,24 +37,24 @@ namespace AyaNova.Models
|
|||||||
|
|
||||||
//server populated fields not db fields
|
//server populated fields not db fields
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public string DisplayPartNumber { get; set; }
|
public string PartViz { get; set; }
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public string DisplayWarehouse { get; set; }
|
public string WarehouseViz { get; set; }
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public string DisplayRequestUser { get; set; }
|
public string PartRequestedByViz { get; set; }//DisplayRequestUser
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public string DisplayRequestWorkorder { get; set; }
|
public string WorkorderItemPartRequestViz { get; set; }//DisplayRequestWorkorder
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public string DisplayTaxCode { get; set; }
|
public string PurchaseTaxCodeViz { get; set; }//DisplayTaxCode
|
||||||
|
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public decimal DisplayNetTotal { get; set; }
|
public decimal NetTotalViz { get; set; }//DisplayNetTotal
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public decimal DisplayTaxA { get; set; }
|
public decimal TaxAViz { get; set; }//DisplayTaxA
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public decimal DisplayTaxB { get; set; }
|
public decimal TaxBViz { get; set; }//DisplayTaxB
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public decimal DisplayLineTotal { get; set; }
|
public decimal LineTotalViz { get; set; }//DisplayLineTotal
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user