This commit is contained in:
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -53,7 +53,7 @@
|
|||||||
"AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles",
|
"AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles",
|
||||||
"AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles",
|
"AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles",
|
||||||
"AYANOVA_FOLDER_TEMPORARY_SERVER_FILES": "c:\\temp\\RavenTestData\\tempfiles",
|
"AYANOVA_FOLDER_TEMPORARY_SERVER_FILES": "c:\\temp\\RavenTestData\\tempfiles",
|
||||||
"AYANOVA_SERVER_TEST_MODE": "true",
|
"AYANOVA_SERVER_TEST_MODE": "false",
|
||||||
"AYANOVA_SERVER_TEST_MODE_SEEDLEVEL": "small",
|
"AYANOVA_SERVER_TEST_MODE_SEEDLEVEL": "small",
|
||||||
"AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-7",
|
"AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-7",
|
||||||
"AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_13\\bin\\"
|
"AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_13\\bin\\"
|
||||||
|
|||||||
@@ -1454,27 +1454,24 @@ namespace AyaNova.Biz
|
|||||||
//so this will prevent that
|
//so this will prevent that
|
||||||
//Always clear any old ones for this object as they are all irrelevant the moment changed:
|
//Always clear any old ones for this object as they are all irrelevant the moment changed:
|
||||||
await NotifyEventHelper.ClearPriorEventsForObject(ct, AyaType.WorkOrder, oProposed.WorkOrderId, NotifyEventType.WorkorderTotalExceedsThreshold);
|
await NotifyEventHelper.ClearPriorEventsForObject(ct, AyaType.WorkOrder, oProposed.WorkOrderId, NotifyEventType.WorkorderTotalExceedsThreshold);
|
||||||
|
}
|
||||||
//Ok, we're here because there is a subscriber who is active and tags match so only check left is total against decvalue
|
//Ok, we're here because there is a subscriber who is active and tags match so only check left is total against decvalue
|
||||||
if (sub.DecValue < GrandTotal)
|
if (sub.DecValue < GrandTotal)
|
||||||
|
{
|
||||||
|
//notification is a go
|
||||||
|
NotifyEvent n = new NotifyEvent()
|
||||||
{
|
{
|
||||||
//notification is a go
|
EventType = NotifyEventType.WorkorderTotalExceedsThreshold,
|
||||||
NotifyEvent n = new NotifyEvent()
|
UserId = sub.UserId,
|
||||||
{
|
AyaType = AyaType.WorkOrder,
|
||||||
EventType = NotifyEventType.WorkorderTotalExceedsThreshold,
|
ObjectId = oProposed.WorkOrderId,
|
||||||
UserId = sub.UserId,
|
NotifySubscriptionId = sub.Id,
|
||||||
AyaType = AyaType.WorkOrder,
|
Name = $"{WorkorderInfo.Serial.ToString()}",
|
||||||
ObjectId = oProposed.WorkOrderId,
|
DecValue = GrandTotal
|
||||||
NotifySubscriptionId = sub.Id,
|
};
|
||||||
Name = $"{WorkorderInfo.Serial.ToString()}",
|
await ct.NotifyEvent.AddAsync(n);
|
||||||
DecValue = GrandTotal
|
log.LogDebug($"Adding NotifyEvent: [{n.ToString()}]");
|
||||||
};
|
await ct.SaveChangesAsync();
|
||||||
await ct.NotifyEvent.AddAsync(n);
|
|
||||||
log.LogDebug($"Adding NotifyEvent: [{n.ToString()}]");
|
|
||||||
await ct.SaveChangesAsync();
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ namespace AyaNova.Biz
|
|||||||
//DecValue (only for TheAndy for now workorder exceedsthreshold so not putting a lot of localization effort in; in app will localize properly)
|
//DecValue (only for TheAndy for now workorder exceedsthreshold so not putting a lot of localization effort in; in app will localize properly)
|
||||||
string DecDisplay= "";
|
string DecDisplay= "";
|
||||||
if(ne.DecValue!=0)
|
if(ne.DecValue!=0)
|
||||||
DecDisplay=ne.DecValue.ToString("N2", System.Globalization.CultureInfo.InvariantCulture);
|
DecDisplay=$"({ne.DecValue.ToString("N2", System.Globalization.CultureInfo.InvariantCulture)})\n";
|
||||||
|
|
||||||
string subject = "";
|
string subject = "";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user