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;
|
||||||
}
|
}
|
||||||
@@ -3793,7 +3798,7 @@ namespace AyaNova.Biz
|
|||||||
return false;
|
return false;
|
||||||
await PartBizActionsAsync(AyaEvent.Deleted, null, dbObject, transaction);
|
await PartBizActionsAsync(AyaEvent.Deleted, null, dbObject, transaction);
|
||||||
ct.QuoteItemPart.Remove(dbObject);
|
ct.QuoteItemPart.Remove(dbObject);
|
||||||
await ct.SaveChangesAsync();
|
await ct.SaveChangesAsync();
|
||||||
if (HasErrors)
|
if (HasErrors)
|
||||||
{
|
{
|
||||||
await transaction.RollbackAsync();
|
await transaction.RollbackAsync();
|
||||||
@@ -4006,7 +4011,7 @@ namespace AyaNova.Biz
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ namespace AyaNova.Models
|
|||||||
public DateTime? ValidUntil { get; set; }
|
public DateTime? ValidUntil { get; set; }
|
||||||
public DateTime? Submitted { get; set; }
|
public DateTime? Submitted { get; set; }
|
||||||
public DateTime? Approved { get; set; }
|
public DateTime? Approved { get; set; }
|
||||||
|
|
||||||
//----
|
//----
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
@@ -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