Corrected the logic for next status in expense

This commit is contained in:
ashutosh.nehete 2025-11-18 18:01:17 +05:30
parent 0349229bac
commit 03ee834505

View File

@ -1512,9 +1512,13 @@ namespace Marco.Pms.Services.Service
bool hasPermission = await permissionService.HasPermissionAny(permissionIds, loggedInEmployee.Id); bool hasPermission = await permissionService.HasPermissionAny(permissionIds, loggedInEmployee.Id);
// Special case: allow review status if creator is the logged-in user // Special case: allow review status if creator is the logged-in user
bool hasStatusPermission = Review == status.Id && loggedInEmployee.Id == paymentRequest.CreatedById;
if (!hasPermission || !hasStatusPermission) if (Review == status.Id && loggedInEmployee.Id != paymentRequest.CreatedById)
{
continue;
}
if (!hasPermission)
{ {
continue; continue;
} }