This commit is contained in:
@@ -556,6 +556,7 @@ namespace AyaNova.Biz
|
||||
l.Add(new FormField { TKey = "TaxCode", FieldKey = "Items.PurchaseTaxCodeId" });
|
||||
l.Add(new FormField { TKey = "PurchaseOrderItemVendorPartNumber", FieldKey = "Items.VendorPartNumber" });
|
||||
l.Add(new FormField { TKey = "PurchaseOrderItemSerialNumbers", FieldKey = "Items.Serials" });
|
||||
l.Add(new FormField { TKey = "PartName", FieldKey = "Items.PartName" });
|
||||
|
||||
l.Add(new FormField { TKey = "PurchaseOrderCustom1", FieldKey = "PurchaseOrderCustom1", IsCustomField = true });
|
||||
l.Add(new FormField { TKey = "PurchaseOrderCustom2", FieldKey = "PurchaseOrderCustom2", IsCustomField = true });
|
||||
|
||||
@@ -157,7 +157,9 @@ namespace AyaNova.Biz
|
||||
{
|
||||
|
||||
|
||||
item.PartViz = await ct.Part.AsNoTracking().Where(x => x.Id == item.PartId).Select(x => x.PartNumber).FirstOrDefaultAsync();
|
||||
var partInfo = await ct.Part.AsNoTracking().Where(x => x.Id == item.PartId).Select(x => new { partViz = x.PartNumber, partNameViz = x.Name }).FirstOrDefaultAsync();
|
||||
item.PartViz = partInfo.partViz;
|
||||
item.PartNameViz = partInfo.partNameViz;
|
||||
item.WarehouseViz = await ct.PartWarehouse.AsNoTracking().Where(x => x.Id == item.PartWarehouseId).Select(x => x.Name).FirstOrDefaultAsync();
|
||||
if (item.WorkorderItemPartRequestId != null)
|
||||
{
|
||||
@@ -192,13 +194,13 @@ namespace AyaNova.Biz
|
||||
if (tax != null)
|
||||
{
|
||||
//Tax A is always just tax A percent times net...
|
||||
dTaxA = (tax.TaxAPct/100) * dNet;
|
||||
dTaxA = (tax.TaxAPct / 100) * dNet;
|
||||
|
||||
//Tax B on the other hand could be simple or tax on tax...
|
||||
if (!tax.TaxOnTax)
|
||||
dTaxB = (tax.TaxBPct/100) * dNet;//simple
|
||||
dTaxB = (tax.TaxBPct / 100) * dNet;//simple
|
||||
else
|
||||
dTaxB = (dNet + dTaxA) * (tax.TaxBPct/100);//tax on tax
|
||||
dTaxB = (dNet + dTaxA) * (tax.TaxBPct / 100);//tax on tax
|
||||
}
|
||||
//set line total and taxes display values
|
||||
item.TaxAViz = dTaxA;
|
||||
|
||||
Reference in New Issue
Block a user