This commit is contained in:
@@ -148,7 +148,12 @@ namespace AyaNova.Biz
|
||||
await transaction.CommitAsync();
|
||||
if (populateViz)
|
||||
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);
|
||||
return newObject;
|
||||
}
|
||||
@@ -3793,7 +3798,7 @@ namespace AyaNova.Biz
|
||||
return false;
|
||||
await PartBizActionsAsync(AyaEvent.Deleted, null, dbObject, transaction);
|
||||
ct.QuoteItemPart.Remove(dbObject);
|
||||
await ct.SaveChangesAsync();
|
||||
await ct.SaveChangesAsync();
|
||||
if (HasErrors)
|
||||
{
|
||||
await transaction.RollbackAsync();
|
||||
@@ -4006,7 +4011,7 @@ namespace AyaNova.Biz
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace AyaNova.Models
|
||||
public DateTime? ValidUntil { get; set; }
|
||||
public DateTime? Submitted { get; set; }
|
||||
public DateTime? Approved { get; set; }
|
||||
|
||||
|
||||
//----
|
||||
|
||||
[Required]
|
||||
@@ -104,6 +104,9 @@ namespace AyaNova.Models
|
||||
[NotMapped]
|
||||
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]
|
||||
public AyaType AyaType { get => AyaType.Quote; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user