This commit is contained in:
2021-06-17 18:37:52 +00:00
parent 476b90053b
commit cf450ea7ef
2 changed files with 18 additions and 4 deletions

View File

@@ -764,7 +764,7 @@ namespace AyaNova.Util
o.Name = "XYZ Accounting";
o.HeadOfficeId = HeadOfficeIdForCustomer;
o.BillHeadOffice=true;
o.BillHeadOffice = true;
o.Active = true;
o.Notes = Fake.Company.CatchPhrase();
o.Tags = RandomTags();
@@ -2521,7 +2521,7 @@ namespace AyaNova.Util
o.CompleteByDate = woDate.AddDays(5);
// o.CustomerContactName = "contact name here";
// o.CustomerContactName = "contact name here";
o.CustomerId = Fake.Random.Long(1, TotalSeededCustomers);
using (AyContext ct = ServiceProviderProvider.DBContext)
@@ -2888,7 +2888,20 @@ namespace AyaNova.Util
Created = ((DateTime)o.ServiceDate).AddHours(2)
};
o.States.Add(WoState);
o.LastStatusId=WoState.WorkOrderStatusId;//simulate if user added state to wo so it gets set
}
{
var WoState = new WorkOrderState()
{
WorkOrderStatusId = (long)Fake.Random.Enum<SeedWOStatus>(SeedWOStatus.Scheduled),
UserId = RandomServiceTechUserId(),
Created = ((DateTime)o.ServiceDate).AddHours(2)
};
o.States.Add(WoState);
o.LastStatusId = WoState.WorkOrderStatusId;//simulate if user added state to wo so it gets set
}