This commit is contained in:
2022-03-08 20:45:29 +00:00
parent 082484c7a2
commit 6b05c9aaca

View File

@@ -1315,7 +1315,7 @@ namespace AyaNova.Biz
#endregion
#region Customer centric notifications
#region Customer centric notifications USER notifications
if (ayaEvent == AyaEvent.Created && oProposed.ServiceDate != null && oProposed.ServiceDate > DateTime.UtcNow)
{
@@ -1442,10 +1442,8 @@ namespace AyaNova.Biz
}//CustomerServiceImminent "Service Reminder"
//# WorkorderCreatedForCustomer - Customer / headoffice notification
if (oProposed.CustomerId != 0 && (ayaEvent == AyaEvent.Created
|| (ayaEvent == AyaEvent.Modified && oCurrent.CustomerId != oProposed.CustomerId)))
if (oProposed.CustomerId != 0 && (ayaEvent == AyaEvent.Created || (ayaEvent == AyaEvent.Modified && oCurrent.CustomerId != oProposed.CustomerId)))
{
//look for potential subscribers
var subs = await ct.NotifySubscription.AsNoTracking().Where(z => z.EventType == NotifyEventType.WorkorderCreatedForCustomer).ToListAsync();
foreach (var sub in subs)
@@ -2058,7 +2056,7 @@ namespace AyaNova.Biz
{
EventType = NotifyEventType.WorkorderCompleted,
CustomerId = WorkorderInfo.CustomerId,
AyaType = AyaType.Quote,
AyaType = AyaType.WorkOrder,
ObjectId = oProposed.WorkOrderId,
CustomerNotifySubscriptionId = sub.Id,
Name = WorkorderInfo.Serial.ToString()