Added globle search in purchase invoices (title, UID)

This commit is contained in:
ashutosh.nehete 2025-12-03 14:59:42 +05:30
parent 5d8a5e0cc8
commit 3caf944c50

View File

@ -232,6 +232,11 @@ namespace Marco.Pms.Services.Service
query = query.Where(pid => projectIds.Contains(pid.ProjectId));
}
if (!string.IsNullOrWhiteSpace(searchString))
{
query = query.Where(pid => pid.Title.Contains(searchString) ||
(pid.UIDPrefix + "/" + pid.UIDPostfix.ToString().PadLeft(5, '0')).Contains(searchString));
}
// Compute total count before paging
var totalCount = await query.CountAsync(ct);