if (isOpen() || !hasEventCloseDate()) {
return calculatePayedAmountByPersonFor(civilYear);
}
final Money maxAmountForCivilYear =
calculateTotalAmountToPay(getEventCloseDate()).subtract(getPayedAmountUntil(civilYear - 1)).subtract(
calculatePayedAmountByOtherPartiesFor(civilYear));
if (maxAmountForCivilYear.isPositive()) {
final Money payedAmoutForPersonOnCivilYear = calculatePayedAmountByPersonFor(civilYear);
return payedAmoutForPersonOnCivilYear.lessOrEqualThan(maxAmountForCivilYear) ? payedAmoutForPersonOnCivilYear : maxAmountForCivilYear;
}
return Money.ZERO;