This commit is contained in:
2021-05-17 15:35:34 +00:00
parent 6d76a73191
commit 16bee4eff8
2 changed files with 6 additions and 5 deletions

View File

@@ -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);
}