entryDTO.getAmountToPay(), transactionDetail));
}
private void checkIfCanAddAmount(Money amountToPay, Event event, DateTime when) {
if (amountToPay.compareTo(calculateTotalAmountToPay(event, when)) != 0) {
throw new DomainExceptionWithLabelFormatter(
"error.accounting.postingRules.BaseAmountPlusAmountPerUnitGreaterThanOnePR.amount.being.payed.must.match.amount.to.pay",
event.getDescriptionForEntryType(getEntryType()));
}
}