This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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; }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user