This commit is contained in:
@@ -328,7 +328,8 @@ namespace AyaNova.Biz
|
|||||||
if (ayaEvent == AyaEvent.Created)
|
if (ayaEvent == AyaEvent.Created)
|
||||||
{
|
{
|
||||||
await AutoSetContractAsync(newObj);
|
await AutoSetContractAsync(newObj);
|
||||||
await AutoSetCloseByDateAsync(newObj);
|
if (newObj.CompleteByDate == null)//need to account for a user manually selecting a specific close by date in advance indicating to ignore any auto sets
|
||||||
|
await AutoSetCloseByDateAsync(newObj);
|
||||||
await AutoSetAddressAsync(newObj);
|
await AutoSetAddressAsync(newObj);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -420,13 +421,16 @@ namespace AyaNova.Biz
|
|||||||
{
|
{
|
||||||
await GetCurrentContractFromContractIdAsync(newObj.ContractId);
|
await GetCurrentContractFromContractIdAsync(newObj.ContractId);
|
||||||
if (mContractInEffect != null && mContractInEffect.ResponseTime != TimeSpan.Zero)
|
if (mContractInEffect != null && mContractInEffect.ResponseTime != TimeSpan.Zero)
|
||||||
|
{
|
||||||
newObj.CompleteByDate = DateTime.UtcNow.Add(mContractInEffect.ResponseTime);
|
newObj.CompleteByDate = DateTime.UtcNow.Add(mContractInEffect.ResponseTime);
|
||||||
|
return; //our work here is done
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
//not set yet, maybe the global default is the way...
|
||||||
if (AyaNova.Util.ServerGlobalBizSettings.WorkOrderCompleteByAge != TimeSpan.Zero)
|
if (AyaNova.Util.ServerGlobalBizSettings.WorkOrderCompleteByAge != TimeSpan.Zero)
|
||||||
newObj.CompleteByDate = DateTime.UtcNow.Add(AyaNova.Util.ServerGlobalBizSettings.WorkOrderCompleteByAge);
|
newObj.CompleteByDate = DateTime.UtcNow.Add(AyaNova.Util.ServerGlobalBizSettings.WorkOrderCompleteByAge);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ////////////////////////////////////////////////////////////////////////////////////////////////
|
// ////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
Reference in New Issue
Block a user