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