コード例 #1
0
ファイル: MicroPaymentPR.java プロジェクト: joantune/fenix
 @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));
 }
コード例 #2
0
ファイル: FixedAmountPR.java プロジェクト: joantune/fenix
 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()));
   }
 }
コード例 #3
0
 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()));
   }
 }
コード例 #4
0
ファイル: FixedAmountPR.java プロジェクト: joantune/fenix
 @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));
 }