This commit is contained in:
2021-10-01 21:42:38 +00:00
parent 22c4f1106d
commit 4a9c76929b

View File

@@ -2733,7 +2733,7 @@ namespace AyaNova.Util
{
DateTime seedStartWindow = DateTime.UtcNow.AddMonths(-3);
DateTime seedEndWindow = DateTime.UtcNow.AddMonths(3);
bool isPast = false;
for (int x = 0; x < count; x++)
{
WorkOrder o = new WorkOrder();
@@ -2744,8 +2744,8 @@ namespace AyaNova.Util
var tempDate = Fake.Date.Between(seedStartWindow, seedEndWindow);
var tempHour = Fake.Random.Int(9, 17);//9am to 5 pm (except some times may be in different dst state so this will be out by an hour for example depending on time of year and time zone in question)
var woDate = DesiredTimeInUtc(new DateTime(tempDate.Year, tempDate.Month, tempDate.Day, tempHour, 0, 0));
if (woDate < DateTime.UtcNow)
isPast = true;
bool isPast = (woDate < DateTime.UtcNow);
o.CreatedDate = woDate > DateTime.UtcNow ? DateTime.UtcNow : woDate;//no created dates in future but want a range of past dates to show off age of wo
o.CompleteByDate = woDate.AddDays(5);
// o.CustomerContactName = "contact name here";