This commit is contained in:
@@ -84,8 +84,12 @@ namespace AyaNova.Biz
|
||||
|
||||
//GRANDCHILD BIZ ACTIONS
|
||||
foreach (WorkOrderItem wi in newObject.Items)
|
||||
{
|
||||
foreach (WorkOrderItemPart wip in wi.Parts)
|
||||
await PartBizActionsAsync(AyaEvent.Created, wip, null, null);
|
||||
foreach (WorkOrderItemLoan wil in wi.Loans)
|
||||
await LoanBizActionsAsync(AyaEvent.Created, wil, null, null);
|
||||
}
|
||||
await ct.SaveChangesAsync();
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace AyaNova.Models
|
||||
[Required]
|
||||
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
|
||||
|
||||
//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
|
||||
|
||||
|
||||
[NotMapped]
|
||||
[NotMapped]
|
||||
public string UnitOfMeasureViz { get; set; }//"each", "hour" etc
|
||||
[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
|
||||
|
||||
@@ -1314,7 +1314,7 @@ namespace AyaNova.Util
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
{
|
||||
TaskGroup t = new TaskGroup();
|
||||
t.Name = "Aerostat monitor standard refurb";
|
||||
t.Active = true;
|
||||
@@ -2591,42 +2591,64 @@ namespace AyaNova.Util
|
||||
//PARTS
|
||||
var woItemPart = new WorkOrderItemPart()
|
||||
{
|
||||
|
||||
Quantity = 1,
|
||||
|
||||
Quantity = 1,
|
||||
PartId = Fake.Random.Long(1, TotalSeededParts),
|
||||
PartWarehouseId=1
|
||||
PartWarehouseId = 1
|
||||
};
|
||||
woItem.Parts.Add(woItemPart);
|
||||
|
||||
woItemPart = new WorkOrderItemPart()
|
||||
{
|
||||
|
||||
Quantity = 1,
|
||||
|
||||
Quantity = 1,
|
||||
PartId = Fake.Random.Long(1, TotalSeededParts),
|
||||
PartWarehouseId=1
|
||||
PartWarehouseId = 1
|
||||
};
|
||||
woItem.Parts.Add(woItemPart);
|
||||
|
||||
//PARTREQUESTS
|
||||
//PARTREQUESTS
|
||||
var woItemPartRequest = new WorkOrderItemPartRequest()
|
||||
{
|
||||
|
||||
Quantity = 1,
|
||||
|
||||
Quantity = 1,
|
||||
PartId = Fake.Random.Long(1, TotalSeededParts),
|
||||
PartWarehouseId=1
|
||||
PartWarehouseId = 1
|
||||
};
|
||||
woItem.PartRequests.Add(woItemPartRequest);
|
||||
|
||||
woItemPartRequest = new WorkOrderItemPartRequest()
|
||||
{
|
||||
|
||||
Quantity = 1,
|
||||
|
||||
Quantity = 1,
|
||||
PartId = Fake.Random.Long(1, TotalSeededParts),
|
||||
PartWarehouseId=1
|
||||
PartWarehouseId = 1
|
||||
};
|
||||
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
|
||||
var techId = RandomServiceTechUserId();
|
||||
var woItemLabor = new WorkOrderItemLabor()
|
||||
|
||||
Reference in New Issue
Block a user