This commit is contained in:
@@ -84,8 +84,12 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
//GRANDCHILD BIZ ACTIONS
|
//GRANDCHILD BIZ ACTIONS
|
||||||
foreach (WorkOrderItem wi in newObject.Items)
|
foreach (WorkOrderItem wi in newObject.Items)
|
||||||
|
{
|
||||||
foreach (WorkOrderItemPart wip in wi.Parts)
|
foreach (WorkOrderItemPart wip in wi.Parts)
|
||||||
await PartBizActionsAsync(AyaEvent.Created, wip, null, null);
|
await PartBizActionsAsync(AyaEvent.Created, wip, null, null);
|
||||||
|
foreach (WorkOrderItemLoan wil in wi.Loans)
|
||||||
|
await LoanBizActionsAsync(AyaEvent.Created, wil, null, null);
|
||||||
|
}
|
||||||
await ct.SaveChangesAsync();
|
await ct.SaveChangesAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ namespace AyaNova.Models
|
|||||||
[Required]
|
[Required]
|
||||||
public LoanUnitRateUnit Rate { get; set; }
|
public LoanUnitRateUnit Rate { get; set; }
|
||||||
|
|
||||||
public decimal Cost { get; set; }//cost from source record (e.g. serviceRate) or zero if no cost entered
|
public decimal Cost { get; set; }//cost from source record (e.g. serviceRate) or zero if no cost entered
|
||||||
public decimal ListPrice { get; set; }//List price from source record (e.g. serviceRate) or zero if no cost entered
|
public decimal ListPrice { get; set; }//List price from source record (e.g. serviceRate) or zero if no cost entered
|
||||||
|
|
||||||
//Standard pricing fields (mostly to support printed reports though some show in UI)
|
//Standard pricing fields (mostly to support printed reports though some show in UI)
|
||||||
@@ -37,7 +37,7 @@ public decimal Cost { get; set; }//cost from source record (e.g. serviceRate) or
|
|||||||
public decimal? PriceOverride { get; set; }//user entered manually overridden price, if null then ignored in calcs otherwise this *is* the price even if zero
|
public decimal? PriceOverride { get; set; }//user entered manually overridden price, if null then ignored in calcs otherwise this *is* the price even if zero
|
||||||
|
|
||||||
|
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public string UnitOfMeasureViz { get; set; }//"each", "hour" etc
|
public string UnitOfMeasureViz { get; set; }//"each", "hour" etc
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public decimal PriceViz { get; set; }//per unit price used in calcs after discounts or manual price if non-null or just ListPrice if no discount or manual override
|
public decimal PriceViz { get; set; }//per unit price used in calcs after discounts or manual price if non-null or just ListPrice if no discount or manual override
|
||||||
|
|||||||
@@ -1314,7 +1314,7 @@ namespace AyaNova.Util
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
TaskGroup t = new TaskGroup();
|
TaskGroup t = new TaskGroup();
|
||||||
t.Name = "Aerostat monitor standard refurb";
|
t.Name = "Aerostat monitor standard refurb";
|
||||||
t.Active = true;
|
t.Active = true;
|
||||||
@@ -2594,7 +2594,7 @@ namespace AyaNova.Util
|
|||||||
|
|
||||||
Quantity = 1,
|
Quantity = 1,
|
||||||
PartId = Fake.Random.Long(1, TotalSeededParts),
|
PartId = Fake.Random.Long(1, TotalSeededParts),
|
||||||
PartWarehouseId=1
|
PartWarehouseId = 1
|
||||||
};
|
};
|
||||||
woItem.Parts.Add(woItemPart);
|
woItem.Parts.Add(woItemPart);
|
||||||
|
|
||||||
@@ -2603,17 +2603,17 @@ namespace AyaNova.Util
|
|||||||
|
|
||||||
Quantity = 1,
|
Quantity = 1,
|
||||||
PartId = Fake.Random.Long(1, TotalSeededParts),
|
PartId = Fake.Random.Long(1, TotalSeededParts),
|
||||||
PartWarehouseId=1
|
PartWarehouseId = 1
|
||||||
};
|
};
|
||||||
woItem.Parts.Add(woItemPart);
|
woItem.Parts.Add(woItemPart);
|
||||||
|
|
||||||
//PARTREQUESTS
|
//PARTREQUESTS
|
||||||
var woItemPartRequest = new WorkOrderItemPartRequest()
|
var woItemPartRequest = new WorkOrderItemPartRequest()
|
||||||
{
|
{
|
||||||
|
|
||||||
Quantity = 1,
|
Quantity = 1,
|
||||||
PartId = Fake.Random.Long(1, TotalSeededParts),
|
PartId = Fake.Random.Long(1, TotalSeededParts),
|
||||||
PartWarehouseId=1
|
PartWarehouseId = 1
|
||||||
};
|
};
|
||||||
woItem.PartRequests.Add(woItemPartRequest);
|
woItem.PartRequests.Add(woItemPartRequest);
|
||||||
|
|
||||||
@@ -2622,11 +2622,33 @@ namespace AyaNova.Util
|
|||||||
|
|
||||||
Quantity = 1,
|
Quantity = 1,
|
||||||
PartId = Fake.Random.Long(1, TotalSeededParts),
|
PartId = Fake.Random.Long(1, TotalSeededParts),
|
||||||
PartWarehouseId=1
|
PartWarehouseId = 1
|
||||||
};
|
};
|
||||||
woItem.PartRequests.Add(woItemPartRequest);
|
woItem.PartRequests.Add(woItemPartRequest);
|
||||||
|
|
||||||
|
|
||||||
|
//LOANERS
|
||||||
|
var woItemLoan = new WorkOrderItemLoan()
|
||||||
|
{
|
||||||
|
OutDate = woDate.AddHours(1),
|
||||||
|
DueDate = woDate.AddHours(4),
|
||||||
|
Quantity = 4,
|
||||||
|
Rate = LoanUnitRateUnit.Hours,
|
||||||
|
LoanUnitId = Fake.Random.Long(1, TotalSeededLoanUnits)
|
||||||
|
};
|
||||||
|
woItem.Loans.Add(woItemLoan);
|
||||||
|
|
||||||
|
woItemLoan = new WorkOrderItemLoan()
|
||||||
|
{
|
||||||
|
OutDate = woDate.AddHours(2),
|
||||||
|
DueDate = woDate.AddHours(3),
|
||||||
|
Quantity = 1,
|
||||||
|
Rate = LoanUnitRateUnit.Hours,
|
||||||
|
LoanUnitId = Fake.Random.Long(1, TotalSeededLoanUnits)
|
||||||
|
};
|
||||||
|
woItem.Loans.Add(woItemLoan);
|
||||||
|
|
||||||
|
|
||||||
//LABOR
|
//LABOR
|
||||||
var techId = RandomServiceTechUserId();
|
var techId = RandomServiceTechUserId();
|
||||||
var woItemLabor = new WorkOrderItemLabor()
|
var woItemLabor = new WorkOrderItemLabor()
|
||||||
|
|||||||
Reference in New Issue
Block a user