diff --git a/health-services/stock/src/main/java/org/egov/stock/service/FacilityService.java b/health-services/stock/src/main/java/org/egov/stock/service/FacilityService.java index 2951b21e031..723fd98f967 100644 --- a/health-services/stock/src/main/java/org/egov/stock/service/FacilityService.java +++ b/health-services/stock/src/main/java/org/egov/stock/service/FacilityService.java @@ -99,9 +99,6 @@ public Map> validateProjectFacilityMappings(List ent if (SenderReceiverType.WAREHOUSE.equals(stock.getSenderType())) { facilityIds.add(stock.getSenderId()); } - if (SenderReceiverType.WAREHOUSE.equals(stock.getReceiverType())) { - facilityIds.add(stock.getReceiverId()); - } } } diff --git a/health-services/stock/src/main/java/org/egov/stock/util/ValidatorUtil.java b/health-services/stock/src/main/java/org/egov/stock/util/ValidatorUtil.java index d71f92cda2d..4f975144e32 100644 --- a/health-services/stock/src/main/java/org/egov/stock/util/ValidatorUtil.java +++ b/health-services/stock/src/main/java/org/egov/stock/util/ValidatorUtil.java @@ -266,7 +266,6 @@ private static void enrichErrorForStock(List validEntities, for (Stock stock : validEntities) { String senderId = stock.getSenderId(); - String receiverId = stock.getReceiverId(); List facilityIds = ProjectFacilityMappingOfIds.get(stock.getReferenceId()); if (!CollectionUtils.isEmpty(facilityIds)) { @@ -274,11 +273,8 @@ private static void enrichErrorForStock(List validEntities, if (SenderReceiverType.WAREHOUSE.equals(stock.getSenderType()) && !facilityIds.contains(senderId)) { populateErrorForStock(stock, senderId, errorDetailsMap); } - - if (SenderReceiverType.WAREHOUSE.equals(stock.getReceiverType()) && !facilityIds.contains(receiverId)) - populateErrorForStock(stock, receiverId, errorDetailsMap); } else { - populateErrorForStock(stock, senderId + " and " + receiverId, errorDetailsMap); + populateErrorForStock(stock, senderId, errorDetailsMap); } } }