This commit is contained in:
2021-07-27 22:01:56 +00:00
parent db09815b8c
commit 05da237f4d
2 changed files with 12 additions and 4 deletions

View File

@@ -148,7 +148,12 @@ namespace AyaNova.Biz
await transaction.CommitAsync(); await transaction.CommitAsync();
if (populateViz) if (populateViz)
await QuotePopulateVizFields(newObject, true, false); await QuotePopulateVizFields(newObject, true, false);
if (newObject.GenCopyAttachmentsFrom != null && !newObject.GenCopyAttachmentsFrom.IsEmpty)
{
//copy attachment from existing object
await AttachmentBiz.DuplicateAttachments(newObject.GenCopyAttachmentsFrom, new AyaTypeId(AyaType.WorkOrder, newObject.Id), ct);
newObject.GenCopyAttachmentsFrom = null;//so it doesn't get returned
}
await QuoteHandlePotentialNotificationEvent(AyaEvent.Created, newObject); await QuoteHandlePotentialNotificationEvent(AyaEvent.Created, newObject);
return newObject; return newObject;
} }

View File

@@ -104,6 +104,9 @@ namespace AyaNova.Models
[NotMapped] [NotMapped]
public bool UserCanViewLoanerCosts { get; set; } public bool UserCanViewLoanerCosts { get; set; }
[NotMapped, JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public AyaTypeId GenCopyAttachmentsFrom { get; set; }//INTERNAL, USED TO SIGNIFY ATTACHMENTS NEED TO BE COPIED ON SAVE
[NotMapped, JsonIgnore] [NotMapped, JsonIgnore]
public AyaType AyaType { get => AyaType.Quote; } public AyaType AyaType { get => AyaType.Quote; }