This commit is contained in:
@@ -1449,10 +1449,10 @@ namespace AyaNova.Biz
|
|||||||
if (haveTotal == false)
|
if (haveTotal == false)
|
||||||
{
|
{
|
||||||
GrandTotal = await WorkorderGrandTotalAsync(oProposed.WorkOrderId, ct);
|
GrandTotal = await WorkorderGrandTotalAsync(oProposed.WorkOrderId, ct);
|
||||||
|
haveTotal = true;
|
||||||
|
|
||||||
//Note: not a time delayed notification, however user could be flipping states quickly triggering multiple notifications that are in queue temporarily
|
//Note: not a time delayed notification, however user could be flipping states quickly triggering multiple notifications that are in queue temporarily
|
||||||
//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:
|
|
||||||
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
|
||||||
|
|||||||
@@ -170,6 +170,11 @@ namespace AyaNova.Biz
|
|||||||
if (ne.EventType == NotifyEventType.CustomerServiceImminent)
|
if (ne.EventType == NotifyEventType.CustomerServiceImminent)
|
||||||
TranslationKeysToFetch.Add("NotifyEventCustomerServiceImminentMessage");
|
TranslationKeysToFetch.Add("NotifyEventCustomerServiceImminentMessage");
|
||||||
|
|
||||||
|
if (ne.DecValue != 0)
|
||||||
|
{
|
||||||
|
TranslationKeysToFetch.Add("Total");
|
||||||
|
}
|
||||||
|
|
||||||
//get translations
|
//get translations
|
||||||
var transid = await ct.UserOptions.AsNoTracking().Where(x => x.UserId == ne.UserId).Select(x => x.TranslationId).FirstOrDefaultAsync();
|
var transid = await ct.UserOptions.AsNoTracking().Where(x => x.UserId == ne.UserId).Select(x => x.TranslationId).FirstOrDefaultAsync();
|
||||||
var LT = await TranslationBiz.GetSubsetStaticAsync(TranslationKeysToFetch, transid);
|
var LT = await TranslationBiz.GetSubsetStaticAsync(TranslationKeysToFetch, transid);
|
||||||
@@ -196,9 +201,9 @@ 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)})\n";
|
DecDisplay = $"({LT["Total"]}: {ne.DecValue.ToString("N2", System.Globalization.CultureInfo.InvariantCulture)})\n";
|
||||||
|
|
||||||
string subject = "";
|
string subject = "";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user