This commit is contained in:
@@ -128,13 +128,13 @@ namespace AyaNova.Biz
|
||||
|
||||
//populate server fields for client ui
|
||||
//Show Warehouses
|
||||
po.DisplayWarehouses = await ct.PartWarehouse.CountAsync() > 1;
|
||||
po.HasSelectableWarehouses = await ct.PartWarehouse.CountAsync() > 1;
|
||||
|
||||
//default hidden and show when traverse items if applicable
|
||||
po.DisplayPartRequest = false;
|
||||
po.DisplayTaxes = false;
|
||||
po.DisplayReceived = false;
|
||||
po.DisplayVendorNumber = false;
|
||||
po.HasPartRequest = false;
|
||||
po.HasTaxes = false;
|
||||
po.HasReceipt = false;
|
||||
po.HasVendorNumber = false;
|
||||
|
||||
foreach (PurchaseOrderItem item in po.Items)
|
||||
{
|
||||
@@ -144,7 +144,7 @@ namespace AyaNova.Biz
|
||||
item.DisplayWarehouse = await ct.PartWarehouse.AsNoTracking().Where(x => x.Id == item.PartWarehouseId).Select(x => x.Name).SingleAsync();
|
||||
if (item.WorkorderItemPartRequestId != null)
|
||||
{
|
||||
po.DisplayPartRequest = true;
|
||||
po.HasPartRequest = true;
|
||||
item.DisplayRequestWorkorder = "todo:woidfromleafnode";//MIGRATE_OUTSTANDING routine to get wo id from the woitempartrequestid
|
||||
if (item.PartRequestedById != null)
|
||||
item.DisplayRequestUser = await ct.User.AsNoTracking().Where(x => x.Id == item.PartRequestedById).Select(x => x.Name).SingleAsync();
|
||||
@@ -154,14 +154,14 @@ namespace AyaNova.Biz
|
||||
{
|
||||
tax = await ct.TaxCode.AsNoTracking().Where(x => x.Id == item.PurchaseTaxCodeId).SingleAsync();
|
||||
item.DisplayTaxCode = tax.Name;
|
||||
po.DisplayTaxes = true;
|
||||
po.HasTaxes = true;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(item.VendorPartNumber))
|
||||
po.DisplayVendorNumber = true;
|
||||
po.HasVendorNumber = true;
|
||||
|
||||
if (item.QuantityReceived > 0)
|
||||
po.DisplayReceived = true;
|
||||
po.HasReceipt = true;
|
||||
|
||||
//Calculate line totals
|
||||
if (item.QuantityOrdered != 0 && item.PurchaseOrderCost != 0)
|
||||
|
||||
@@ -43,15 +43,15 @@ namespace AyaNova.Models
|
||||
public AyaType AyaType { get => AyaType.PurchaseOrder; }
|
||||
|
||||
[NotMapped]
|
||||
public bool DisplayWarehouses { get; set; }
|
||||
public bool HasSelectableWarehouses { get; set; }
|
||||
[NotMapped]
|
||||
public bool DisplayPartRequest { get; set; }
|
||||
public bool HasPartRequest { get; set; }
|
||||
[NotMapped]
|
||||
public bool DisplayTaxes { get; set; }
|
||||
public bool HasTaxes { get; set; }
|
||||
[NotMapped]
|
||||
public bool DisplayReceived { get; set; }
|
||||
public bool HasReceipt { get; set; }
|
||||
[NotMapped]
|
||||
public bool DisplayVendorNumber { get; set; }
|
||||
public bool HasVendorNumber { get; set; }
|
||||
|
||||
}//eoc
|
||||
|
||||
|
||||
Reference in New Issue
Block a user