Skip to content

Commit

Permalink
Chore: simplify and make obvious date comparison being done (#1455)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbmalkovsky authored Nov 19, 2024
1 parent f808f5a commit 9de0c49
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ private void validateLot(List<OHExceptionMessage> errors, Lot lot, boolean check
if (lot.getDueDate() == null) {
errors.add(new OHExceptionMessage(MessageBundle.getMessage("angal.medicalstock.insertavalidduedate.msg")));
}
if (lot.getPreparationDate() != null && lot.getDueDate() != null && lot.getPreparationDate().compareTo(lot.getDueDate()) > 0) {
if (lot.getPreparationDate() != null && lot.getDueDate() != null && lot.getPreparationDate().isAfter(lot.getDueDate())) {
errors.add(new OHExceptionMessage(MessageBundle.getMessage("angal.medicalstock.thepreparationdatecannotbyaftertheduedate.msg")));
}
}
Expand Down

0 comments on commit 9de0c49

Please sign in to comment.