Money totalPayedAmount = calculateTotalPayedAmountForInstallments(event);
Money totalPayedAmount = calculateTotalPayedAmountForInstallments(event).add( event.calculateOtherPartiesPayedAmount());
    public Map<Installment, Money> calculateInstallmentRemainingAmounts(final Event event,	    final DateTime when, final BigDecimal discountPercentage) {	final Map<Installment, Money> result = new HashMap<Installment, Money>();	Money totalPayedAmount = calculateTotalPayedAmountForInstallments(event);	Money remainingAmountAfterPayed = Money.ZERO;	Installment lastInstallmentToBePayed = null;	for (final Installment installment : getInstallmentsSortedByEndDate()) {	    final InstallmentAccountingTransaction accountingTransaction = event		    .getAccountingTransactionFor(installment);	    final Money installmentAmount = calculateInstallmentAmount(when, discountPercentage,		    installment, accountingTransaction);	    final Money amountToDiscount = calculateTransportAmountToDiscount(totalPayedAmount,		    installmentAmount);	    final Money installmentFinalAmount = installmentAmount.subtract(amountToDiscount);	    if (accountingTransaction == null) {		result.put(installment, installmentFinalAmount);		lastInstallmentToBePayed = installment;	    } else if (installmentFinalAmount.isPositive()) {		remainingAmountAfterPayed = remainingAmountAfterPayed.add(installmentFinalAmount);	    }	    totalPayedAmount = totalPayedAmount.subtract(amountToDiscount);	}	if (lastInstallmentToBePayed != null && remainingAmountAfterPayed.isPositive()) {	    result.put(lastInstallmentToBePayed, result.get(lastInstallmentToBePayed).add(		    remainingAmountAfterPayed));	}	return result;    }