Skip to content

Commit

Permalink
fix: [ANDROAPP-5883] periods when orgunit is closed (#3613)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmmateos authored Apr 29, 2024
1 parent e2fb45e commit 773d13c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c
if ((inputPeriodModel.openingDate() == null || (inputPeriodModel.openingDate() != null && (DateUtils.getInstance().getToday().after(inputPeriodModel.openingDate()))) || DateUtils.getInstance().getToday().equals(inputPeriodModel.openingDate()))
&& (inputPeriodModel.closingDate() == null || (inputPeriodModel.closingDate() != null && DateUtils.getInstance().getToday().before(inputPeriodModel.closingDate())))
&& (organisationUnit == null || (organisationUnit.openingDate() == null || getCurrentDate().after(organisationUnit.openingDate())) && (organisationUnit.closedDate() == null || getCurrentDate().before(organisationUnit.closedDate())))
)
) {
if (getCurrentDate().before(inputPeriodModel.endPeriodDate())) {
isAllowed = true;
}
else if (getCurrentDate().before(inputPeriod.get(inputPeriod.size() - 1).initialPeriodDate()) ||
} else if (getCurrentDate().before(inputPeriod.get(inputPeriod.size() - 1).initialPeriodDate()) ||
getCurrentDate().before(inputPeriodModel.initialPeriodDate()))
break;
else
Expand Down

0 comments on commit 773d13c

Please sign in to comment.