return amountToPay;
}
@Override
public PaymentCodeType calculatePaymentCodeTypeFromEvent(Event event, DateTime when, boolean applyDiscount) {
DegreeTransferIndividualCandidacy individualCandidacy =
((DegreeTransferIndividualCandidacyEvent) event).getIndividualCandidacy();
final PrecedentDegreeInformation information = individualCandidacy.getRefactoredPrecedentDegreeInformation();
if (individualCandidacy.getUtlStudent() != null) {
return individualCandidacy.getUtlStudent() ? PaymentCodeType.INTERNAL_DEGREE_TRANSFER_INDIVIDUAL_CANDIDACY_PROCESS : PaymentCodeType.EXTERNAL_DEGREE_TRANSFER_INDIVIDUAL_CANDIDACY_PROCESS;
} else {
if (information.isCandidacyInternal() || hasAnyValidRegistration((DegreeTransferIndividualCandidacyEvent) event)
|| belongsToInstitutionGroup(information.getInstitution())) {
return PaymentCodeType.INTERNAL_DEGREE_TRANSFER_INDIVIDUAL_CANDIDACY_PROCESS;
} else {