This commit is contained in:
@@ -86,7 +86,7 @@ namespace AyaNova.Biz
|
||||
//(seeder or api user, not something AyaNova front end would do)
|
||||
if (newObject.Items.Count > 0)//our front end will post the header alone on new so this indicates a fully populated wo was saved
|
||||
{
|
||||
await GetCurrentContractFromContractIdAsync(newObject.ContractId);
|
||||
await GetCurrentContractFromContractIdAsync(newObject.ContractId);
|
||||
await ProcessChangeOfContractAsync(newObject.Id);
|
||||
}
|
||||
|
||||
@@ -235,7 +235,7 @@ namespace AyaNova.Biz
|
||||
await WorkOrderValidateAsync(putObject, dbObject);
|
||||
if (HasErrors)
|
||||
return null;
|
||||
// await WorkOrderBizActionsAsync(AyaEvent.Modified, putObject, dbObject, null);
|
||||
await WorkOrderBizActionsAsync(AyaEvent.Modified, putObject, dbObject, null);
|
||||
ct.Replace(dbObject, putObject);
|
||||
try
|
||||
{
|
||||
@@ -328,7 +328,7 @@ namespace AyaNova.Biz
|
||||
|
||||
//CREATION ACTIONS
|
||||
if (ayaEvent == AyaEvent.Created)
|
||||
{
|
||||
{ //applied at time of creation only
|
||||
//CONTRACT AUTO SET
|
||||
if (newObj.ContractId == null && newObj.CustomerId != 0)
|
||||
{
|
||||
@@ -509,7 +509,7 @@ namespace AyaNova.Biz
|
||||
|
||||
|
||||
//If Contract has response time then set CompleteByDate
|
||||
if (mContractInEffect.ResponseTime != TimeSpan.Zero)
|
||||
if (mContractInEffect!=null && mContractInEffect.ResponseTime != TimeSpan.Zero)
|
||||
{
|
||||
wo.CompleteByDate = DateTime.UtcNow.Add(mContractInEffect.ResponseTime);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user