Esempio n. 1
0
 @Override
 public List<EntryDTO> calculateEntries(Event event, DateTime when) {
   Money amounToPay = event.calculateAmountToPay(when);
   return Collections.singletonList(
       new EntryDTO(
           getEntryType(),
           event,
           calculateTotalAmountToPay(event, when),
           amounToPay,
           amounToPay,
           event.getDescriptionForEntryType(getEntryType()),
           amounToPay));
 }
Esempio n. 2
0
 protected void checkIfCanAddAmount(Money amountToPay, final Event event, final DateTime when) {
   if (amountToPay.compareTo(calculateTotalAmountToPay(event, when)) < 0) {
     throw new DomainExceptionWithLabelFormatter(
         "error.accounting.postingRules.FixedAmountPR.amount.being.payed.must.match.amount.to.pay",
         event.getDescriptionForEntryType(getEntryType()));
   }
 }
 private void checkIfCanAddAmount(
     final Money amountToPay, final Event event, final DateTime when) {
   if (amountToPay.compareTo(calculateTotalAmountToPay(event, when)) < 0) {
     throw new DomainExceptionWithLabelFormatter(
         "error.DegreeChangeIndividualCandidacyPR.amount.being.payed.must.match.amount.to.pay",
         event.getDescriptionForEntryType(getEntryType()));
   }
 }
Esempio n. 4
0
 @Override
 public List<EntryDTO> calculateEntries(Event event, DateTime when) {
   final Money totalAmountToPay = calculateTotalAmountToPay(event, when);
   return Collections.singletonList(
       new EntryDTO(
           getEntryType(),
           event,
           totalAmountToPay,
           Money.ZERO,
           totalAmountToPay,
           event.getDescriptionForEntryType(getEntryType()),
           totalAmountToPay));
 }