This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user