This commit is contained in:
2021-09-02 20:36:46 +00:00
parent 60c9aa3f82
commit 6df4acf0c2

View File

@@ -4758,6 +4758,8 @@ namespace AyaNova.Biz
if (!KeepOnWorking(log)) return; if (!KeepOnWorking(log)) return;
#if (DEBUG) #if (DEBUG)
log.LogInformation($"processing pm id {pmid}"); log.LogInformation($"processing pm id {pmid}");
#endif #endif
@@ -4790,6 +4792,15 @@ namespace AyaNova.Biz
if (!KeepOnWorking(log)) return; if (!KeepOnWorking(log)) return;
continue; continue;
} }
//confirm customer is active before proceeding
if (!await ct.Customer.AsNoTracking().Where(x => x.Id == p.CustomerId).Select(x => x.Active).FirstOrDefaultAsync())
{
log.LogTrace($"PM {p.Serial} has an Inactive customer selected so it will be skipped for generation");
continue;
}
try try
{ {
//make new workorder //make new workorder