Changed the condition to check the new attachments

This commit is contained in:
ashutosh.nehete 2025-12-01 10:00:41 +05:30
parent 9e7651f345
commit 1746cf0300

View File

@ -749,7 +749,7 @@ namespace Marco.Pms.Services.Service
await context.SaveChangesAsync(ct);
// 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
.Where(a => a.DocumentId.HasValue && !a.IsActive)
.Select(a => a.DocumentId!.Value)
@ -1134,6 +1134,7 @@ namespace Marco.Pms.Services.Service
#endregion
#region =================================================================== Purchase Invoice History Functions ===================================================================
#endregion
#region =================================================================== Helper Functions ===================================================================