Changed the condition to check the new attachments
This commit is contained in:
parent
9e7651f345
commit
1746cf0300
@ -749,7 +749,7 @@ namespace Marco.Pms.Services.Service
|
|||||||
await context.SaveChangesAsync(ct);
|
await context.SaveChangesAsync(ct);
|
||||||
|
|
||||||
// 5. Handle attachments update.
|
// 5. Handle attachments update.
|
||||||
var newAttachments = model.Attachments.Where(a => a.IsActive).ToList();
|
var newAttachments = model.Attachments.Where(a => !a.DocumentId.HasValue && a.IsActive).ToList();
|
||||||
var deleteAttachmentIds = model.Attachments
|
var deleteAttachmentIds = model.Attachments
|
||||||
.Where(a => a.DocumentId.HasValue && !a.IsActive)
|
.Where(a => a.DocumentId.HasValue && !a.IsActive)
|
||||||
.Select(a => a.DocumentId!.Value)
|
.Select(a => a.DocumentId!.Value)
|
||||||
@ -1134,6 +1134,7 @@ namespace Marco.Pms.Services.Service
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region =================================================================== Purchase Invoice History Functions ===================================================================
|
#region =================================================================== Purchase Invoice History Functions ===================================================================
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region =================================================================== Helper Functions ===================================================================
|
#region =================================================================== Helper Functions ===================================================================
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user