diff --git a/Marco.Pms.Services/Service/MasterService.cs b/Marco.Pms.Services/Service/MasterService.cs index 1c331d0..45a00ec 100644 --- a/Marco.Pms.Services/Service/MasterService.cs +++ b/Marco.Pms.Services/Service/MasterService.cs @@ -3252,7 +3252,7 @@ namespace Marco.Pms.Services.Service return ApiResponse.ErrorResponse("Requisition Status of same name already exists", "Requisition Status of same name already exists", 409); } - if (model.Id.HasValue && model.Id == id) + if (model.Id.HasValue && model.Id != id) { _logger.LogWarning("User provided invalid information while updating Requisition Status"); return ApiResponse.ErrorResponse("Invalid information", "User provided invalid information", 400); @@ -3478,7 +3478,7 @@ namespace Marco.Pms.Services.Service return ApiResponse.ErrorResponse("Purchase Order Status of same name already exists", "Purchase Order Status of same name already exists", 409); } - if (model.Id.HasValue && model.Id == id) + if (model.Id.HasValue && model.Id != id) { _logger.LogWarning("User provided invalid information while updating Purchase Order Status"); return ApiResponse.ErrorResponse("Invalid information", "User provided invalid information", 400); @@ -3579,12 +3579,6 @@ namespace Marco.Pms.Services.Service #endregion - #region =================================================================== Requisition Status APIs =================================================================== - #endregion - - #region =================================================================== Requisition Status APIs =================================================================== - #endregion - #region =================================================================== Helper Function =================================================================== private static object ExceptionMapper(Exception ex) {